cli-development
Skill883 starsChanged 3 months agoMITView on GitHub
Design and implement command-line interfaces with subcommand-scoped help, actionable success output, and debuggable failure output. Use when creating or modifying CLI commands, argument parsing, help and usage text, exit codes, or command UX for humans and agents.
We split this skill into the rules it gives an agent
18 rules. 0 are common, 16 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
16
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Keep output minimal and context-efficient.
- Distinctive: line 24
Keep root help high-level.
- Distinctive: line 25
Put detailed flags, examples, and edge cases in subcommand help.
- Distinctive: line 30
Use stable wording and field names.
- Distinctive: line 31
Avoid random ordering in lists.
- Distinctive: line 32
Use conventional stream behavior.
- Distinctive: line 33
Write primary result data to stdout.
- Distinctive: line 34
Write diagnostics, warnings, and human-oriented guidance to stderr.
- Distinctive: line 36
Document that automation should capture both stdout and stderr for full logs.
- Very specific: line 41
Add machine-readable output mode such as --json.
- Distinctive: line 42
Keep human-readable output as the default.
- Very specific: line 44
Add --dry-run for mutating commands.
- Distinctive: line 49
Use this pattern for each subcommand:
- Distinctive: line 57
When returning an error, format output in this order:
- Distinctive: line 94
Write subcommand help before command logic.
- Distinctive: line 97
Verify stream contract: parseable payloads on stdout, diagnostics on stderr.
- Distinctive: line 98
Add tests for success, parser errors, and runtime failures.
- Distinctive: line 99
Verify each failure path includes state and next steps.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLI Development
Build CLIs that stay actionable in both success and failure paths.
Core Principles
- Avoid dead ends.
- Print next steps when a reasonable next action exists.
- On terminal completion, state that no further action is required.
- Make failures diagnosable.
- Print known state, failed operation, and likely cause.
- Include recovery commands and focused help text.
- Include usage text for argument or syntax errors.
- Keep output minimal and context-efficient.
- Use short defaults.
- Show detail only when requested by flags or when needed to recover from failure.
- Scope help to subcommands.
- Keep root help high-level.
- Put detailed flags, examples, and edge cases in subcommand help.
Command Contract
- Keep output deterministic.
- Use stable wording and field names.
- Avoid random ordering in lists.
- Use conventional stream behavior.
- Write primary result data to stdout.
- Write diagnostics, warnings, and human-oriented guidance to stderr.
- In machine mode (
--json), print a complete structured success or error object to stdout. - Document that automation should capture both stdout and stderr for full logs.
- Return meaningful exit codes.
0for success.- Non-zero codes map to clear failure classes.
- Support automation.
- Add machine-readable output mode such as
--json. - Keep human-readable output as the default.
- Add machine-readable output mode such as
- Support safe execution.
- Add
--dry-runfor mutating commands. - Make retry behavior explicit.
- Add
Help and Error Pattern
Use this pattern for each subcommand:
- One-line purpose.
- Usage line.
- Required arguments.
- Optional flags.
- Examples, including one failure-recovery example.
When returning an error, format output in this order:
- Error summary.
- Known state.
- Recovery options.
- Exact next command.
- Relevant subcommand help hint.
Output Templates
Success with next step:
Created release r123.
Next: mycli release publish r123Success without next step:
Published release r123.
No further action required.Failure with recovery:
Error: failed to publish release r123 (artifact missing).
Known state: release exists, build step did not produce dist/app.tar.gz.
Try: mycli release build r123
Then: mycli release publish r123
Help: mycli help release publishImplementation Checklist
- Define root command and subcommand boundaries.
- Write subcommand help before command logic.
- Implement parser and validate required arguments.
- Implement success and failure output contracts.
- Verify stream contract: parseable payloads on stdout, diagnostics on stderr.
- Add tests for success, parser errors, and runtime failures.
- Verify each failure path includes state and next steps.
Other versions7 projects use a version of this.
Word for word · 1
- cashew-labs/libretto★ 898100% same
Edited · 0
None found.
Wrote their own version · 6
- irahardianto/awesome-agv★ 157same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- fmind/dot★ 12same name
- fmind/dotfiles★ 11same name
- DebugSwift/XcodeBazelMCP★ 9same name
- KMaruthi2002/universal-llm-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use documentation-site, agent-protocols and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
fmindSkilldocumentation-site
Build Zensical docs sites: navigation, API docs, Pages, MkDocs/Hugo migration.
Also in 3 projects that use this
insodimensionSkillagent-protocols
Guide agent harness engineering toward the right AI agent protocol standards (MCP, A2A, ACP, AG-UI, AP2, x402, etc.) instead of reinventing. Analyzes what you're building, recommends protocols, pulls spec details and wire-message examples, checks compliance, and surfaces contribution opportunities. Triggers: '/agent-protocols', 'which protocol', 'should I use MCP or', 'what protocol for', 'agent protocol', 'protocol selection', 'MCP vs A2A', 'wire protocol for agents', 'agent interop', 'agent standard', 'extend MCP', 'contribute to A2A', 'protocol compliance', 'agent transport', 'agent discovery'. Self-improving: every run ends with a gotcha review.
Also in 3 projects that use this
third-order-labsSkillproject-scaffolding
Templates, directory conventions, and document structure for long-form fiction projects. Contains the full template library — documents are created as the project needs them, not all at once.
Also in 3 projects that use this
mjunaidcaSkillkubernetes
Production-grade Kubernetes manifests and debugging for containerized applications. This skill should be used when users ask to deploy to Kubernetes, create K8s manifests, containerize for K8s, set up Deployments/Services/Jobs/StatefulSets/CronJobs, create namespaces with resource quotas, set up multi-team isolation, configure ResourceQuota/ LimitRange, secure with RBAC (ServiceAccount, Role, RoleBinding), configure init containers (model download, db wait, migrations), set up sidecars (logging, metrics), or debug pods (CrashLoopBackOff, logs, exec, describe, events). Auto-detects from Dockerfile/code, generates hardened manifests with educational comments. CKAD-aligned.
Also in 4 projects that use this
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 5 projects that use this
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 4 projects that use this
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .deepsec/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- .opencode/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- address-reviewSkill
- erroreSkill
- external-electron-appsSkill
- fix-merge-conflictsSkill
- generate-specSkill
- generate-spec-v2Skill
- get-pr-reviewsSkill
- glimpse-changesSkill
- implement-specSkill
- improve-codebase-architectureSkill
- libretto-readonlySkill
- librettoSkill
- promptingSkill
- push-everythingSkill
- pushSkill
- reviewSkill
- spec-reviewSkill
- summarizeSkill
- technical-writingSkill
- turborepoSkill
- update-docsSkill
- writing-testsSkill
- libretto-readonlySkill
- librettoSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

