
Domain Cli
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-codeInstalls into .claude/skills of the current project.
Files
CLI Domain
Layer 3: Domain Constraints
Domain Constraints → Design Implications
| Domain Rule | Design Constraint | Rust Implication |
|---|---|---|
| User ergonomics | Clear help, errors | clap derive macros |
| Config precedence | CLI > env > file | Layered config loading |
| Exit codes | Non-zero on error | Proper Result handling |
| Stdout/stderr | Data vs errors | eprintln! for errors |
| Interruptible | Handle Ctrl+C | Signal 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- Rust Learner3.3K
- Rust Skill Creator3.3K
- Rust Deps Visualizer3.2K
- Meta Cognition Parallel3.2K
- Rust Daily3.2K
- Domain Embedded3.1K
- Domain Cloud Native3K
- Domain Fintech3K
- Domain Ml3K
- Domain Iot2.9K
- Rust Router2.9K
- Core Agent Browser2.2K
- Core Dynamic Skills2K
- Core Actionbook2K
- Core Fix Skill Docs2K
- M15 Anti Pattern9.3K
- Coding Guidelines4.2K
- M10 Performance3.8K
- M07 Concurrency3.7K
- M06 Error Handling3.7K
- M01 Ownership3.6K
- M04 Zero Cost3.6K
- M05 Type Driven3.6K
- M02 Resource3.6K