Install any skill in seconds. Free to start, no credit card required.
Get Started Free →yogin16/better-cli
Best practices for building and improving CLIs that work for both humans and AI agents.
Passed 20 of 22 test cases with the skill, and 17 of 22 without it.
and 2 more in the full report
3 fixed17 passed either way2 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
A developer on our team suggests returning exit code 1 whenever a requested database record is not found in our CLI tool. Which specific exit code should be returned when a resource is not found?
| Checked | Without skill | With skill |
|---|---|---|
| Specifies exit code 3 when a requested resource is not found. | Missed | Passed |
The instructions your model reads when the skill loads.
Build command-line tools that are delightful for humans at a terminal AND reliable for AI agents in automation pipelines. These goals are orthogonal, not conflicting.
This skill targets command-based CLIs (think git, docker, gh, kubectl) — tools with subcommands, flags, and structured output. It is not about full-screen TUI applications or interactive dashboards.
NOT for: TUI/full-screen terminal apps, GUI applications, REST/GraphQL API design, shell scripting
Human DX optimizes for discoverability and forgiveness. Agent DX optimizes for predictability and defense-in-depth. A great CLI does both.
The Golden Rule: Output that tells you what to do next. Every command's output — success or failure — should give the user (human or AI agent) enough context to know what their next action should be. An agent reading your CLI's output should be able to continue its workflow without guessing.
flowchart LR
H[Human at Terminal] --> TTY{stdout is TTY?}
A[AI Agent] --> TTY
TTY -->|Yes| RICH[Rich: colors, tables,\nprogress bars, prompts]
TTY -->|No| CLEAN[Clean: JSON, no ANSI,\nno prompts, parseable]
RICH --> CORE[Same data, same exit codes,\nsame semantics]
CLEAN --> CORE
stdout -> primary output (results, JSON, file contents) — for piping
stderr -> errors, warnings, progress, diagnostics, prompts — for humans
test cases passed, vs 17 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.