Generate Skills
mapbox generate-skills writes the CLI's built-in command surface out as an
Agent Skill, for a coding agent
to read.
This is not the same as mapbox 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
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 and most other agents; see
Where skills go for the full
list.
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, so a run usually writes several places, all
named in the output. With none present it fails with no_agent_detected.
mapbox agent-skills uninstall mapbox-cli removes every copy again. Reach
for that rather than deleting the directories by hand: it knows every place
this command writes to.
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. Takes the same fifteen agents as agent-skills, such as claude-code, codex, cursor, or gemini-cli. |
--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. |