一键导入
cli-development
CLI tool design, argument parsing, interactive prompts, shell completions, cross-platform considerations, and distribution strategies.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
CLI tool design, argument parsing, interactive prompts, shell completions, cross-platform considerations, and distribution strategies.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Structured fault tolerance for coordinator agents. 5-level escalation ladder (Retry → Replace → Skip → Redistribute → Degrade), dead-man timers, degraded completion protocol, and cross-level escalation format. Load when orchestrating agents that may fail.
Structured code review protocol for inspecting code quality against the full rule set. Use when auditing code written by yourself or another agent, during the /audit workflow, or when the user asks for a code review.
Reusable convergence protocol for coordinator agents. Defines the BRIEFING → ITERATE → GATE → CONVERGE loop, context hygiene rules, self-succession protocol, turn budget, and handoff compression. Load when orchestrating multi-iteration workflows.
Pre-flight checklist and post-implementation self-review protocol. Use before generating any code (pre-flight) and after writing code but before verification (self-review) to catch issues early.
MECE task decomposition, file ownership enforcement, DAG-based execution, and safe merge protocol for intra-domain parallel dispatch. The safety invariants that prevent merge chaos when multiple agents write in parallel. Applies recursively at every nesting depth.
Shared protocols for all agents in the multi-agent pipeline: recursive nesting, pre-implementation restatement, parallel dispatch format, and agent definition cascade. Load this skill instead of inlining these protocols in every agent file.
| name | cli-development |
| description | CLI tool design, argument parsing, interactive prompts, shell completions, cross-platform considerations, and distribution strategies. |
Guidelines for building fast, intuitive, cross-platform CLI tools.
app <command> [subcommand] [flags] [args]
app task create --priority high "Deploy fix"
app task list --status active --format json
--format json for scripting.| Language | Library | Notes |
|---|---|---|
| Go | cobra + pflag | Most popular, auto-completions |
| Rust | clap (derive) | Type-safe, auto-help |
| Python | click or typer | Decorator-based, typer for type hints |
| Node.js | commander or yargs | Mature, well-documented |
Helpful error messages — what went wrong, why, how to fix:
Error: config file not found at ~/.myapp/config.yaml
Hint: run 'myapp init' to create a default config
--verbose / --debug flags for diagnostic output.
Never show stack traces by default — only with --debug.
Generate completions for bash, zsh, fish, PowerShell. Most CLI frameworks support this.
# Generate completions
myapp completion bash > /etc/bash_completion.d/myapp
myapp completion zsh > ~/.zsh/completions/_myapp
filepath.Join (Go), Path (Python), not string concat.\r\n on Windows.NO_COLOR env var.| Method | Best For |
|---|---|
| Go/Rust binary | Single binary, no runtime dependency |
pip install / npm install -g | Language ecosystem users |
| Homebrew formula | macOS/Linux users |
| Docker image | Containerized environments |
| GitHub Releases | Universal, with checksums |
For universal testing principles, see
.agents/rules/testing-strategy.md. Below: language-specific patterns only.