cli-development

Solid

Use when building command-line tools. Covers argument design, exit codes, streams and piping, progress output, configuration precedence, and behavior that respects the shell.

Web & Frontend 23 stars 2 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
46
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# CLI Development ## Purpose Build command-line tools that behave the way the shell expects: composable, scriptable, quiet by default, and honest about failure. ## When to Use - Building a developer tool, deployment script, or internal utility with a CLI. - Designing the argument surface of an existing tool. - Making a tool safe to use inside pipelines and CI. ## Capabilities - Argument and subcommand design. - Correct use of stdout, stderr, and exit codes. - Configuration precedence: flags, environment, config file, defaults. - Human output versus machine output (`--json`, TTY detection). - Progress, colour, and interactivity that degrade correctly when piped. ## Inputs - The tasks the tool must perform and who runs it (humans, CI, both). - Whether it will be composed with other tools. - Whether it performs destructive operations. ## Outputs - A command surface that is predictable and discoverable. - Machine-readable output behind a flag. - Exit codes that scripts can branch on. - Help text that answers the question without a web search. ## Workflow 1. **Design the verbs** — Subcommands are verbs on nouns: `tool deploy service`, not `tool --deploy --service`. Group related operations. 2. **Separate the streams** — Results go to stdout. Everything else — progress, warnings, logs — goes to stderr. This is what makes `tool list | grep x` work. 3. **Define the exit codes** — 0 for success, 1 for a general failure, 2 for a usage error. Document any others. 4. **Set th...

Details

Author
nimadorostkar
Repository
nimadorostkar/Claude-Skills-collection
Created
2 weeks ago
Last Updated
yesterday
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category