Agent skill

API Docs Generator

by Mathews-Tom in Mathews-Tom/armory

Audits and enhances FastAPI and REST API documentation: missing descriptions, response codes, examples, docstrings, Pydantic models, OpenAPI spec.

MITAuto-check passedBackend & APIs

Install API Docs Generator

skills CLI
$ npx skills add Mathews-Tom/armory --skill api-docs-generator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Mathews-Tom/armory api-docs-generator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Mathews-Tom/armory.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/api-docs-generator .claude/skills/api-docs-generator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-docs-generator
GitHub stars
327
Token cost
~1.7k tokens
SKILL.md length
297 words
Files
6 (incl. references)
Skills in repo
80
Repo updated
First seen
Licence
MIT

At a glance

Audits and enhances FastAPI and REST API documentation: missing descriptions, response codes, examples, docstrings, Pydantic models, OpenAPI spec.

  • Works in 4 steps: Analyze Endpoints → Audit Documentation → Generate Enhancements → …
  • : generate API docs
  • SKILL.md covers Reference Files, Prerequisites, Workflow and Output Format
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

API Docs Generator is an agent skill from Mathews-Tom/armory. Audits and enhances FastAPI and REST API documentation: missing descriptions, response codes, examples, docstrings, Pydantic models, OpenAPI spec. Triggers on: "generate API docs", "document this API", "OpenAPI for", "FastAPI docs", "document endpoints", "swagger docs".

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `evals/cases.yaml`, `references/example-generation.md` and `references/fastapi-patterns.md`).

It sits in Backend & APIs, covering Technical documentation, OpenAPI specifications and Backend development. It works with OpenAPI, FastAPI and Pydantic. The repository describes itself as: Curated, production-grade skills for AI coding agents. Battle-tested workflows for developers who use AI seriously. The licence is MIT.

When your agent uses it

  • : generate API docs
  • Document this API
  • Document endpoints

Example prompts

  • “generate API docs”
  • “document this API”
  • “OpenAPI for”
  • “/api-docs-generator”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Analyze Endpoints
  2. Audit Documentation
  3. Generate Enhancements
  4. Output

What it can do on your machine

Read from SKILL.md and the folder at commit 4594fb7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Docs Generator loads about 1.7k tokens when it runs, and up to ~7.3k if it reads all its reference files. Until then it costs about 72 tokens; SKILL.md has 297 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Mathews-Tom/armory at commit 4594fb7, republished under its MIT licence (© Mathews-Tom). 297 words, ~1,719 tokens.

Download SKILL.mdSave it as .claude/skills/api-docs-generator/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
api-docs-generator
description
Audits and enhances FastAPI and REST API documentation: missing descriptions, response codes, examples, docstrings, Pydantic models, OpenAPI spec. Triggers on: "generate API docs", "document this API", "OpenAPI for", "FastAPI docs", "document endpoints", "swagger docs".
metadata.version
1.1.1
metadata.category
review
metadata.tags
api, documentation, openapi, fastapi
metadata.difficulty
intermediate
metadata.phase
ship

API Docs Generator

Audits API endpoint documentation for completeness, generates enhanced docstrings with proper parameter descriptions and examples, documents all response codes, and produces Pydantic model examples — bridging the gap between auto-generated OpenAPI specs and genuinely useful API documentation.

Reference Files

FileContentsLoad When
references/fastapi-patterns.mdFastAPI-specific documentation patterns, Path/Query/Body parameter docsFastAPI endpoint
references/example-generation.mdCreating realistic field examples, model_config patternsExample values needed
references/response-codes.mdStandard HTTP response documentation, error response schemasResponse documentation needed
references/openapi-enhancement.mdOpenAPI spec enrichment, tag organization, schema documentationOpenAPI spec review

Prerequisites

  • Access to the API source code (route definitions, models)
  • Framework identification (FastAPI, Flask, Django REST, Express)

Workflow

Phase 1: Analyze Endpoints
  1. Inventory endpoints — List all routes with HTTP method, path, handler function.
  2. Identify models — Request bodies (Pydantic models, dataclasses), response models, query parameters, path parameters.
  3. Map dependencies — Authentication requirements, middleware, shared dependencies.
  4. Read existing docs — Current docstrings, OpenAPI metadata, inline documentation.
Phase 2: Audit Documentation

For each endpoint, check:

CheckWhat to VerifyCommon Gap
Endpoint descriptionHandler has a docstringMissing or "TODO"
Parameter descriptionsEach param has description=Path params undocumented
Request exampleBody model has example= or json_schema_extraNo request example
Response modelresponse_model= specifiedReturns raw dict
Error responses4xx/5xx documented with responses=Only 200 documented
TagsEndpoint assigned to a tag groupUntagged endpoints
Phase 3: Generate Enhancements
  1. Docstrings — Write clear endpoint descriptions that explain purpose, not implementation. Include Raises section for documented errors.
  2. Parameter metadata — Add description, example, ge/le/regex to Path, Query, Body parameters.
  3. Model examples — Add Field(example=...) and model_config with json_schema_extra.
  4. Error responses — Document every possible error status code with response schema.
  5. Tags — Group endpoints by resource or feature area.
