Guide · Agent skill
How to use the API Doc Generator agent skill (doc-generator)
Updated · written with AI from the project's own documentation and checked against our catalogue data
The doc-generator skill is a set of written instructions that tells an AI agent how to produce structured API documentation from your source code. It is aimed at backend developers documenting an existing REST API, teams that want an OpenAPI spec as a starting point, and anyone maintaining SDK or integration guides. After this guide you will know what the skill does, how to install it, how to phrase requests so the agent uses it, and what to check before publishing the output.
Quick start
- 1Download the ZIP. Download the doc-generator skill ZIP from the item page.
- 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use, or into your project's .claude/skills/ folder.
- 3Or upload in the Claude apps. In the Claude apps, open Settings → Capabilities → Skills and upload the skill.
- 4Point the agent at your code. Open the project and identify the routes, controllers or handlers for the endpoints you want documented.
- 5Ask in plain language. Request API documentation or an OpenAPI spec, naming the endpoints or files to cover.
- 6Review the output. Check parameters, responses and error codes against the real service before publishing.
What is an agent skill and what does doc-generator make the agent do?
An agent skill is a folder containing instructions that an AI agent loads when a task matches the skill's description. The doc-generator skill is distributed as a single file, SKILL.md, and it contains no tools or scripts of its own. It only shapes how the agent writes documentation.
When the skill is active, the agent produces an OpenAPI/Swagger specification, per-endpoint documentation, SDK usage examples, integration guides, an error code reference and authentication guides. Each endpoint is documented in the same fixed layout, so pages are consistent across the whole API.
- OpenAPI/Swagger specification
- Per-endpoint pages with a description and a parameters table
- Example success and error responses (for example 200 and 404 JSON bodies)
- Examples in cURL, JavaScript and Python
- Authentication guides and error code references
- SDK usage examples and integration guides
How do you install the doc-generator skill?
Download the ZIP for the skill from the item page, then unzip it into one of two locations. For a personal setup that works across projects, unzip it into ~/.claude/skills/. To scope the skill to a single project, unzip it into the project's .claude/skills/ folder.
If you use the Claude apps instead of the file system, you can upload the skill under Settings → Capabilities → Skills.
- Personal install: ~/.claude/skills/
- Project install: .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload
How do you trigger the skill with a natural request?
You do not need a special command. The skill's description tells the agent to use it when you are creating or updating API documentation, generating an OpenAPI specification, or mentioning API documentation, endpoints or documentation. Ask for those things in plain language and the agent should pick the skill up.
Be specific about the source. Pointing the agent at the routes or controllers for the endpoints you want documented gives it the code it needs to describe parameters and responses.
- "Generate an OpenAPI spec from the routes in src/api/."
- "Write endpoint documentation for the users controller, with cURL and Python examples."
- "Create an authentication guide for our API based on the middleware in this project."
- "Document the error codes returned by the orders service."
What does a generated endpoint page look like?
Each endpoint follows the same template: a heading with the method and path, a short description, a Parameters table with Name, Type, Required and Description columns, a 200 Success example, a 404 Not Found example, and Examples in cURL, JavaScript and Python. The sample below shows the layout the skill uses for GET /api/v1/users/:id.
Treat the example values as placeholders. The template uses sample data such as usr_123 and john@example.com, and these must be replaced with what your real service returns.
## GET /api/v1/users/:id
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| id | string | Yes | User ID |
**404 Not Found**
```json
{
"error": "USER_NOT_FOUND",
"message": "User does not exist"
}
```What should you check before publishing the output?
The agent works from your code, so anything the code does not show can be guessed. It may invent parameters, responses or error codes. Compare every endpoint against the real service, including status codes and field names, before the documentation goes live.
Generated examples such as sample emails and tokens may not match production behaviour. Review them, and do not publish the documentation without a human pass.
- Check parameters, types and required flags against the actual handlers
- Confirm error codes and status codes exist in the service
- Replace sample tokens and emails with realistic, correct values
- Run the cURL examples against a test environment
What does the skill need, and is it safe to run?
The skill lists no requirements. It does not run scripts and does not use the network, because it consists only of written instructions in SKILL.md. Its effect is limited to the text the agent writes for you.
Because the skill runs no code, the main risk is accuracy rather than system access. Your review of the output is the key safety step.
- Requires: nothing listed
- Runs scripts: no
- Uses network: no
- Files included: SKILL.md
What tips help the output be more accurate?
Give the agent the real source for each endpoint rather than a summary. Work one resource at a time so each endpoint is checked as it is written. Ask for the error codes to be taken from the code, not invented, and keep the output in a version-controlled docs folder so changes are easy to review.
- Document one resource or controller per request
- Point the agent at handlers, validators and middleware, not just route lists
- Ask for error codes that exist in the source only
- Keep generated docs in version control for diff review
What people use it for
- Generating an OpenAPI spec from an existing REST API as a starting point
- Writing a consistent page for each endpoint with parameters and example responses
- Producing cURL, JavaScript and Python examples for an SDK or integration guide
- Drafting an authentication guide and an error code reference for an API
Frequently asked questions
How do I install the doc-generator skill?
Download the ZIP from the item page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps you can instead upload it under Settings → Capabilities → Skills.
Is the doc-generator skill free to use?
The item is listed under the MIT licence. The source does not mention pricing, so check the item page for any cost details before relying on that.
Does doc-generator need any tools or API keys installed?
The source lists no requirements. The skill is only SKILL.md with written instructions, so it does not run scripts or use the network itself.
Can the doc-generator skill document my API without any errors?
Not reliably. The agent may invent parameters, responses or error codes that are not in your code, so every output must be checked against the real service before publishing.
What is the difference between doc-generator and writing docs by hand or with other tools?
Doc-generator applies one fixed template to every endpoint and produces OpenAPI, cURL, JavaScript and Python examples in one pass. Its output still needs review, and the source does not compare it with other tools.
Why does the generated documentation show example data that does not match my API?
The template uses sample values such as usr_123 and john@example.com. These are placeholders and may not match production behaviour, so replace them with values your service really returns.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use doc-generator if you are a backend developer or team that needs a consistent first draft of API documentation and an OpenAPI spec from existing code, and you are willing to review every endpoint. Pick something else if you need documentation published without review, or if your API's behaviour is not visible in the code, since the agent may then invent details.
Download the skill