
API Documentation Generator
Writes API docs, OpenAPI specs and usage examples from source code
- Repository
- luongnv89/claude-howto
- Stars
- 46,401
- Licence
- MIT
- Files
- 2 files
What it does
Once installed, the agent produces structured API documentation from your code: endpoint descriptions, parameter tables, sample success and error responses, cURL, JavaScript and Python examples, and OpenAPI/Swagger specs. It also includes a small Python helper that reads a source file's syntax tree and pulls out functions whose names start with get_ or post_, along with their docstrings, parameters and return types, to turn them into a Markdown outline.
Great for
- Backend developers who need up-to-date docs for REST endpoints
- Teams writing an OpenAPI spec or integration guide for an API they maintain
- Developers onboarding SDK users who need copy-paste request examples
Skip it if
- Accurate reference docs for a real API without checking the output: the example responses and endpoints are templates the agent writes, so they can drift from the actual behaviour and should be verified against running code
- Projects whose endpoints do not follow get_/post_ naming: the bundled script only detects those prefixes and only handles Python files
- Non-developers looking for a general writing tool: it is specific to API reference documentation
Try asking
- “Generate an OpenAPI spec for the users endpoints in this Express app”
- “Document GET /api/v1/users/:id with parameters, responses and cURL examples”
- “Write a Python and JavaScript integration guide for our payments API”
- “Run the doc generator script on services/orders.py and review the Markdown it produces”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 2 original files, the MIT licence and an attribution note.
doc-generator.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip doc-generator.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip doc-generator.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Point the agent at the specific source files or route handlers so it documents real signatures rather than guessing.
- Review every generated example and error code against your actual API before publishing.
- Ask for an OpenAPI output explicitly if you need a machine-readable spec; the script only produces Markdown from Python functions.
What's inside
- generate-docs.py
- SKILL.md
Redistributed unmodified from luongnv89/claude-howto under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.