Spec0docsCLI 0.7.0
Agents

Install the Spec0 skill for Claude Code

Install a Claude Code skill that makes the agent discovery-first — it reads your org's real OpenAPI specs through the Spec0 MCP tools instead of guessing endpoints, and uses the spec0 CLI to publish, lint, and mock.

The Spec0 skill is a Claude Code skill that teaches the agent when and how to use Spec0. Where the MCP server gives Claude Code the tools to read your APIs, the skill gives it the instinct to reach for them — so it looks up the real contract instead of inventing endpoints, fields, or payloads.

Already ran spec0 setup? The skill is installed. This page covers installing it on its own and what it does. If you haven't set anything up yet, start with Getting started.

Install

spec0 skill install

That writes the skill to ~/.claude/skills/spec0/SKILL.md. Restart Claude Code (or reload skills) to pick it up.

Install it into a specific repo instead — so it travels with the project for everyone who clones it — with --scope project (writes ./.claude/skills/spec0/SKILL.md):

spec0 skill install --scope project

spec0 skill path prints where it will be written without installing.

The skill drives Claude Code to the Spec0 MCP tools, so install the MCP server too: spec0 mcp install (or just run spec0 setup, which does both plus an auth check). Without the MCP server connected, the agent has the instinct but not the tools.

What it does

Once installed, Claude Code becomes discovery-first whenever a task touches an API:

  • Reads, doesn't guess. Before integrating with an internal API, the agent queries the Spec0 MCP tools (search_apis, search_operations, get_operation, get_api_spec) for the exact path, method, parameters, and schema — instead of hallucinating an endpoint.
  • Answers ownership & change questions. "Who owns this API?" (get_api_owner), "what changed since the last release?" (get_api_changelog), "is it healthy?" (get_api_health).
  • Uses the CLI for your own specs. When you publish, it steers you to the git-native flow — spec0 push / publish, spec0 lint --org-ruleset as a CI gate, spec0 mock create — rather than manual one-offs.

The org-scoped tools require sign-in (the browser OAuth flow your MCP client runs on first connect); until then the agent still has the public docs tools (search_docs, get_page, list_sections).

Example prompts it handles well

  • "Which of our APIs handles refunds, and what do I send to issue one?"
  • "Generate a typed client for the createCharge operation."
  • "Did the orders API have a breaking change in the last release? What do I need to update?"
  • "Publish this openapi.yaml under the payments team and gate it on lint."

What's next

  • API discovery — how the agent reaches your org's APIs over MCP.
  • Agents & MCP — the full integration surface (self-describing CLI, exit codes, MCP tools).
  • Getting started — the one-command spec0 setup that installs this skill, the MCP server, and verifies auth.
Was this helpful?

On this page