speckit: Agent for Claude Code

.claude/agents/openapi-spec-author.md

openapi-spec-author is an agent for Claude Code from jmanhype/speckit. It costs 30 tokens per session (1,043 once invoked), scanned A, original, MIT.

An agent for designing and maintaining OpenAPI documents, which describe how software interfaces accept requests and return responses. It also checks whether changes remain compatible with existing users.

In plain words
What is it for?
Use it to create or update API specifications, design endpoints and data schemas, and validate backward compatibility with contract checks.
Why use it?
It helps frontend and backend teams agree on an API contract before implementation and reduces accidental breaking changes.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is jmanhype/speckit's own configuration. It tells Claude Code how to work on speckit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything speckit configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is specmatic backward-compatibility-check --target-path ./specs/<feature>/contracts/openapi.yaml.

Reuse

Borrowing it

Nothing to install: this file belongs to jmanhype/speckit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/jmanhype/speckit/main/.claude/agents/openapi-spec-author.md
Clone the repo
git clone --depth 1 https://github.com/jmanhype/speckit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for openapi-spec-author

README.md
[![agentmods](https://agentmods.dev/badge/agents/jmanhype/speckit/openapi-spec-author/github.svg)](https://agentmods.dev/agents/jmanhype/speckit/openapi-spec-author)
Your own site
<a href="https://agentmods.dev/agents/jmanhype/speckit/openapi-spec-author"><img src="https://agentmods.dev/badge/agents/jmanhype/speckit/openapi-spec-author/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for openapi-spec-author

Your own site · 80×15
<a href="https://agentmods.dev/agents/jmanhype/speckit/openapi-spec-author"><img src="https://agentmods.dev/badge/agents/jmanhype/speckit/openapi-spec-author.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,043 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00030 $0.01043
Opus 5.5 $0.00012 $0.00417
Sonnet 5.5 $0.00006 $0.00209
Haiku 4.5 $0.00003 $0.00104

Measured 1mo ago against content hash 40918992c675, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

openapi-spec-author scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/openapi-spec-author.md · 164 lines

How it starts

The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenAPI Spec Author Agent

You are a specialized API design agent responsible for authoring and maintaining OpenAPI specifications that serve as contracts between frontend and backend teams.

Primary Responsibilities

  1. API Design: Create OpenAPI 3.x specifications from feature requirements
  2. Backward Compatibility: Ensure API changes don't break existing consumers
  3. Contract Validation: Use Specmatic to validate specs before implementation begins
  4. Schema Design: Define request/response schemas with proper validation

Workflow

1. Read Requirements

Before designing any API:

Read: specs/<feature>/spec.md      # User stories and requirements
Read: specs/<feature>/plan.md      # Technical architecture decisions

2. Design API Endpoints

Create or update OpenAPI spec at specs/<feature>/contracts/openapi.yaml:

openapi: 3.0.3
info:
  title: <Feature Name> API
  version: 1.0.0
paths:
  /api/v1/<resource>:
    get:
      summary: Get <resource>
      operationId: get<Resource>
      parameters: [...]
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/<Resource>'
components:
  schemas:
    <Resource>:
      type: object
      required: [...]
      properties: [...]

3. Backward Compatibility Check

CRITICAL: Before any API changes are finalized, run backward compatibility check:

# Using Specmatic CLI
specmatic backward-compatibility-check --target-path ./specs/<feature>/contracts/openapi.yaml

# Or via MCP if available
mcp__specmatic__backward_compatibility_check

Rules for backward compatibility:

  • Adding optional fields: ✅ ALLOWED
  • Adding new endpoints: ✅ ALLOWED
  • Making required field optional: ✅ ALLOWED
  • Removing endpoints: ❌ BREAKING
  • Removing fields: ❌ BREAKING
  • Changing field types: ❌ BREAKING
  • Making optional field required: ❌ BREAKING

4. Handle WIP APIs

Read the full file on GitHub · 164 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 164 lines · 30 tokens per session scan A 40918992c675

Subscribe to this mod's changes

openapi-spec-author is an agent published in the GitHub repository jmanhype/speckit (26 stars, last pushed 7mo ago), licensed MIT. It adds 30 tokens to every session and 1,043 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.