Skip to content
Development
Skill

/api-doc-review

Use when API documentation may have drifted from the implementation -- endpoints changed without a spec update, integration partners report mismatches, or a PR touches routes, params, or response shapes.

From plugin
agent-powerups
8114 skills46 agents54 commands

Claude Code

$ npx -y skills add yeaight7/agent-powerups --skill api-doc-review --agent claude-code

SKILL.md

api-doc-review.SKILL.md
name: api-doc-review
description: Use when API documentation may have drifted from the implementation -- endpoints changed without a spec update, integration partners report mismatches, or a PR touches routes, params, or response shapes.

Purpose

Outdated API documentation causes integration failures. The code is the source of truth, and the docs must match. Review the docs against the actual route handlers and fix mismatches immediately — do not defer.

When to Use

  • A PR adds or modifies routes, request/response types, or error handling
  • Consumers report behavior that contradicts the documented API
  • Before publishing or versioning an OpenAPI/Swagger spec

Inputs

  • The API documentation (OpenAPI/Swagger spec, or inline route docs)
  • The route handler source, types/validation schemas, and API tests

Workflow

1. **Inventory both sides.** List documented endpoints and implemented routes, then diff the two lists:

   rg -n "^  /" openapi.yaml                                   # documented paths
   rg -n "router\.(get|post|put|patch|delete)\(" src/          # implemented routes
   git diff --name-only origin/main...HEAD -- "src/routes/"    # what changed recently

2. **Verify each endpoint** (e.g., POST /users) against its route definition: path, method, and auth requirements — route middleware vs the documented security scheme.

3. **Verify parameters.** All required request parameters (body, query, params) must be documented with correct types. Compare against the handler's validation schema or type definitions, not against the old doc.

4. **Verify responses.** All possible response status codes (200, 400, 404, 500) and their payloads must match the actual error handlers and return statements:

   rg -n "res\.status\(|throw new .*Error" src/routes/   # codes actually produced

5. **Cross-check examples against tests.** Documented request/response examples should match what the API tests actually send and assert.

6. **Fix immediately.** If there is a mismatch, update the OpenAPI spec or inline documentation now. Do not defer it.

Output

  • Per-endpoint verdict: documented vs actual (path, method, auth, params, status codes, examples)
  • Spec/doc fixes applied, or a mismatch list with file:line where fixing needs owner input

Verification

  • [ ] Every changed route compared against its documented endpoint
  • [ ] Parameter names, types, and required flags match the handler's validation
  • [ ] Documented status codes match the codes actually returned or thrown
  • [ ] Auth requirements per endpoint match the route middleware
  • [ ] No mismatch deferred — fixed or explicitly escalated

Failure Modes

  • **Doc-first trust** — assuming the spec is right; the code is the source of truth.
  • **Happy-path-only review** — checking 200 responses while error codes drift unchecked.
  • **Silent auth drift** — an endpoint gains an auth requirement the docs never mention.
  • **Deferred fixes** — "will update the spec later" is how the drift started.
Read more
@yeaight7
Ships withagent-powerups

Curated power-ups for coding agents: skills, slash commands, MCP configs, hooks, AGENTS.md templates, and workflows for serious software engineering. Claude Code, Codex, Antigravity CLI, Cursor and more

8114 skills46 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
8
Star history of yeaight7/agent-powerups on GitHub, a chart by star-history.com

Other skills on agent-powerups.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills13d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react4d252k
@facebook@facebookInstall Skill

Questions about api-doc-review.

Which coding agents can use api-doc-review?
api-doc-review installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.