write-cli
Installation
SKILL.md
write-cli
Apply systematic CLI design checks before writing or reviewing a command-line tool. Every rule is a concrete yes/no question — answer it, don't rationalize around it.
Signature Shape
- Flags over positional args. Max 2 positional args, and only when the action is primary and memorable (
cp <src> <dst>). Everything else gets--long-name. - Full names for every flag.
-halways has--help.-valways has--verbose. Short forms are for muscle-memory flags only. - No positional args with mixed meanings. If you have
cmd <file> <name>, add a third thing, or the second arg means two different things across subcommands — redesign to flags. - Order-independent.
myapp --verbose subcmdandmyapp subcmd --verbosemust both work.
Naming
- Reuse flag names across subcommands.
--jsonmeans JSON output everywhere.--repomeans a repository everywhere. Never use--jsonon one subcommand and--format jsonon another. - Follow the standard flag table.
-a/--all,-d/--debug,-f/--force,-h/--help,--json,--no-input,-o/--output,-p/--port,-q/--quiet,-u/--user,--version. Deviate only with a documented reason. - Verb consistency across resource subcommands. Use the same verb set everywhere:
list,get,create,update,delete. If one subcommand usesremoveand anotherdelete, pick one.