CLI Style — Agent Skill
An elegant interface for a more automated age.
The official Agent Skill for CLI Style — the 56-principle command-line design guide by Steve Francia (spf13), creator of Cobra, Viper, and Hugo.
Every command-line application now has two readers: a Human at an interactive terminal and an Agent (or CI pipeline/script) running commands on a person's behalf. This skill equips coding agents to design, build, audit, and refactor command-line tools in any language against all 56 principles—including the 4 ⚡ Divergent principles (#32, #33, #39, #40) where most otherwise-good applications break today.
Skill Catalog
| Skill | What it covers | Install |
|---|
cli-style | The 56 principles of dual-audience CLI design across 10 parts (Grammar, Convention, Outcome, Legibility, Output, Interaction, Failure, Time, Distribution, Trust), plus operational design/audit workflows, TTY detection matrix, standard flag vocabulary, and semantic exit codes. | sage add spf13/cli-style |
Install
Sage (.agents protocol — Claude, Gemini, Cursor, Copilot, Windsurf)
sage add spf13/cli-style
Don't have sage yet? Install it with go install github.com/spf13/sage@latest.
Vercel / AgentSkills CLI (npx skills)
npx skills add spf13/cli-style
Claude Code Plugin Marketplace
/plugin marketplace add spf13/cli-style
/plugin install cli-style@cli-style
Manual / Symlink (.agents/skills)
Clone this repository and link cli-style into your agent's skills directory.
On macOS and Linux:
ln -s "$PWD/cli-style" "$HOME/.agents/skills/cli-style"
On Windows (PowerShell):
New-Item -ItemType Junction -Path "$env:USERPROFILE\.agents\skills\cli-style" -Target "$PWD\cli-style"
What This Skill Teaches Your Agent
- Part I · Grammar (
01–07): Sentence structure (app <noun> <verb> <target> [--modifiers]), subcommands over mode flags, typeable application names, few verbs across many nouns, single positional target, and -- handling.
- Part II · Convention (
08–15): Zero-flag default path, universal flag meanings, long flags for scripts and short flags for hands, the 6-level configuration precedence contract, XDG paths, running with no config file, and stdin/stdout composition.
- Part III · Outcome (
16–21): Outcome-oriented flag names (--preview over --dry-run, --overwrite over --force), single-word names, concrete state diffs, idempotency, 4-tier destructive confirmation (--yes vs --confirm <id>), and read-only safety.
- Part IV · Legibility (
22–27): Dynamic shell completions, self-documenting command trees, real examples in every --help, exit 0 on help vs 2 on misuse, and --json support on version and help.
- Part V · Output (
28–37): Strict stdout/stderr separation, token-conscious output budgets, --json as a first-class mode, quiet success, ⚡ #32 Color is an enhancement, ⚡ #33 Progress on stderr only for a TTY, responsive status on slow operations, zero-match empty states, line-oriented records, and streaming over buffering.
- Part VI · Interaction (
38–41): Flag equivalents for every prompt, ⚡ #39 Independent per-stream TTY detection, ⚡ #40 Prompt at a TTY / fail fast in automation, and exiting promptly and cleanly on interrupt (130/143).
- Part VII · Failure (
42–48): Precondition checks and typo suggestions, actionable recovery commands in every error, semantic exit codes (0–5), one-line errors with detail underneath, structured JSON errors on stderr, crash reports that own the bug, and atomic writes.
- Part VIII · Time (
49–51): Additive evolution, dated deprecations on stderr, and machine formats as the strictest promise.
- Part IX · Distribution (
52–53): One self-contained binary, and removal as easy as installation.
- Part X · Trust (
54–56): Zero secrets in argv/flags (--token-stdin, --token-file, env), network transparency (--offline, DO_NOT_TRACK=1), and strict filesystem boundaries.
Companion Go Skills
Building your CLI in Go with Cobra and Viper? Install spf13/go-skills alongside cli-style for idiomatic Go and factory-built Cobra command architecture:
sage add spf13/go-skills
License
© 2026 Steve Francia (spf13), spf13 labs LLC, and contributors.