Loading...
Loading...
Use this skill whenever reviewing, auditing, or grading a command-line tool for agent-friendliness - it runs a black-box test suite against a target CLI and reports per-rule pass/fail from the cli-for-agents 45-rule catalog. 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.
npx skill4agent add pproenca/dot-skills cli-review-runnerhelp-examples-in-helperr-non-zero-exit-codessafe-dry-run-flag--helpscripts/review.sh# 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-destructivebash scripts/review.sh --help--target <cli>
│
▼
[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| Probe | Rules tested | Coverage |
|---|---|---|
| P1 Non-interactive | | Run under |
| P2 Layered help | | Top-level line count; per-subcommand |
| P3 Help examples | | Grep each subcommand help for |
| P4 Actionable errors | | Invoke with bogus flag; grep stderr for fix + example; check for raw stack traces |
| P5 stderr channeling | | Error text must land on fd 2 |
| P6 Exit codes | | Usage error and runtime error must produce distinct non-zero codes |
| P7 stdin composition | | Grep help for |
| P8 Structured output | | |
| P9 Destructive safety | | Inspect destructive verbs' |
| P10 Command structure | | Uniform shape, |
config.json{
"timeout_seconds": 5,
"safe_verbs": ["list", "get", "show", "status", "describe", "help", "version", "config", "ls", "inspect"],
"destructive_verbs": ["delete", "drop", "destroy", "remove", "reset", "purge", "rm", "del"]
}--help</dev/null--include-destructivebash scripts/selftest.shResults: 8 passed, 0 failedscripts/lib/probes.sh| File | Purpose |
|---|---|
| scripts/review.sh | Main entry point - orchestrates probes, renders the report |
| scripts/render.sh | Output formatter: text / json / ndjson |
| scripts/selftest.sh | Sanity check against a deliberately-buggy mock CLI |
| scripts/lib/common.sh | Shared helpers: timeout, verb classifier, JSON escape, catalog loader |
| scripts/lib/probes.sh | Probe functions |
| references/rule-catalog.tsv | 45 rules from cli-for-agents, mapped to probes |
| references/workflow.md | Detailed probe-by-probe methodology, failure modes, extension guide |
| gotchas.md | Known edge cases discovered during use |
| config.json | Verb classifier lists and default timeout |