agent-clilisted
Install: claude install-skill wagneripjr/skills
# Agent-Friendly CLI Design & Evaluation
Build command-line tools that AI agents consume reliably and humans use comfortably. These goals are orthogonal — a CLI can serve both audiences from the same command surface by detecting context (TTY vs pipe) and adapting output.
**Build mode** (default) — walk through Phases 1-6 to construct an agent-first CLI from scratch or retrofit an existing one. **Evaluate mode** — activated when the user says "score", "evaluate", "audit", or "rate" — jump to Phase 7 to score a CLI on the 7-axis rubric.
This skill targets **command-based CLIs** (like `git`, `docker`, `gh`, `kubectl`) — tools with subcommands, flags, and structured output. Not for full-screen TUI applications, dashboards, or GUI tools.
## Quick Decision Guide
| Need | Approach | Reference |
|------|----------|-----------|
| Design command grammar and hierarchy | Noun-verb or verb-noun pattern, 2-3 levels max | [command-design.md](references/command-design.md) |
| Add `--json` flag with consistent envelope | `{ "status", "data", "error", "meta" }` on every command | [output-design.md](references/output-design.md) |
| Stream results without buffering | NDJSON — one JSON object per `\n`-separated line | [output-design.md](references/output-design.md) |
| Reduce agent token consumption | `--fields`, `--quiet`, `--limit`, `--summary` flags | [output-design.md](references/output-design.md) |
| Accept raw JSON payloads | `--data '{"key":"val"}'` or stdin pipe alongside flags | [in