MCPInstall

api-doc-generator

Generate or update evidence-backed API documentation from OpenAPI specifications, framework routes, controllers, request/response models, validation rules, and tests. Use when the user explicitly asks for API or interface documentation, route inventory, endpoint reference, OpenAPI-derived docs, or synchronization between code and API docs. Supports OpenAPI-first projects and framework-specific discovery for Spring, FastAPI, NestJS, Express, and Gin; do not use for generic product documentation.

Installs
87
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/full-stack-skills/document-skills --skill api-doc-generator
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads api-doc-generator automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

API Documentation Generator

Document APIs from authoritative artifacts and distinguish confirmed facts from inference.

Source priority

Use the strongest available source in this order:

  1. Checked-in OpenAPI/Swagger contract and generated schema.
  2. Framework route definitions and annotations.
  3. Request/response models and validation rules.
  4. Authentication, middleware, exception handling, and error catalogs.
  5. Integration and contract tests.
  6. Runtime observations explicitly authorized by the user.

When sources disagree, report the mismatch instead of silently choosing one.

Framework routing

Read only the relevant reference:

  • OpenAPI-first: references/openapi-first.md
  • Java/Kotlin Spring: references/spring.md
  • Python FastAPI: references/fastapi.md
  • TypeScript NestJS: references/nestjs.md
  • JavaScript/TypeScript Express: references/express.md
  • Go Gin: references/gin.md

Use references/scan-and-generate-example.md only when a complete worked example is useful.

For a checked-in OpenAPI document, generate a deterministic inventory before drafting prose:

python3 scripts/inventory_openapi.py path/to/openapi.yaml --output docs/api-inventory.md

The script refuses to overwrite an existing output unless --force is explicitly provided.

Workflow

1. Inspect

  1. Detect the project framework, modules, existing API contracts, and documentation convention.
  2. Determine the requested scope from the user's wording; infer the whole API only when no narrower scope exists.
  3. Locate route registration, base paths, version prefixes, security middleware, models, validators, error handling, and tests.
  4. Identify generated files so they are not mistaken for the source of truth.

2. Build an endpoint inventory

For each endpoint capture:

FieldRequirement
Method and pathResolve all prefixes and route groups
Operation identityHandler/controller and stable operation name
PurposeDerive from code/comments; mark inference
AuthenticationScheme, scopes/roles, and public exceptions
RequestPath/query/header/cookie/body fields and validation
ResponseStatus codes, content types, schema, and wrappers
ErrorsOnly errors supported by handlers, middleware, tests, or catalogs
EvidenceContract or source location used

Do not fabricate example values, undocumented error codes, required flags, or response fields.

3. Resolve schemas

  • Follow nested model references and generic response wrappers.
  • Preserve nullable, optional, enum, format, range, and length constraints.
  • Detect pagination and list-envelope conventions.
  • Show recursive or polymorphic schemas explicitly.
  • Redact secrets and personal data from examples.

4. Generate the document

Use the repository's existing convention. If none exists, copy one template from assets/templates/ and write to a proposed path under docs/. Before writing, report the target and whether it already exists.

For every endpoint include:

  1. Summary and evidence status
  2. Method and full path
  3. Authentication/authorization
  4. Parameters and request body
  5. Responses and supported errors
  6. Minimal valid examples
  7. Source location

5. Validate

  • Compare documented routes with the discovered inventory.
  • Verify path variables and request fields against validators/models.
  • Verify response and error status codes against code or contract.
  • Check internal links and anchors.
  • Mark unresolved conflicts and inferred fields.
  • Never claim runtime verification unless the API was actually run.

Evidence labels

Use these labels when certainty matters:

  • 已确认:契约 — present in the checked-in API contract.
  • 已确认:源码 — present in route/model/handler source.
  • 已确认:测试 — exercised by a test.
  • 推断 — reasonable but not explicitly specified.
  • 待确认 — conflicting or missing evidence.

Completion contract

Report the generated/updated file, documented endpoint count, authoritative sources used, contract/source mismatches, inferred fields, and endpoints skipped because evidence was insufficient.

FAQ

What does the api-doc-generator skill do?

Generate or update evidence-backed API documentation from OpenAPI specifications, framework routes, controllers, request/response models, validation rules, and tests. Use when the user explicitly asks for API or interface documentation, route inventory, endpoint reference, OpenAPI-derived docs, or synchronization between code and API docs. Supports OpenAPI-first projects and framework-specific discovery for Spring, FastAPI, NestJS, Express, and Gin; do not use for generic product documentation.

How do I install api-doc-generator?

Run npx skills add https://github.com/full-stack-skills/document-skills --skill api-doc-generator in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/api-doc-generator/ (personal) or .claude/skills/api-doc-generator/ (project).

Which AI agents can use api-doc-generator?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is api-doc-generator safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains api-doc-generator?

It is published by full-stack-skills in full-stack-skills/document-skills. It has 87 recorded installs.

More from full-stack-skills/document-skills

View all →

mermaid

full-stack-skills/document-skills

Open the skill to read its SKILL.md instructions.

Docs & Writing83 installs

full-stack-doc

full-stack-skills/document-skills

Scaffold, adapt, validate, and maintain example-rich full-stack product documentation: 10 product-level documents, 7 version documents, optional module PRD/Stitch/UI triplets, 5 delivery documents, and a detailed project README template family. Use when users ask to initialize a documentation repository, create product or version plans, write PRDs and architecture/UI documents, preserve and adapt detailed examples, audit document structure, or improve an existing product-docs tree, including Chinese requests such as 初始化文档、产品文档、写规划文档.

Docs & Writing80 installs

plantuml

full-stack-skills/document-skills

Open the skill to read its SKILL.md instructions.

76 installs

processon-mindmap

full-stack-skills/document-skills

Design a ProcessOn-ready mind-map outline for ideas, requirements, knowledge systems, meeting notes, learning plans, or hierarchical analysis. Use when the user explicitly requests a ProcessOn mind map, editable mind map, or a hierarchical outline intended for ProcessOn. Do not trigger for ordinary diagrams, generic prose outlines, or Mermaid mind maps unless ProcessOn is requested.

Docs & Writing75 installs

doc-coauthoring

full-stack-skills/document-skills

Open the skill to read its SKILL.md instructions.

73 installs

technical-blog-doc

full-stack-skills/document-skills

Open the skill to read its SKILL.md instructions.

Docs & Writing68 installs

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs