api-doc-generator

api-doc-generator is a skill for Claude Code from bestdeejay-design/agent-skills. It costs 0 tokens per session (953 once invoked), scanned A, original, MIT.

A tool that turns an OpenAPI 3.x schema—a machine-readable description of a REST API—into Markdown documentation. It lists each endpoint with its parameters, request body, and response codes.

In plain words
What is it for?
Use it to create a README, wiki page, or standalone API reference from an openapi.json or swagger.json file, including schemas produced by FastAPI.
Why use it?
It removes the need to write API reference pages by hand or host an interactive Swagger or Redoc site.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

Good fit Use it to create a README, wiki page, or standalone API reference…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bestdeejay-design/agent-skills/api-doc-generator
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.

Any agent
npx skills add bestdeejay-design/agent-skills --skill api-doc-generator
Clone the repo
git clone --depth 1 https://github.com/bestdeejay-design/agent-skills

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 api-doc-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/bestdeejay-design/agent-skills/api-doc-generator.svg)](https://agentmods.dev/skills/bestdeejay-design/agent-skills/api-doc-generator)
Your own site
<a href="https://agentmods.dev/skills/bestdeejay-design/agent-skills/api-doc-generator"><img src="https://agentmods.dev/badge/skills/bestdeejay-design/agent-skills/api-doc-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 953 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.00000 $0.00953
Opus 5 $0.00000 $0.00477
Sonnet 5 $0.00000 $0.00191
Haiku 4.5 $0.00000 $0.00095

Measured 6d ago against content hash 692e8ecbc3a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

api-doc-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 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/api_doc.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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-doc-generator/SKILL.md · 73 lines

What it actually says

API Doc Generator

Генерация Markdown-документации REST API из OpenAPI-схемы: парсинг схемы, разбор endpoint'ов, рендер раздела на каждый метод с параметрами и кодами.

Загружай этот скилл когда нужно документировать REST API в Markdown: по endpoint'ам, с параметрами, телами запросов и кодами ответов. Скилл читает OpenAPI-схему (JSON) и выдаёт готовый документ.

🎯 When to use

Use this skill when:

  • Есть openapi.json/swagger.json и нужен Markdown-документ для README/Wiki
  • FastAPI-приложение: нужно отрендерить app.openapi() в документацию
  • Просят «документация API», «api doc», «описать эндпоинты»
  • Нужна автономная страница API Reference без хостинга Swagger UI

Do NOT use when:

  • Есть Swagger UI / Redoc онлайн — это уже интерактивная документация
  • Нужна сгенерированная из кода схема (Express + swagger-jsdoc) — сначала собери схему, потом этот скрипт
  • Нужен глубокий разбор типов (oneOf/allOf) — скрипт выдаёт плоскую таблицу параметров

📦 Files

  • SKILL.md — этот файл
  • scripts/api_doc.py — рендерер OpenAPI → Markdown (Python 3 stdlib)

🧰 Usage

# Из файла:
python3 skills/api-doc-generator/scripts/api_doc.py --schema openapi.json

# Из stdin:
cat openapi.json | python3 api_doc.py --stdin

# В файл:
python3 api_doc.py --schema openapi.json --title "My API" --out API.md

🔌 Получение схемы по фреймворку

FastAPI (OpenAPI 3.1 по умолчанию)

import json, app  # your FastAPI app
with open("openapi.json", "w") as f:
    json.dump(app.openapi(), f, ensure_ascii=False, indent=2)

Затем: python3 api_doc.py --schema openapi.json.

Express (Node.js)

Вариант A — swagger-jsdoc (аннотированный код):

npx swagger-jsdoc -d swagger-def.js -o openapi.json

Вариант B — AST-прогулка по маршрутам (если нет аннотаций): собрать app._router.stack (Express 4) в список method+path вручную — базовый случай.

✅ Definition of Done

  • Скрипт отработал: Markdown-документ в stdout или --out.
  • Каждый endpoint: method, path, summary, параметры таблицей, коды ответов.
  • Схема OpenAPI прошла json.loads без ошибок.
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 73 lines · 0 tokens per session scan A 692e8ecbc3a2

Subscribe to this mod's changes

api-doc-generator is a skill published in the GitHub repository bestdeejay-design/agent-skills (5 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 953 tokens. 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.