Phase 4: Output

Produce a coverage report and enhanced code.

Output Format

## API Documentation Audit

### Coverage Summary
| Metric | Count | Documented | Coverage |
|--------|-------|------------|----------|
| Endpoints | {N} | {M} | {%} |
| Parameters | {N} | {M} | {%} |
| Response codes | {N} | {M} | {%} |
| Models with examples | {N} | {M} | {%} |

### Gaps Identified

| # | Endpoint | Issue | Severity |
|---|----------|-------|----------|
| 1 | `{METHOD} {path}` | {issue} | {High/Medium/Low} |

### Enhanced Code

#### `{METHOD} {path}`

```python
@router.{method}(
    "{path}",
    response_model={ResponseModel},
    summary="{Short summary}",
    responses={{
        404: {{"description": "{Not found description}"}},
        422: {{"description": "Validation error"}},
    }},
    tags=["{tag}"],
)
async def {handler}(
    {param}: {type} = Path(..., description="{description}", example={example}),
) -> {ResponseModel}:
    """
    {Full description of what this endpoint does.}

    {Additional context about behavior, side effects, or important notes.}

    Raises:
        404: {Entity} not found
        403: Insufficient permissions
    """
Model: {ModelName}
python
class {ModelName}(BaseModel):
    {field}: {type} = Field(..., description="{description}", example={example})

    model_config = ConfigDict(
        json_schema_extra={{
            "example": {{
                "{field}": {example_value},
            }}
        }}
    )
text

## Calibration Rules

1. **Describe behavior, not implementation.** "Retrieves the user's profile" is good.
   "Calls `db.query(User).filter_by(id=id).first()`" is implementation leakage.
2. **Realistic examples.** `"alice@example.com"` not `"string"`. `42` not `0`.
   Examples serve as documentation — they should look like real data.
3. **Document every error code.** If the endpoint can return 404, document it. Users
   should never encounter an undocumented error response.
4. **Consistent style.** All endpoints in the same API should use the same documentation
   patterns — same tag naming, same description style, same example format.
5. **Don't duplicate the type system.** If the parameter type is `int`, don't write
   "An integer" as the description. Write what the integer represents: "Unique user
   identifier."

## Error Handling

| Problem | Resolution |
|---------|------------|
| Non-FastAPI framework | Adapt patterns. Document the HTTP contract regardless of framework. |
| No type hints on handlers | Infer types from usage, document uncertainty, suggest adding type hints. |
| Massive API (50+ endpoints) | Prioritize undocumented and public endpoints. Batch output by resource. |
| Generated API (OpenAPI → code) | Document at the spec level, not the generated code level. |
| Authentication varies by endpoint | Document auth requirements per endpoint group. |

## When NOT to Generate

Push back if:
- The API design itself is wrong (bad URL patterns, wrong HTTP methods) — fix the API first
- The user wants SDK generation from OpenAPI — different tool
- The code is a prototype that will change significantly — document after stabilization

© Mathews-Tom, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/api-docs-generator of Mathews-Tom/armory.

  • SKILL.md
  • evals/cases.yaml
  • references/example-generation.md
  • references/fastapi-patterns.md
  • references/openapi-enhancement.md
  • references/response-codes.md

Open the folder on GitHubat commit 4594fb7

Compare with similar skills

API Docs Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Docs Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Docs Generator this skillMathews-Tom/armory327—~1.7kAutomated safety check: PassMIT
API Surface Reviewpolarsource/polar10k—~1.3kAutomated safety check: PassMIT
FastAPI ExpertJeffallan/claude-skills12k—~1.8kAutomated safety check: PassMIT
Python Fastapi Patternsaiskillstore/marketplace4301 repos~1.3kAutomated safety check: NotesNone
Fastapi Patternsaffaan-m/ECC274k—~2.3kAutomated safety check: PassMIT
Fastapi Patternsaffaan-m/ECC274k—~2kAutomated safety check: PassMIT

Similar skills

  • API Surface Review

    polarsource/polar

    Review changes to Polar's API contract — Pydantic schemas, FastAPI endpoints, OpenAPI output and the generated SDKs.

    10k GitHub stars~1.3k tokensUpdated today
    Backend & APIsAuto-check passed
  • FastAPI Expert

    Jeffallan/claude-skills

    Builds async Python APIs with FastAPI and Pydantic V2, covering endpoints, JWT authentication, async SQLAlchemy, WebSockets and pytest checks against the OpenAPI docs.

    12k GitHub stars~1.8k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Python Fastapi Patterns

    aiskillstore/marketplace

    FastAPI web framework patterns. An agent skill from aiskillstore/marketplace.

    430 GitHub starsUsed in 1 repo~1.3k tokens
    Backend & APIsAuto-check: notes
  • Fastapi Patterns

    affaan-m/ECC

    FastAPI patterns for async APIs, dependency injection, Pydantic request and response models, OpenAPI docs, tests, security, and production readiness.

    274k GitHub stars~2.3k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Fastapi Patterns

    affaan-m/ECC

    非同期API、依存性注入、Pydanticのリクエスト・レスポンスモデル、OpenAPIドキュメント、テスト、セキュリティ、本番対応のためのFastAPIパターン。

    274k GitHub stars~2k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Fastapi Init Skill

    jiushiwon/wg-skills

    FastAPI 项目一键初始化技能。面向零基础小白,提供环境探测、自动安装、完整 Web 骨架生成、SSE 流式框架、JWT 鉴权、统一响应封装、文件上传接口、一键启动/重启脚本、Swagger 文档,内置 MySQL(默认)/ PostgreSQL / MongoDB 数据库选择。用户只需说"帮我搭一个 FastAPI 项目"即可一条命令完成从零到跑的完整链路。触发词:"FastAPI…

    110 GitHub stars~1.8k tokensUpdated 3 days ago
    Backend & APIsAuto-check: notes

More from Mathews-Tom/armory

All 80 skills in this repo
  • Architecture Reviewer

    Mathews-Tom/armory

    Architecture reviews across 7 dimensions (structural, scalability, enterprise readiness, performance, security, ops, data) with scored reports.

    327 GitHub stars~4.6k tokensUpdated yesterday
    Auto-check passed
  • Concept To Image

    Mathews-Tom/armory

    Turn concepts into static HTML visuals exported as PNG or SVG files via HTML/CSS/SVG.

    327 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check passed
  • Watch

    Mathews-Tom/armory

    A skill your agent uses when analyzing an existing video URL or local recording: "watch this video", "analyze youtube video", "summarize this video", "youtube transcript", "find this moment", "what…

    327 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • Code Refiner

    Mathews-Tom/armory

    Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust.

    327 GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • Concept To Video

    Mathews-Tom/armory

    Turn concepts into animated explainer videos using Manim (Python) with MP4/GIF output, audio overlay, multi-scene composition.

    327 GitHub stars~4.9k tokensUpdated yesterday
    Auto-check passed
  • Decision Map

    Mathews-Tom/armory

    Maps the unresolved architecture, policy, and scope decisions that must be answered before planning can start: one durable decision ticket per question on the issue tracker, typed and blocker-linked…

    327 GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about API Docs Generator

What does API Docs Generator do?

Audits and enhances FastAPI and REST API documentation: missing descriptions, response codes, examples, docstrings, Pydantic models, OpenAPI spec. API Docs Generator is an agent skill from Mathews-Tom/armory. Audits and enhances FastAPI and REST API documentation: missing descriptions, response codes, examples, docstrings, Pydantic models, OpenAPI spec.

When should I use API Docs Generator?

API Docs Generator fits situations like: : generate API docs; document this API; document endpoints.

How do I install API Docs Generator in Claude Code?

Run `npx skills add Mathews-Tom/armory --skill api-docs-generator -a claude-code`. Or copy the skill folder (skills/api-docs-generator in Mathews-Tom/armory) into .claude/skills/api-docs-generator in your project. Claude Code loads it when a task matches its description.

How do I install API Docs Generator in Codex?

Run `npx skills add Mathews-Tom/armory --skill api-docs-generator -a codex`. Or copy the skill folder (skills/api-docs-generator in Mathews-Tom/armory) into .agents/skills/api-docs-generator in your project. Codex loads it when a task matches its description.

Can I use API Docs Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Mathews-Tom/armory --skill api-docs-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-docs-generator, .gemini/skills/api-docs-generator, .github/skills/api-docs-generator and .opencode/skills/api-docs-generator in your project.

What does API Docs Generator need to run?

SKILL.md names no scripts, command-line tools or credentials: API Docs Generator is instructions for the agent only. Our summary lists: Python 3.

Does API Docs Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Docs Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Docs Generator use?

API Docs Generator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Docs Generator use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.6k tokens, read only when the agent opens those files.

What are the alternatives to API Docs Generator?

Skills that share tags, products or a category with API Docs Generator: API Surface Review (polarsource/polar, 10k stars), FastAPI Expert (Jeffallan/claude-skills, 12k stars), Python Fastapi Patterns (aiskillstore/marketplace, 430 stars) and Fastapi Patterns (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Docs Generator?

Mathews-Tom (a GitHub user) maintains it in Mathews-Tom/armory, which has 327 GitHub stars. The repository holds 80 skills in this directory. The repository was last updated on October 6, 2026.

Source: Mathews-Tom/armory on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.