cli-development
Skill904 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.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- fmind/dottheir own version, first seen Oct 5, 2026
- irahardianto/awesome-agvtheir own version, first seen Aug 21, 2026
- nimadorostkar/Claude-Skills-collectiontheir own version, first seen Jul 14, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- irahardianto/awesome-agv★ 157same name
- nimadorostkar/Claude-Skills-collection★ 28same name
- fmind/dot★ 10same 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.
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
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 16 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
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 an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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.
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.

