Individual skill
cli-for-agents
Designing CLIs that AI agents will invoke — non-interactive flags, layered --help with examples, stdin/pipeline composition, actionable errors, idempotency, dry-run, destructive-action safety, and predictable command structure. Use when designing, building, or reviewing a command-line tool that AI agents or automation will invoke. Trigger even if the user doesn't explicitly say "agent-friendly" — apply whenever they are writing `--help` text, adding a new subcommand, designing error messages, or reviewing a CLI's UX.
skills/.experimental/cli-for-agents/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- Yes
- Observed behavior
- Not checked yet
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: codex
- design Derived category
- writing Derived category
- design-interface Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
AGENTS.mddoc · 10,421 bytesSKILL.mdcore · 10,358 bytesassets/templates/_template.mddoc · 1,677 bytesmetadata.jsonasset · 1,464 bytesreferences/_sections.mddoc · 2,242 bytesreferences/err-actionable-fix.mddoc · 1,577 bytesreferences/err-exit-fast-on-missing-required.mddoc · 1,943 bytesreferences/err-include-example-invocation.mddoc · 1,886 bytesreferences/err-no-stack-traces-by-default.mddoc · 2,328 bytesreferences/err-non-zero-exit-codes.mddoc · 3,683 bytesreferences/err-stderr-not-stdout.mddoc · 1,729 bytesreferences/help-examples-in-help.mddoc · 2,028 bytesreferences/help-flag-summary.mddoc · 1,925 bytesreferences/help-layered-discovery.mddoc · 2,043 bytesreferences/help-no-flag-required.mddoc · 2,054 bytesreferences/help-per-subcommand.mddoc · 2,084 bytesreferences/help-suggest-next-steps.mddoc · 1,899 bytesreferences/idem-create-or-skip.mddoc · 2,330 bytesreferences/idem-retry-safe.mddoc · 2,104 bytesreferences/idem-stable-identifiers.mddoc · 4,230 bytesreferences/idem-stable-output-on-skip.mddoc · 2,704 bytesreferences/idem-state-reconciliation.mddoc · 2,366 bytesreferences/input-accept-stdin-dash.mddoc · 1,808 bytesreferences/input-env-var-fallback.mddoc · 2,078 bytesreferences/input-flags-over-positional.mddoc · 2,332 bytesreferences/input-no-prompt-fallback.mddoc · 2,446 bytesreferences/input-stdin-for-secrets.mddoc · 2,597 bytesreferences/interact-detect-tty.mddoc · 2,533 bytesreferences/interact-flags-first.mddoc · 2,545 bytesreferences/interact-no-arrow-menus.mddoc · 2,244 bytesreferences/interact-no-hang-on-stdin.mddoc · 1,948 bytesreferences/interact-no-input-flag.mddoc · 1,874 bytesreferences/interact-no-timed-prompts.mddoc · 1,878 bytesreferences/output-bounded-by-default.mddoc · 2,997 bytesreferences/output-json-flag.mddoc · 2,720 bytesreferences/output-machine-ids-on-success.mddoc · 2,285 bytesreferences/output-ndjson-streaming.mddoc · 2,990 bytesreferences/output-no-decorative-only.mddoc · 2,231 bytesreferences/output-one-record-per-line.mddoc · 2,552 bytesreferences/output-respect-no-color.mddoc · 2,303 bytesreferences/safe-confirm-by-typing-name.mddoc · 2,391 bytesreferences/safe-crash-only-recovery.mddoc · 2,142 bytesreferences/safe-dry-run-flag.mddoc · 2,517 bytesreferences/safe-force-bypass-flag.mddoc · 2,147 bytesreferences/safe-idempotent-cleanup.mddoc · 2,165 bytesreferences/safe-no-prompts-with-no-input.mddoc · 2,172 bytesreferences/struct-flag-order-independent.mddoc · 2,569 bytesreferences/struct-no-hidden-subcommand-catchall.mddoc · 2,313 bytesreferences/struct-resource-verb.mddoc · 2,326 bytesreferences/struct-standard-flag-names.mddoc · 2,854 bytes
Read excerpt
# Agent-Friendly CLI Design Best Practices
Prescriptive design and review standards for Command-Line Interface Design targeting AI agents and scripts, not just humans typing at a prompt. Human-oriented CLIs often block agents: interactive prompts, huge upfront docs, help text without copy-pasteable examples, error messages without fixes, no dry-run mode. This skill prioritizes rules by blast radius — from "the agent cannot use this CLI at all" (CRITICAL) to "the agent has to read help one extra time" (MEDIUM).
Use this skill both when **building** a new CLI and when **reviewing** an existing one for agent-friendliness.
This skill contains **45 rules across 8 categories**.
## When to Apply
Reference these guidelines when:
- Writing `--help` text for any subcommand
- Designing new flags, arguments, or subcommands
- Crafting error messages or exit codes
- Adding destructive operations that need dry-run or confirmation