--- name: cli-review-runner description: Black-box CLI grading harness — runs a test suite against a target CLI and reports per-rule pass/fail from the cli-for-agents 45-rule catalog. Use when reviewing, auditing, or grading a command-line tool for agent-friendliness. Trigger even if the user doesn't explicitly say "agent-friendly" — apply whenever they ask "is mycli good for agents?", "review this CLI", "grade my cli against the rules", "check if this tool is safe to automate", or "audit command-line design". Companion to the cli-for-agents distillation skill. --- # cli-review-runner Automates the 10-item agent-friendliness audit from [cli-for-agents](../cli-for-agents/SKILL.md). Runs black-box probes against a target CLI and emits a structured report mapping each finding to a rule ID (e.g., `help-examples-in-help`, `err-non-zero-exit-codes`, `safe-dry-run-flag`). Default mode is read-only - probes never run destructive verbs with real arguments. ## When to Apply - User asks to **review** or **audit** a CLI for agent-friendliness, automation readiness, or CI use - User has just finished **building** a CLI and wants a pre-ship sanity check - User is **grading** their own or a third-party CLI against the cli-for-agents catalog - User is asking why a CLI is **hanging** an agent, **blowing up context**, or **failing to compose** in a pipeline - PR review for a CLI change - quickly regress-test the `--help`, errors, and dry-run flags ## How to Use The skill is orchestrated by **`scripts/review.sh`**. Point it at the target CLI (absolute path or PATH-resolvable name) and pick an output format. ```bash # Default: text table on stdout, exit 0 if all passed, 1 if any failed bash scripts/review.sh --target /usr/local/bin/mycli # Machine-readable output bash scripts/review.sh --target gh --format json bash scripts/review.sh --target kubectl --format ndjson # Supply subcommand list when auto-discovery misses them bash scripts/review.sh --target gh --subcommands pr,issue,repo # Preview what would run without touching the target CLI bash scripts/review.sh --target mycli --dry-run # Include risky probes on destructive verbs (off by default) bash scripts/review.sh --target mycli --include-destructive ``` See `bash scripts/review.sh --help` for the full flag list. ## Workflow Overview ``` --target │ ▼ [1] Validate target fail fast if path missing or not executable │ ▼ [2] Load rule catalog references/rule-catalog.tsv (45 rules) │ ▼ [3] Discover subcommands parse top-level --help (gh/kubectl/commander shapes) │ ▼ [4] Run probes P1..P10 each probe emits NDJSON findings to a temp file │ ▼ [5] Render report scripts/render.sh -> text | json | ndjson ``` Read [references/workflow.md](references/workflow.md) when you need the full probe-by-probe breakdown, failure modes, and how to extend the catalog. ## Probe Coverage | Probe | Rules tested | Coverage | |-------|-------------|----------| | P1 Non-interactive | `interact-no-hang-on-stdin`, `interact-no-input-flag`, `interact-flags-first`, `interact-detect-tty`, `interact-no-timed-prompts`, `interact-no-arrow-menus`, `input-no-prompt-fallback` | Run under `