# Generate Skills

`mapbox generate-skills` writes the CLI's built-in command surface out as an [Agent Skill](https://code.claude.com/docs/en/skills), for a coding agent to read.

This is **not** the same as [`mapbox agent-skills`](https://docs.mapbox.com/ja/cli/reference/agent-skills/). `generate-skills` describes this CLI's own commands; `agent-skills` installs hand-written guidance about building with Mapbox in general. They share the destination flags below and nothing else.

-   [`mapbox generate-skills`](#mapbox-generate-skills)

## `mapbox generate-skills`

Produces a `mapbox-cli` skill directory — a `SKILL.md` index, an `AGENTS.md` carrying the same prose, and one reference page per command group listing every command with its arguments, the request it makes and a worked example. `.claude/skills` for Claude Code, `.agents/skills` for Codex.

The content is derived from the command tree this binary built, not from the API specs, so it describes exactly the commands that exist. Two runs of one binary write byte-identical files, so the result can be committed and a diff means the CLI changed. Nothing here reaches the network, and no token is needed.

With no flags, writes into the project directory of every agent whose home directory is present.

```sh
mapbox generate-skills
mapbox generate-skills --agent claude-code --service styles
```

**Parameters:**

| Parameter | Description |
| --- | --- |
| `--agent` | Agent to write skills for, repeatable. Defaults to whichever agents are installed. Values: `claude-code`, `codex`. |
| `--global` | Write to the agent's home directory, for every project, rather than this one. |
| `--dir` | Write to this directory instead, and nowhere else. |
| `--service` | Describe only this command group, repeatable. Defaults to all. |
| `--force` | Replace a skill directory holding files this command did not write. |
| `--dry-run` | List the files this would write, then exit without writing them. |