cli-audit
Audit an existing CLI against cli-build: how well an agent can operate it and how well a human can read it. Use when the user…
Design and build a CLI that an AI agent can operate safely and a human can supervise. Use when the user wants to build a CLI, wrap an API in a command-line tool, build a CRUD or local-first tool over a database or filesystem the user already owns, add --json or --dry-run to an
$ npx -y skills add crafter-station/skills --skill cli-build --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/cli-buildContext preview
The summary Claude sees to decide when to auto-load this skill.
Design and build a CLI that an AI agent can operate safely and a human can supervise. Use when the user wants to build a CLI, wrap an API in a command-line tool, build a CRUD or local-first tool over a database or filesystem the user already owns, add --json or --dry-run to an
name: cli-build version: 0.12.0 description: "Design and build a CLI that an AI agent can operate safely and a human can supervise. Use when the user wants to build a CLI, wrap an API in a command-line tool, build a CRUD or local-first tool over a database or filesystem the user already owns, add --json or --dry-run to an existing CLI, design a trust ladder or approval gate for risky commands, wrap an async API so agents do not write their own poll loop, or decide how to distribute a CLI (npm, native binary, source). Runs on its own when the contract is yours to define; follows a surface-recon report when the target is someone else's service."
Build a CLI whose primary user is an agent and whose supervisor is a human. That inverts the usual defaults: machine-readable output is not a flag you add later, prompts are a failure mode in non-interactive contexts, and every write leaves a receipt.
Every command you write reads or mutates something with a shape. This phase names that shape's owner, because it decides whether you go find the contract or write it.
**Discovered.** The CLI wraps a system you do not control: a third-party API, a login-walled portal, a device, an undocumented file format. The contract exists and is unverified, so guessing at it wastes more time than mapping it. **Run `surface-recon` first** and start from its report.
**Defined.** You own the model: CRUD over your own database, a scaffolder, a local transform, a wrapper around a library whose types you already have. There is nothing to reverse-engineer, so `surface-recon` has no input and skipping it costs nothing. **Write the contract instead**, in one pass before Phase 1: the entities, their fields and types, the operations allowed on each, and what makes a write irreversible. That artifact is what a recon report would have given you.
**Mixed.** A CLI over your own database that also calls a payment provider is discovered at the boundary and defined in the middle. Recon only the discovered part; do not let one external call turn the whole build into a recon job.
Say which one this is out loud before Phase 1, and write it into `friction.md`. An unstated classification defaults to discovered, which is how a defined build ends up blocked waiting for a report nobody can produce.
**Done when:** the origin is named, and either a recon report exists or the entities and operations are written down.
**Open `friction.md` next to the code now and append as you go.**
A block you rejected and why, a convention that turned out wrong for this domain, a reference that was thin. It folds into the case at the end, and it is what corrects this skill: seven claims inherited from an older version were false against the source, and they surfaced only because someone wrote down that they did not match.
**Every CLI, no exceptions:**
Those are now enforced as tests rather than trusted as prose, in the `surfacer` repository, which compiles CLIs from a recon descriptor. Each test names the rule it checks so the two read together.
It is worth knowing what that exercise found, because the same shape is likely wherever this list is only written down. Encoding the rules against the generator caught three violations, including the two most valuable defaults here. Then applying the identical list to the generator's own CLI caught four more, in the tool that had just been taught to enforce them. A compiler that emits agent-first CLIs while not being one is the easiest version of this to miss, because every test was passing and every test was pointed at the output.
So the list binds twice, and the tests live in two files only because a test cannot invoke a binary from another crate: `crates/surfacer-emit-cli/tests/agent_first_rules.rs` for what is generated, `crates/surfacer-app/tests/agent_first_rules.rs` for the tool doing the generating. If you build a tool that produces CLIs, check the producer against this list too. Prose does not fail a build, and a rule you enforce on others is the one you stop checking on yourself.
**When the domain has real consequences** (money, irreversible writes, third-party side effects, personal data):
**When the API is asynchronous:** `--wait` on every submitting command, backed by a job ledger that survives a killed poll. Handing the poll loop to the caller makes the agent write backoff logic it will get subtly wrong. See [compounding-surface.md](references/compounding-surface.md).
**Size the friction to the damage, and "none" is a real size.** Ask what one wrong call costs, then choose. A read-only CLI over a public dataset earns `--json` and a `schema` command and stops there: nobody loses anything by running the query twice. Intent tokens are for a wrong call that costs money. Adopting the full ladder for a tool that cannot
Agent skills extracted from real work. Each one shipped something first.
Audit an existing CLI against cli-build: how well an agent can operate it and how well a human can read it. Use when the user…
Generate OG images and favicon based on project branding. Use when: (1) user needs social media preview images for their project,…
Set up hierarchical Intent Layer (AGENTS.md files) for codebases. Use when initializing a new project, adding context…
Release a new version of an Obsidian community plugin without forgetting steps. Use when: (1) user says "release the plugin",…
Deprecated. Auto-generate Claude skills from documentation URLs using Firecrawl agent. Use when user wants to create a skill from…
Read-only audit of a developer machine for npm/PyPI supply-chain compromise. Checks for known IOCs from the 2025-2026 wave —…