api-docs-generator
Skill by pnp
Generates structured Markdown API reference docs from source code, OpenAPI or Swagger specs, or route definitions. Useful for developers who need to document existing API endpoints.
Install api-docs-generator
Built from the published package, never by AI.
git clone --depth 1 https://github.com/pnp/copilot-prompts /tmp/copilot-prompts && mkdir -p ~/.claude/skills && cp -r /tmp/copilot-prompts/samples/skills/api-docs-generator ~/.claude/skills/api-docs-generatorRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/pnp/copilot-prompts /tmp/copilot-prompts && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/copilot-prompts/samples/skills/api-docs-generator ~/.gemini/antigravity-cli/skills/api-docs-generatorAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
API Documentation Generator is an agent skill that turns source code, OpenAPI/Swagger specs, or route definitions into structured Markdown API reference docs. It reads controllers, route files, or spec files and extracts each endpoint's method, path, parameters, request bodies, responses, and auth requirements. It detects common frameworks such as ASP.NET Core, FastAPI, Express.js, Spring Boot, NestJS, and Rails from file signals.
The output can be a single Markdown file or one file per endpoint with a README index. Every endpoint gets a curl example, and the skill documents both success and error responses. It is meant for developers who need API reference docs written from existing code, and it is told not to invent endpoints, fields, or auth requirements that the source does not show.
Written from the project's SKILL.md and checked against it.
What it can do
- Extract endpoints from sourceReads controllers and route files to list each endpoint's method, path, and parameters.
- Parse OpenAPI specsMaps paths, parameters, request bodies, responses, and schemas from OpenAPI or Swagger files.
- Detect frameworksIdentifies ASP.NET Core, FastAPI, Express.js, Spring Boot, NestJS, and Rails from file signals.
- Write Markdown referenceProduces structured API reference docs with a table of contents and endpoint sections.
- Per-endpoint outputCreates one file per endpoint, named by method and path slug, plus a README index.
- Curl examplesAdds a curl example with realistic data for every endpoint.
- Error responsesDocuments success and error status codes, including 400 and 404 where applicable.
Try asking
- Generate API docs for this UsersController file
- Document this API from its OpenAPI spec as one Markdown file
- Create per-endpoint API reference docs from these route files
Good to know
- Response schemas inferred from return types may differ from actual responses.
- Models defined in other files are named only unless those files are provided.
- Base URL defaults to https://api.example.com when unknown.
- In agent mode it uses defaults and notes assumptions at the top of the output.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: samples/skills/api-docs-generator/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
README.md4 KB -
SKILL.md8 KB -
assets/sample.json2 KB
Alternatives to api-docs-generator
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
api-docs-generator: common questions
What input does the API docs generator accept?
It accepts source code such as controllers or route files, OpenAPI or Swagger specs in JSON or YAML, and route definitions.
What happens when a model is defined in another file?
It uses the type name as written and notes that the full schema is defined elsewhere. It does not invent fields for models it cannot see.
Which output formats does it support?
The default is one single Markdown file. The per-endpoint option creates one file per endpoint plus a README index that groups them by resource.
How do I install api-docs-generator?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is api-docs-generator free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is api-docs-generator safe to use?
It scores 83 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to api-docs-generator?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
