# CLI build

> CLI build is an open-source agent skill for developer tools. Guides an agent through building CLIs it can run safely and a human can supervise. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/crafter-station/skills/tree/main/skills/cli-build
- **Repository:** https://github.com/crafter-station/skills
- **GitHub stars:** 115
- **License:** MIT
- **Skill name:** cli-build
- **Collection:** https://github.com/crafter-station/skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill walks an agent through designing and building a command-line tool whose main user is another AI agent and whose supervisor is a person. It starts by deciding whether the CLI's contract is being discovered from a service the author does not control or defined by the author's own data model, and it sets the distribution target (source, npm, or native binary) before any code is written.

The workflow covers a noun-verb command surface, a written JSON output contract per command, machine-readable output by default when stdout is not a terminal, and a separate human-readable view. Where the domain carries real consequences such as money, irreversible writes or third-party side effects, it adds a risk-graded trust ladder, dry-run modes, and audit records written before network calls. It also includes checks that safety features named in help text are actually wired, and a verification pass that runs the installed binary and reads its output.

The skill is written as a set of phases with reference files for trust ladders, JSON contracts, testing and async job handling. It references an external TypeScript block library and does not include scripts of its own. Using it means working in a codebase where you can create and run a CLI, and it expects the user to say whether the project is an MVP or a fuller polished tool.

## When your agent uses it

> 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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/crafter-station/skills/tree/HEAD/skills/cli-build)
- [License: MIT](https://github.com/crafter-station/skills/tree/HEAD/skills/cli-build)

## Features

- **Contract origin check:** Decides whether the CLI wraps an external system needing reconnaissance or a model the author defines.
- **Agent-first output defaults:** Covers JSON output, non-blocking prompts, structured errors, schema introspection and clean stdout.
- **Risk-graded trust ladder:** Classifies commands by damage, with dry-run, approval gates and pre-call audit logging where it matters.
- **Distribution target selection:** Chooses between running from source, publishing to npm or compiling a native binary.
- **Async job handling:** Adds a wait option backed by a job record so agents do not write their own polling loops.
- **Wiring and verification checks:** Requires that each named safety feature has a call site and that the installed binary is tested by name.

## Good for

- Build a CLI that wraps a third-party API so an agent can call it
- Add --json and --dry-run flags to an existing command-line tool
- Create a local CRUD tool over a database the user already owns
- Design an approval gate for risky commands an agent might run
- Package a CLI for npm or as a standalone binary

## Install

### Claude Code

This skill ships in the `candidates` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add crafter-station/skills
/plugin install candidates@crafter-station-skills
```

Or copy only this skill to `~/.claude/skills/cli-build`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/crafter-station/skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/cli-build &&
cp -R "$tmp/skills/cli-build" ~/.claude/skills/cli-build &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/cli-build` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/cli-build` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/crafter-station/skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/cli-build &&
cp -R "$tmp/skills/cli-build" ~/.agents/skills/cli-build &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/cli-build` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/cli-build` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/crafter-station/skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/cli-build &&
cp -R "$tmp/skills/cli-build" ~/.cursor/skills/cli-build &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/cli-build` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/crafter-station/skills.git --path skills/cli-build
```

Or copy the folder to `~/.gemini/skills/cli-build` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/cli-build`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/crafter-station/skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/cli-build &&
cp -R "$tmp/skills/cli-build" ~/.copilot/skills/cli-build &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/cli-build` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/crafter-station/skills.git
```

Then copy `skills/skills/cli-build` into your agent's skills folder as `cli-build`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should CLI build be used?

It triggers when a user wants to build a CLI, wrap an API in one, add --json or --dry-run to an existing CLI, design an approval gate, wrap an async API, or decide how to distribute a CLI.

### Does the skill need reconnaissance first?

Only when the CLI wraps a system the author does not control. For a CLI whose contract the author defines, the skill says to write the contract instead.

### Does the skill include scripts?

No. The folder contains a SKILL.md with reference files and no scripts.

### Are there required tools or allowed tools?

The frontmatter does not set allowed tools. The skill recommends an external TypeScript block library called cligentic for CLI infrastructure but does not require it.

### How do I install CLI build in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/cli-build to use it in all your projects, or to .claude/skills/cli-build in one project. Or install the candidates plugin, which includes it: /plugin marketplace add crafter-station/skills, then /plugin install candidates@crafter-station-skills.

### Does CLI build run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use CLI build?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to CLI build?

The closest alternatives to CLI build are CLI creator, CLI audit, Agent CLI, Domain CLI and Principle build the lever.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [CLI creator](https://ai-powered.com/skills/cli-creator): CLI creator is a free agent skill for developer tools.
- [CLI audit](https://ai-powered.com/skills/cli-audit): CLI audit is an open-source agent skill for developer tools.
- [Agent CLI](https://ai-powered.com/skills/agent-cli): Agent CLI is an open-source agent skill for developer tools.
- [Domain CLI](https://ai-powered.com/skills/domain-cli): Domain CLI is an open-source agent skill for developer tools.
- [Principle build the lever](https://ai-powered.com/skills/principle-build-the-lever): Principle build the lever is an open-source agent skill for developer tools.
- [Go CLI](https://ai-powered.com/skills/go-cli): Go CLI is an open-source agent skill for developer tools.
- [Agent skill stack](https://ai-powered.com/skills/agent-skill-stack): Agent skill stack is an open-source agent skill for developer tools.
- [Writing agents](https://ai-powered.com/skills/writing-agents-xiaolai): Writing agents is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/cli-build
