agent-cli-design
Skill4 starsChanged 2 months agoApache-2.0View on GitHub
Design or review command-line interfaces used by people and agents: discoverable commands, non-interactive execution, structured output, exit status, and safe mutation. Not a mandate to add a CLI or replace its parser.
In this repository81 other files it gives its agents.
- agent-tool-boundariesSkill
- behavior-first-implementationSkill
- bounded-prototypeSkill
- bounded-pr-sliceSkill
- building-fdd-validationSkill
- context-efficiencySkill
- cross-language-contractsSkill
- cross-platform-agent-instructionsSkill
- design-interviewSkill
- diagnosis-loopSkill
- domain-languageSkill
- edge-cloud-syncSkill
- handoff-continuitySkill
- immutable-pr-reviewSkill
- memory-context-hygieneSkill
- module-designSkill
- orchestrateSkill
- owner-decision-gateSkill
- parallel-portfolioSkill
- pr-gate-loopSkill
- pyo3-async-lifecycleSkill
- pyo3-buffer-performanceSkill
- pyo3-free-threadingSkill
- pyo3-ownership-errorsSkill
- pyo3-wheel-releaseSkill
- python-api-typingSkill
- python-async-concurrencySkill
- python-ci-releaseSkill
- python-data-boundariesSkill
- python-packaging-environmentsSkill
- python-performanceSkill
- python-pytestSkill
- python-reviewSkill
- python-test-designSkill
- python-threading-workersSkill
- python-workflowSkill
- react-components-stateSkill
- react-performanceSkill
- repository-groundingSkill
- rust-api-designSkill
- rust-async-concurrencySkill
- rust-build-diagnosticsSkill
- rust-ci-releaseSkill
- rust-memory-layoutSkill
- rust-nextestSkill
- rust-numerics-simdSkill
- rust-performanceSkill
- rust-protocol-codecsSkill
- rust-python-bindingsSkill
- rust-reviewSkill
- rust-storage-durabilitySkill
- rust-test-designSkill
- rust-unsafe-ffiSkill
- rust-workflowSkill
- rust-workspace-dependenciesSkill
- shadcn-react-componentsSkill
- shadcn-svelte-componentsSkill
- simplify-existing-codeSkill
- source-verificationSkill
- svelte-components-runesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are 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.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Read consumer checks and sources for focused examples.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Agent-Friendly CLI Design
Make the existing CLI easy to discover, compose, and recover from without sacrificing human use. Read its parser, callers, documented compatibility, and supported platforms first. This skill applies to Python, Rust, and TypeScript implementations; it does not require a new parser or an agent framework.
Separate discovery from execution
Keep help and capability listing read-only and usable before credentials, network access, or destination setup when those are unnecessary for discovery. Describe required arguments, defaults, units, scope, and a small working example. Return stable resource identifiers rather than requiring a caller to scrape a display label or invent a path.
Non-interactive use must not unexpectedly open a browser, prompt forever, start a pager, or choose an ambiguous target. Explain missing input and the next supported action. Preserve an interactive path where useful; do not make automation imitate keystrokes. Existing user and repository authority still governs installation, writes, publication, and destructive actions.
Treat output as a public contract
Provide a documented machine mode when needed. Keep its result channel free of banners, progress spinners, ANSI decoration, and incidental logs; route diagnostics separately. Choose one JSON document or an explicitly framed stream, not an accidental mixture. Preserve meaningful empty, partial, failed, and outcome-unknown states. Define exit status together with the payload rather than reporting success merely because some rows were printed.
Keep IDs, units, timestamps, field meanings, and ordering stable where promised. Bound large listings through the existing limit/filter/page mechanism and disclose truncation. Do not add schema versioning or a second API protocol without a compatibility need. Keep secrets out of output and diagnostics; machine readability does not justify dumping all internal state.
Make effects and interruption honest
Reuse the application's validation, authorization, preview, and reconciliation path. A dry run should not perform the mutation it previews; document any unavoidable external reads. Missing confirmation is not permission to enable a force flag. Retrying an interrupted mutation requires its actual idempotence or outcome check.
Build child-process arguments as argument vectors rather than interpolated shell commands. Also handle option-like user values, working directory, environment inheritance, input limits, and platform-specific process behavior. Own child lifetimes and output drains. A caller disappearing or a pipe closing does not prove a remote action was rolled back.
Test the consumer path
Run the installed or built entry point, not only parser helpers. Exercise help, no-TTY input, invalid arguments, spaces and Unicode, empty and large results, stderr separation, nonzero failures, cancellation, and the supported broken-pipe policy. Parse machine output with an independent reader and verify that read-only modes leave the destination untouched.
Return the supported interaction contract and observed tests. Use the existing agent-tool-boundaries or language specialist only when that boundary also needs work.
Read consumer checks and sources for focused examples.
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.

