cli-development
Skill28 starsChanged 5 months agoMITView on GitHub
Use when building command-line tools. Covers argument design, exit codes, streams and piping, progress output, configuration precedence, and behavior that respects the shell.
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
- cashew-labs/librettotheir own version, first seen Aug 18, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- cashew-labs/libretto★ 904same name
- irahardianto/awesome-agv★ 157same 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 repository137 other files it gives its agents.
- agent-instructionsSkill
- agent-memorySkill
- hooksSkill
- plugin-developmentSkill
- skill-authoringSkill
- skill-reviewSkill
- slash-commandsSkill
- subagentsSkill
- agent-designSkill
- context-engineeringSkill
- fine-tuningSkill
- llm-cost-optimizationSkill
- llm-evaluationSkill
- llm-integrationSkill
- mcp-serverSkill
- ml-pipelineSkill
- model-selectionSkill
- prompt-engineeringSkill
- ragSkill
- structured-outputSkill
- api-designSkill
- background-jobsSkill
- cachingSkill
- djangoSkill
- event-driven-architectureSkill
- fastapiSkill
- graphqlSkill
- microservicesSkill
- nestjsSkill
- realtime-websocketsSkill
- spring-bootSkill
- competitive-analysisSkill
- lead-researchSkill
- product-analysisSkill
- resumeSkill
- user-researchSkill
- database-performanceSkill
- data-modelingSkill
- data-qualitySkill
- pandasSkill
- postgresSkill
- sparkSkill
- brand-guidelinesSkill
- generative-artSkill
- themingSkill
- ui-reviewSkill
- visual-designSkill
- architecture-decisionsSkill
- bug-fix-protocolSkill
- code-reviewSkill
- debuggingSkill
- design-patternsSkill
- domain-modelingSkill
- git-workflowSkill
- legacy-modernizationSkill
- refactoringSkill
- repository-explorationSkill
- simple-designSkill
- system-designSkill
- aws-cdkSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 58
Read from stdin when the input argument is -.
- Distinctive: line 102
If the tool takes more than a second, print progress to stderr — but only when attached to a TTY.
≈ “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
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
- Design the verbs — Subcommands are verbs on nouns:
tool deploy service, nottool --deploy --service. Group related operations. - Separate the streams — Results go to stdout. Everything else — progress, warnings, logs — goes to stderr. This is what makes
tool list | grep xwork. - Define the exit codes — 0 for success, 1 for a general failure, 2 for a usage error. Document any others.
- Set the configuration precedence — Command-line flag beats environment variable beats config file beats default. Never surprise the user by reversing this.
- Detect the TTY — Colour, spinners, and prompts only when stdout is a terminal. When piped, output is plain and non-interactive.
- Make destruction opt-in — Anything irreversible requires confirmation, or
--yeswhen non-interactive.--dry-runon anything with side effects.
Best Practices
- Be quiet on success. A tool that prints five lines of celebration on every run is unusable in a loop.
- Provide
--jsonfor anything a script might parse. Parsing human output is a bug generator for everyone downstream. - Honour
NO_COLORand--no-color. HonourCIby disabling interactivity. - Long flags are self-documenting; short flags are for the ones typed constantly. Do not invent a short flag for every option.
- Read from stdin when the input argument is
-. It costs three lines and makes the tool composable. - Error messages state what failed, why, and what to do about it. "Error: invalid input" is not one of those.
Examples
Stream and exit-code discipline:
import json, sys
def main(argv: list[str]) -> int:
args = parse_args(argv)
try:
results = search(args.query, limit=args.limit)
except ConfigError as e:
print(f"error: {e}\nhint: run `tool config init` to create a config file", file=sys.stderr)
return 2
except UpstreamError as e:
print(f"error: search backend unavailable: {e}", file=sys.stderr)
return 1
if args.json:
json.dump([r.to_dict() for r in results], sys.stdout)
sys.stdout.write("\n")
else:
for r in results:
print(f"{r.id}\t{r.title}") # stdout: the result
if not results:
print("no matches", file=sys.stderr) # stderr: the commentary
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv[1:]))tool search foo | head -5 works. tool search foo --json | jq . works. tool search foo > /dev/null prints nothing but the commentary. All three are the point.
Notes
- Exiting non-zero on "no results found" is a design decision, not an obvious one.
grepdoes it; most tools should not. Whatever you choose, document it. - A
--verboseflag that changes stdout breaks pipelines. Verbosity belongs on stderr. - If the tool takes more than a second, print progress to stderr — but only when attached to a TTY.
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.

