API Documentation Claude Skill
Generate clean, OpenAPI-style API docs from code - with examples, error codes, and auth details.
An API documentation skill makes Claude produce clear, consistent reference docs straight from your code. It reads endpoints, request and response shapes, and auth requirements, then writes OpenAPI-style descriptions complete with example requests and responses, status and error codes, and authentication notes. Good API docs are the difference between an integration that takes an hour and one that takes a week - this skill keeps yours accurate and uniformly formatted as your endpoints change, so documentation stops being the thing that always lags behind the code.
When to use this skill
- Documenting a new endpoint or an entire API surface.
- Keeping reference docs in sync after changing request/response shapes.
- Generating example requests and responses for a developer portal.
- Producing a first draft of OpenAPI/Swagger descriptions from source.
What it does
- Writes OpenAPI-style endpoint descriptions from code.
- Includes example requests and responses for each endpoint.
- Documents status codes, error responses, and edge cases.
- Captures authentication and required headers or scopes.
The API Documentation Claude Skill SKILL.md
This is the complete, ready-to-use skill file. Copy it or download the .zip, then generate a customized version for your exact use case.
--- name: api-docs-writer description: Generates clean, OpenAPI-style API documentation from code or endpoint definitions, including example requests/responses, status and error codes, and authentication details. Use when documenting an API, endpoint, or route, or when the user asks for API docs or reference documentation. --- # API Docs Writer You write reference documentation for HTTP APIs that a developer can integrate against without reading the source code. ## For each endpoint, document 1. **Summary** - one line on what the endpoint does. 2. **Method and path** - e.g. `POST /v1/skills`. 3. **Authentication** - required scheme (API key, bearer token, OAuth scope), and which header it goes in. 4. **Request** - path/query params and body fields in a table: name, type, required, description. Include a realistic example request. 5. **Responses** - the success response with an example body, plus each error status (400/401/403/404/409/429/500) with when it occurs and an example error body. 6. **Notes** - rate limits, idempotency, pagination, or side effects worth flagging. ## Style - Use tables for parameters; use fenced code blocks for example requests/responses. - Show concrete, realistic example values - never `string` or `foo`. - Keep descriptions specific: say what a field controls and its constraints (min/max, enum values, format). - Match the casing and naming exactly as they appear in the code. ## Rules - If something isn't determinable from the input (e.g. an undocumented error case), list it as an open question rather than guessing. - Document the API as it actually behaves, not as it ideally should.
See the complete skill
You're viewing a preview. Sign up free to unlock the full SKILL.md — then copy it or download the ready-to-use .zip.
How to install this Claude Skill
- 1Download the skill and unzip the file.
- 2In Claude, go to Settings → Capabilities → Skills.
- 3Click Add Skill → Upload Skill.
- 4Drag and drop the .zip file to upload it.
- 5Once enabled, open the three-dot menu and choose “Try in chat.”
New to skills? Read the full guides on creating a Claude Skill and installing one.
Frequently asked questions
What format does the API Documentation skill produce?
It produces OpenAPI-style reference docs: a summary, method and path, authentication, a parameter table, example requests and responses, and documented error codes for each endpoint.
Can it generate docs directly from my source code?
Yes - paste the endpoint code or route definitions and Claude documents them. For anything it can't infer (like undocumented error cases), it lists open questions instead of guessing.
Does it cover authentication and error responses?
Yes. Each endpoint includes its auth scheme and required headers/scopes, plus error responses (400/401/403/404/429/500) with when they occur and example bodies.
Related skills
Want a version tailored to you?
Describe your exact use case and generate a custom Claude Skill in seconds - free.
Generate your own