Claude Code Rust CLI Builder Skill for clap Subcommands
Specify a small command interface, then use clap derive to give each subcommand clear arguments, help and failure behavior.
中文Install in Claude Code
Use a Rust project with Cargo and `clap` derive enabled. Keep example data local.
- Get the complete `cli-tool/components/skills/development/rust-cli-builder` directory from the pinned GitHub checkout.
- Copy it under the target project's `.claude/skills/`. Confirm `.claude/skills/rust-cli-builder/SKILL.md`, open Claude Code at the project root, and call `/rust-cli-builder`.
Example task
Design `book-notes list` and `book-notes show <id>`. Ensure `show` reports usage when the ID is missing.What to check
Top-level help lists both subcommands. An invocation of `show` without an ID explains the missing argument and exits nonzero.
Original SKILL.md on GitHub · Updated
Frequently asked question
When does a CLI need a config file?
Add one when users need persistent choices, and document how command-line arguments override them.