API Documentation Generator

API Documentation Generator is a skill for Claude Code, Codex from Notysoty/openagentskills. It costs 20 tokens per session (1,816 once invoked), scanned A, original, MIT.

A documentation tool that reads REST API route code and produces OpenAPI 3.0 YAML. REST APIs let software communicate through web requests, and OpenAPI is a standard description of those requests and responses.

In plain words
What is it for?
Use it to document paths, HTTP methods, parameters, request bodies, responses, errors, and example requests and responses.
Why use it?
It turns existing route code into documentation that other developers can understand and load into tools such as Swagger UI or Redoc.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/notysoty/openagentskills/api-docs-generator
Any agent
npx skills add Notysoty/openagentskills --skill api-docs-generator
Clone the repo
git clone --depth 1 https://github.com/Notysoty/openagentskills

Made for: Claude Code, Codex.

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 API Documentation Generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/notysoty/openagentskills/api-docs-generator.svg)](https://agentmods.dev/skills/notysoty/openagentskills/api-docs-generator)
Your own site
<a href="https://agentmods.dev/skills/notysoty/openagentskills/api-docs-generator"><img src="https://agentmods.dev/badge/skills/notysoty/openagentskills/api-docs-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,816 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00020 $0.01816
Opus 5 $0.00010 $0.00908
Sonnet 5 $0.00004 $0.00363
Haiku 4.5 $0.00002 $0.00182

Measured 4d ago against content hash a1644b10422c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

API Documentation Generator 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 4d 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.

skills/api-docs-generator/SKILL.md · 206 lines

How it starts

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

API Documentation Generator

What this skill does

This skill reads REST API route handlers (Express, FastAPI, Go net/http, Rails, Django, or any framework) and generates complete OpenAPI 3.0 YAML documentation. It extracts paths, HTTP methods, path/query/body parameters, response shapes, and error codes, then writes properly structured YAML with example request and response bodies. The output can be loaded directly into Swagger UI, Redoc, or any OpenAPI-compatible tool.

Use this when you have undocumented API code and need to produce accurate, usable API documentation quickly.

How to use

Claude Code / Cline

Copy this file to .agents/skills/api-docs-generator/SKILL.md in your project root.

Then point the agent at your routes file and ask:

  • "Use the API Documentation Generator skill on server/routes.ts."
  • "Generate OpenAPI docs for all routes in src/api/ using the API Documentation Generator skill."

The agent will read the route files and any referenced handler functions to extract parameter and response shapes.

Cursor

Add the "Prompt / Instructions" section to your .cursorrules file. Open your routes file in the editor and ask Cursor to generate the OpenAPI YAML.

Codex

Paste your route definitions and handler code into the chat along with the instructions below. Include type definitions or schema files if they exist — they help Codex produce accurate request/response schemas.

The Prompt / Instructions for the Agent

When asked to generate API documentation, follow these steps:

  1. Read the route definitions. For each route, extract:

    • HTTP method (GET, POST, PUT, PATCH, DELETE)
    • Path, including path parameters (e.g., /users/:id/users/{id})
    • Router-level middleware (e.g., authentication guards — these become security entries)
    • The handler function name
  2. Read the handler functions. For each handler, extract:

    • Path parameters (e.g., req.params.id)
    • Query parameters (e.g., req.query.page, req.query.limit)
    • Request body shape — read from validation schema (Zod, Joi, Pydantic, etc.) if present, otherwise infer from how req.body fields are used
    • All res.json() / return response shapes — enumerate every response including error paths
    • HTTP status codes returned (200, 201, 400, 401, 404, 500, etc.)

Read the full file on GitHub · 206 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. 4d ago First seen · 206 lines · 20 tokens per session scan A a1644b10422c

Subscribe to this mod's changes

API Documentation Generator is a skill published in the GitHub repository Notysoty/openagentskills (9 stars, last pushed 20d ago), licensed MIT. It adds 20 tokens to every session and 1,816 once invoked, about $0.0001 per session on Opus 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-08-31.

Related

Other skills, from other repositories

openapi-glossary

Use consistent OpenAPI terminology and definitions when writing documentation, educational material, and tooling guidance.

scalar/scalar · 24 tokens

openapi-expert

Expert-level OpenAPI/Swagger specification for API design, documentation, and code generation.

personamanagmentlayer/pcl · 21 tokens

api-docs-generator

Generate API documentation from code - produce OpenAPI/Swagger specs, Markdown API references, request/response examples, and interactive documentation from source code analysis.

chainlesschain/chainlesschain · 34 tokens

api-documentation

API Documentation & Design (OpenAPI/Swagger): Helps write and review API documentation, generate OpenAPI/Swagger specs, design RESTful APIs, and document GraphQL schemas. Use whenever the user mentions 'API docs', 'Swagger', 'OpenAPI', 'API specification', 'API design', 'REST API', 'endpoint documentation', 'API…

camilooscargbaptista/cto-toolkit · 114 tokens

api-documentation-generator

Generates OpenAPI 3.0/3.1 specs, TypeScript client types, and curl examples from existing route handler code. Supports Express, Next.js API routes, Fastify, and Hono. Produces complete documentation including auth requirements, rate limits, error codes, and request/response examples. Activate on: 'generate API docs'…

curiositech/windags-skills · 129 tokens

nestjs-documentation

Automate Swagger/OpenAPI documentation and standardize API response schemas in NestJS. Use when generating OpenAPI specs, documenting paginated or generic responses, configuring the Nest CLI Swagger plugin, or publishing versioned API docs.

FilippoDeSilva/skills · 48 tokens