cli-design
Skill5 starsChanged 45 days agoMITView on GitHub
Design, build, or review command-line interfaces using the Command Line Interface Guidelines from clig.dev. Use this skill whenever the user is creating a new CLI, adding commands/subcommands/flags, designing help text, choosing stdout/stderr/exit-code behavior, adding JSON or plain output modes, improving error messages, making destructive operations safer, or asking whether a CLI feels good, scriptable, discoverable, or Unix-friendly.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- danielsitek/skillstheir own version, first seen Nov 8, 2026
- TidalPaladin/skillstheir own version, first seen Nov 8, 2026
- notque/vexjoy-agenttheir own version, first seen Nov 7, 2026
- drinkspiller/skillstheir own version, first seen Nov 6, 2026
- yahyabedirhan/skillstheir own version, first seen Nov 1, 2026
- damacus/agent-skillstheir own version, first seen Oct 29, 2026
Used with
Projects with it also use writing, research and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
alxyrginSkillwriting
Создание контента для личного бренда — статьи, посты, туториалы. Use when user asks to "напиши статью", "создай пост", "подготовь контент", "write article", "create content", or when task requires content creation for blogging, LinkedIn, Medium, or other publishing platforms.
Also in 3 projects that use this
NVIDIASkillresearch
Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.
Also in 3 projects that use this
SentrySkillreview
Fixture review skill.
Also in 3 projects that use this
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- vm0-ai/vm0★ 1.2ksame name
- notque/claude-code-toolkit★ 448same name
- notque/vexjoy-agent★ 448same name
- joelhooks/joelclaw★ 65same name
- tenstorrent/tt-studio★ 52same name
- z-Zihan/Evir★ 11same name
- magarcia/skills★ 4same name
- yahyabedirhan/skills★ 3same name
- damacus/agent-skills★ 2same name
- drinkspiller/skills★ 1same name
7 more not listed
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 repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- development/AGENTS.mdAGENTS.md
- codebase-landing-copySkill
- context-file-tuneupSkill
- course-notesSkill
- decision-recordsSkill
- feature-mapSkill
- github-pr-fixupSkill
- github-self-hosted-runnerSkill
- oss-marketingSkill
- oss-repo-readinessSkill
- session-log-auditSkill
- technical-manualSkill
- verify-bugSkill
- whiteboardSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. 0 are common, 21 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
21
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use this skill to make command-line programs feel humane, predictable, and composable.
- Distinctive: line 20
When designing or reviewing a CLI, separate the work into four surfaces:
- Distinctive: line 35
Ask only the questions needed to avoid designing the wrong interface.
- Distinctive: line 62
Treat each invocation as part of a conversation.
- Distinctive: line 67
avoid raw stack traces unless a debug mode was requested
- Distinctive: line 72
Keep users informed during slow work.
- Distinctive: line 78
Prefer an argument parsing library for the implementation language.
- Very specific: line 84
Use clear verbs for subcommands: init, list, show, create, delete, sync, login.
- Very specific: line 86
Prefer standard flag names when a convention exists: --help, --version, --verbose, --quiet, --output, --format, --json, --force, --dry-run, …
- Distinctive: line 91
Prefer flags over positional args for anything optional, ambiguous, or likely to grow.
- Very specific: line 93
Keep positional args for required primary nouns where order is obvious: cp <source> <destination>.
- Distinctive: line 95
Avoid catch-all subcommands or ambiguous magic if the same behavior can be expressed as clear flags/subcommands.
- Distinctive: line 97
Keep changes additive where possible.
- Distinctive: line 100
When proposing a CLI shape, include a small command synopsis and 2-4 representative examples.
- Very specific: line 105
Every command and subcommand should support -h and --help.
- Very specific: line 116
If a command needs arguments and is run without them, show concise help rather than a bare error.
- Distinctive: line 126
Follow the stream contract:
- Distinctive: line 136
If stdout is a TTY, optimize for humans: headings, spacing, aligned columns, color with restraint.
- Distinctive: line 138
If stdout is not a TTY, disable decoration that would break piping unless explicitly requested.
- Distinctive: line 142
If a command expects piped input but stdin is interactive, print help or an explanatory message instead of hanging silently.
- Very specific: line 151
Keep JSON schemas stable. If human output changes, tell users to script against --json/--plain rather than default text.
- Distinctive: line 171
Do not silently autocorrect state-changing input.
- Distinctive: line 185
Never make prompts the only path.
- Distinctive: line 208
Use config files and environment variables for values that are stable across invocations, such as auth tokens, default org/project, region, …
- Very specific: line 220
Do not hide surprising behavior in config.
- Distinctive: line 226
When reviewing an existing CLI, report findings under these headings:
- Distinctive: line 237
Prefer specific rewrites over vague advice.
- Distinctive: line 242
Before calling a CLI design complete, verify:
“Common” is measured: kept by at least 6 in 10 of the 14 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 Design
Use this skill to make command-line programs feel humane, predictable, and composable. Ground decisions in the Command Line Interface Guidelines at https://clig.dev/: CLIs are text UIs for humans first, but they still need to behave as good parts in scripts, pipelines, CI, and larger automation systems.
The goal is not to copy old Unix behavior blindly. Prefer conventions because they make interfaces guessable; break them only when doing so clearly improves usability.
Operating model
When designing or reviewing a CLI, separate the work into four surfaces:
- Command shape — names, subcommands, positional args, flags, defaults.
- Conversation — help, errors, suggestions, prompts, confirmations, next steps.
- I/O contract — stdout, stderr, stdin, exit codes, TTY behavior, machine-readable modes.
- Safety and evolution — destructive actions, dry-runs, idempotence, config, env vars, deprecation.
A good answer should explicitly cover all four when the task is broad. For a narrow task, focus on the relevant surface but still check for knock-on effects.
First-pass questions
Ask only the questions needed to avoid designing the wrong interface. If the user's intent is already clear from code or context, inspect first and proceed.
- Who is the primary user: humans in a terminal, scripts/CI, or both?
- Is this a single-purpose command or a
git-style multitool with subcommands? - What is the primary output: human status, transformed data, files, remote state, or side effects?
- Which operations are destructive, expensive, remote, or surprising?
- What should be stable for automation: command names, flags, JSON schema, plain text, config, env vars?
Design principles
Human-first, script-friendly
Optimize default output for a human reading a terminal. Preserve scriptability
with explicit stable modes such as --json, --plain, or --quiet rather than
making the default terse and cryptic.
Say just enough
A CLI says too little when users wonder whether it is hung. It says too much when important information is buried in noisy logs. Show progress and next steps for long or multi-step operations, but keep final output scannable.
Be conversational
Treat each invocation as part of a conversation. Good CLIs help users recover:
- explain what went wrong in ordinary language
- show the invalid value or missing requirement
- suggest the likely correction or next command
- avoid raw stack traces unless a debug mode was requested
Be robust and feel robust
Make unexpected input graceful. Prefer idempotent operations where practical. Keep users informed during slow work. A CLI feels fragile when it hangs silently, prints alarming internals, or makes state-changing guesses without consent.
Command and flag design
Prefer an argument parsing library for the implementation language. It should handle parsing, help, validation, shell completion where possible, and spelling suggestions.
Design rules:
- Use clear verbs for subcommands:
init,list,show,create,delete,sync,login. - Prefer standard flag names when a convention exists:
--help,--version,--verbose,--quiet,--output,--format,--json,--force,--dry-run,--config. - Provide long versions for all flags. Use short flags only for common actions; do not exhaust the namespace with obscure one-letter flags.
- Prefer flags over positional args for anything optional, ambiguous, or likely to grow.
- Keep positional args for required primary nouns where order is obvious:
cp <source> <destination>. - Avoid catch-all subcommands or ambiguous magic if the same behavior can be expressed as clear flags/subcommands.
- Keep changes additive where possible. A flag, env var, config key, command name, and output schema are all public interfaces once released.
When proposing a CLI shape, include a small command synopsis and 2-4 representative examples.
Help and discoverability
Every command and subcommand should support -h and --help. For multitool
CLIs, also support help and help <subcommand> when feasible.
Top-level help should include:
- one-sentence purpose
- usage synopsis
- the most common commands or flags first
- 1-3 examples that mirror real tasks
- where to find full documentation or support
If a command needs arguments and is run without them, show concise help rather
than a bare error. Concise help should include what the command does, one or two
examples, common flags, and a pointer to --help.
Lead with examples because users copy examples before they read reference text. For complex workflows, tell a short story through examples that progress from simple to advanced.
Output contract
Follow the stream contract:
- Primary command output goes to stdout.
- Machine-readable output goes to stdout.
- Errors, warnings, progress, logs, and prompts go to stderr.
- Success exits
0; failure exits non-zero. Map distinct non-zero codes only when callers can act on them.
TTY behavior:
- If stdout is a TTY, optimize for humans: headings, spacing, aligned columns, color with restraint.
- If stdout is not a TTY, disable decoration that would break piping unless explicitly requested.
- Disable color when not writing to a terminal, and respect common controls such
as
NO_COLORwhere appropriate. - If a command expects piped input but stdin is interactive, print help or an explanatory message instead of hanging silently.
Machine-readable modes:
- Offer
--jsonfor structured automation when the data has nested shape or stable fields matter. - Offer
--plainor a simple tabular line format when users needgrep,awk, or shell-friendly output. - Keep JSON schemas stable. If human output changes, tell users to script
against
--json/--plainrather than default text.
Errors and recovery
Good error messages have four parts when possible:
- What failed.
- Why it failed.
- What the user can do next.
- A concrete command or flag to try.
Example pattern:
Error: could not find app "billing-api" in project "prod".
Run `tool apps list --project prod` to see available apps.Do not silently autocorrect state-changing input. If the likely fix is safe, suggest it. If it mutates state, ask interactively or require an explicit flag.
Safety for destructive operations
Destructive or expensive actions need friction proportional to risk.
- Mild local change: prompt interactively or require
--forcein non-interactive mode. - Broad or remote change: support
--dry-runand show what will change before applying it. - Severe deletion or irreversible action: require typing the resource name, or
support a scriptable
--confirm <name>flag.
Never make prompts the only path. Every interactive flow needs a non-interactive way to pass the same information via args, flags, config, env vars, or stdin.
Interactivity and automation
Prompt for missing input only when stdin is interactive. In scripts, CI, or piped use, fail with a clear message explaining the missing flag or value.
For multi-step workflows, print the next useful command after success. This teaches the interface and makes state visible:
Created project demo.
Next: tool deploy demo --env stagingSupport --verbose for more detail and --quiet for suppressing non-essential
messaging. Keep errors visible even in quiet mode unless the user explicitly
redirects them.
Configuration and environment
Use config files and environment variables for values that are stable across invocations, such as auth tokens, default org/project, region, or output preference.
Make precedence explicit in docs and help when relevant. A common order is:
- command-line flags
- environment variables
- project-local config
- user config
- defaults
Do not hide surprising behavior in config. If a command will affect remote state
or many files because of config, show the resolved target before acting or in
--dry-run.
Review checklist
When reviewing an existing CLI, report findings under these headings:
- Top issues — the highest-impact usability or automation problems.
- Command shape — names, args, flags, defaults, consistency.
- Help and discovery — help text, examples, suggestions, docs links.
- I/O and scriptability — stdout/stderr, exit codes, TTY behavior, JSON/plain modes.
- Errors and safety — recovery messages, prompts, destructive actions, dry-runs.
- Recommended changes — concrete command examples or implementation notes.
Prefer specific rewrites over vague advice. For example, write the improved error text, proposed help section, or new command synopsis.
Implementation checklist
Before calling a CLI design complete, verify:
cmd --helpandcmd -hwork.- Each subcommand has help and examples.
- No-arg behavior is helpful: concise help or intentional interactive mode.
- stdout contains only primary output; stderr contains logs/progress/errors.
- exit code is
0on success and non-zero on failure. - color/progress adapts to TTY and can be disabled.
- machine-readable output exists where users will script against results.
- destructive actions have confirmation,
--force,--confirm, or--dry-runas appropriate. - prompts are never required for automation.
- errors explain what happened and how to recover.
- docs state stability guarantees and deprecation path for interfaces.
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.

