cli-builder
Skill0 starsChanged 2 months agoMITView on GitHub
Build or refactor agent-facing CLI tools with non-interactive commands, stable --help and --json contracts, idempotent operations, and --dry-run previews. Use for CLI design, agent-friction refactors, output/exit-code debugging, or automation safety. Do not use for GUI/TUI design, conversational tools, MCP server design, or general API architecture; use api-design-and-evolution for the latter.
4 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- luongnv89/skillstheir own version, first seen Nov 6, 2026
- magnus919/agent-skillsedited, first seen Jul 21, 2026
- nyxx-stack/agent-skillstheir own version, first seen May 22, 2026
- sarfraznawaz2005/agent-skills-collectiontheir own version, first seen Feb 5, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- magnus919/agent-skills★ 17295% same
Wrote their own version · 3
- luongnv89/skills★ 145same name
- nyxx-stack/agent-skills★ 1same name
- sarfraznawaz2005/agent-skills-collection★ 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.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rules/AGENTS.mdAGENTS.md
- kurokoSkill
- tayoriSkill
- xerjSkill
- aesthetic-readme-craftSkill
- codebase-digestSkill
- git-release-craftSkill
- git-repo-craftSkill
- karakuriSkill
- python-clean-codeSkill
- rust-clean-codeSkill
- rust-style-pythonSkill
- systematic-code-verificationSkill
- compose-clean-codeSkill
- bash-clean-codeSkill
- tui-designSkill
- frontend-designSkill
- web-design-guidelinesSkill
- unslopSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Treat a CLI as a contract between the tool and the agent.
- Distinctive: line 22
Keep this file as the workflow.
- Very specific: line 29
Add or review --json, --dry-run, --yes, idempotency, or lazy authentication.
- Distinctive: line 46
Use one consistent verb/resource convention.
- Distinctive: line 57
Use the advanced patterns for chained dry-runs, third-party JSON, version-dependent behavior, and text matching.
- Very specific: line 64
Run syntax checks, every command's --help, parse every --json response, check missing arguments and unknown flags, confirm errors are on …
- Distinctive: line 73
Keep the entry-point skill concise and put conditional detail in references.
- Distinctive: line 89
Do not use this skill for one-off interactive human commands, GUI/TUI or web UI design, conversational agent tools, or MCP servers.
“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 Builder
Treat a CLI as a contract between the tool and the agent. The contract includes
command names, --help, flags, output schemas, exit codes, stderr, and previews.
Keep this file as the workflow; load the linked references only when their
specialized guidance is needed.
When to Use
- Build a new CLI that an agent will discover and call.
- Refactor prompts, ambiguous commands, parser-hostile output, or false success codes.
- Add or review
--json,--dry-run,--yes, idempotency, or lazy authentication.
One Workflow
1. Discover the real contract
Define one CLI per service (except services sharing vendor authentication). Inspect real non-health read endpoints before coding, verify the actual authentication header and response shape, and capture the command tree and failure cases. Do not invent flags from API documentation alone. For HTTP clients, read the Python API client pattern.
Choose Bash for local wrappers and filesystem pipelines. Choose Python for HTTP, JSON, authentication state, or three-level command trees.
2. Build a predictable surface
Use one consistent verb/resource convention. Every command should be non-interactive
and flag-driven, reject unknown flags, and provide useful subcommand help with
concrete examples. Make normal output human-readable, but support --json with a
stable curated schema, normalized types, deterministic ordering, and no other stdout.
Send diagnostics to stderr with truthful non-zero exit codes.
For any state change, implement --dry-run before data-fetching or mutation, and
require an explicit --yes/--force gate for destructive work. Guard creation,
updates, and deletion so reruns are safe. Authentication must be lazy: --help and
safe dry-runs work without credentials.
Use the advanced patterns for chained dry-runs, third-party JSON, version-dependent behavior, and text matching. Use the Bash scaffold when a local shell wrapper is the right fit.
3. Verify the contract
Run syntax checks, every command's --help, parse every --json response, check
missing arguments and unknown flags, confirm errors are on stderr, exercise dry-run
without credentials, and prove a second identical run is a no-op. Against a live
service, test a real authenticated read and dry-run each mutation. Use the
agent-readiness checklist for the final
review.
4. Wrap and maintain
Keep the entry-point skill concise and put conditional detail in references. A wrapper should explain what the CLI is for, setup, common commands, output meaning, and gotchas, not duplicate every flag. See the skill-wrapper example. After real usage, record failures and prioritize fixes with the improvement cycle.
Core Contracts
--helpis the discoverable schema and includes examples.--jsonis parseable on stdout alone; errors have stable machine-readable codes.--dry-rundescribes exact intended changes and performs no writes or prerequisite lookups.- Mutations are explicitly authorized, idempotent, and report meaningful status.
- Exit status distinguishes success, usage failure, and runtime failure.
When Not to Use
Do not use this skill for one-off interactive human commands, GUI/TUI or web UI design, conversational agent tools, or MCP servers. Read the MCP-vs-CLI decision guide for tool-boundary choices, and route general API contract design to api-design-and-evolution.
References
- Python API client
- Advanced patterns
- Agent-readiness checklist
- Skill wrapper example
- MCP vs CLI
- Improvement cycle
- Bash scaffold
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.

