zhanghandong/rust-skills/domain-cli
Claude Code and agent skill by zhanghandong/rust-skills
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Use when building CLI tools. Keywords: CLI, command line, terminal, clap, structopt, argument parsing, subcommand, interactive, TUI, ratatui, crossterm, indicatif, progress bar, colored output, shell completion, config file, environment variable, 命令行, 终端应用, 参数解析
Install
npx vskill@latest install zhanghandong/rust-skills/domain-cliSKILL.md
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
Configuration Priority
Exit Codes
Trace Down ↓
From constraints to design (Layer 2):
Key Crates
| Purpose | Crate | |
|---|---|---|
| Argument parsing | clap | |
| Interactive prompts | dialoguer | |
| Progress bars | indicatif | |
| Colored output | colored | |
| Terminal UI | ratatui | |
| Terminal control | crossterm | |
| Console utilities | console |
Design Patterns
| Pattern | Purpose | Implementation | |
|---|---|---|---|
| Args struct | Type-safe args | #[derive(Parser)] | |
| Subcommands | Command hierarchy | #[derive(Subcommand)] | |
| Config layers | Override precedence | CLI > env > file | |
| Progress | User feedback | ProgressBar::new(len) |
Code Pattern: CLI Structure
Common Mistakes
| Mistake | Domain Violation | Fix | |
|---|---|---|---|
| Errors to stdout | Breaks piping | eprintln! | |
| No help text | Poor UX | #[arg(help = "...")] | |
| Panic on error | Bad exit code | Result + proper handling | |
| No progress for long ops | User uncertainty | indicatif |
Trace to Layer 1
| Constraint | Layer 2 Pattern | Layer 1 Implementation | |
|---|---|---|---|
| Type-safe args | Derive macros | clap Parser | |
| Error handling | Result propagation | anyhow + exit codes | |
| User feedback | Progress RAII | indicatif ProgressBar | |
| Config precedence | Builder pattern | Layered sources |
Related Skills
| When | See | |
|---|---|---|
| Error handling | m06-error-handling | |
| Type-driven args | m05-type-driven | |
| Progress lifecycle | m12-lifecycle | |
| Async CLI | m07-concurrency |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/domain-cli/SKILL.md
Popularity
- Repository stars
- 1,136
- Repository forks
- 99
- 7-day trend score
- 35
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 22 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/zhanghandong/rust-skills/domain-cli)