Constrains Claude to follow CLI best practices when building command line tools in Rust. You get argument parsing with clap's derive macros, proper config precedence (CLI args beat env vars beat config files), and the critical stuff like errors to stderr and correct exit codes. The trace down pattern is actually useful here: it maps domain requirements like "need progress display" directly to indicatif's ProgressBar with RAII lifecycle management. Includes working patterns for subcommands, layered config, and interactive elements. Most valuable when you want Claude to respect Unix conventions and scriptability instead of inventing its own error handling.

skills.sh installs
3.4K
GitHub stars
1.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add actionbook/rust-skills --skill domain-cli --agent claude-code

Installs into .claude/skills of the current project.

Files

CLI Domain

Layer 3: Domain Constraints

Domain Constraints → Design Implications

Domain RuleDesign ConstraintRust Implication
User ergonomicsClear help, errorsclap derive macros
Config precedenceCLI > env > fileLayered config loading
Exit codesNon-zero on errorProper Result handling
Stdout/stderrData vs errorseprintln! for errors
InterruptibleHandle Ctrl+CSignal handling

Critical Constraints

User Communication

RULE: Errors to stderr, data to stdout
WHY: Pipeable output, scriptability
RUST: eprintln! for errors, println! for data

Configuration Priority

RULE: CLI args > env vars > config file > defaults
WHY: User expectation, override capability
RUST: Layered config with clap + figment/config

Exit Codes

RULE: Return non-zero on any error
WHY: Script integration, automation
RUST: main() -> Result<(), Error> or explicit exit()

Trace Down ↓

From constraints to design (Layer 2):

"Need argument parsing"
    ↓ m05-type-driven: Derive structs for args
    ↓ clap: #[derive(Parser)]

Sponsors

Details

Repository
github.com/actionbook/rust-skills
Categories
Rust, CLI & Terminal
First seen
May 16, 2026

More from actionbook/rust-skills

All 38

Recommended

More Rust
1actionbook avatardomain-mlactionbook/rust-skillsUse when building ML/AI apps in Rust. Keywords: machine learning, ML, AI, tensor, model, inference, neural network, deep learning, training, prediction, ndarray3Kskills.sh installs
2actionbook avatarcore-actionbookactionbook/rust-skillsInternal support skill for actionbook MCP selectors used by Rust documentation research workflows. Use only when another rust-skills workflow explicitly request2Kskills.sh installs
3actionbook avatarcore-fix-skill-docsactionbook/rust-skillsInternal maintenance support for checking and fixing generated Rust skill documentation references. Use only when explicitly invoked by /fix-skill-docs.2Kskills.sh installs
4zhanghandong avatarcoding-guidelineszhanghandong/rust-skillscoding guidelines1.2Kskills.sh installs
5zhanghandong avatarm10-performancezhanghandong/rust-skillsm10 performance895skills.sh installs
6zhanghandong avatarm07-concurrencyzhanghandong/rust-skillsm07 concurrency844skills.sh installs