API Documentation Writer skill for Claude and Codex
Turns one endpoint into a reference page a developer can integrate from without asking questions: parameter tables, auth, a cURL call that works as written…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when an API endpoint needs reference documentation with parameter tables, cURL examples, and documented error responses. Do not use for writing an OpenAPI or Swagger spec file, or documenting a whole API's architecture and auth flow. Related topics: coding, api, documentation.
What it will ask you for
- Endpoint method and path (free text, e.g. "POST /api/v1/users")
- What the endpoint does (longer free text)
- Authentication (choose one: None, Bearer token, API key, Basic auth)
- Request body format (choose one: JSON, Form data, Query parameters, None)
- Example request payload (longer free text)
- Example success response (longer free text)
- Error responses to document (choose any: 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 409 Conflict, 422 Unprocessable Entity, 429 Too Many Requests, 500 Server Error)
How it works
- Extract every field from the example request and response into parameter tables with name, type, required flag, and meaning, marking guessed types with (confirm).
- Write the summary paragraph and the authentication requirement so a reader knows what the call does and which credential it needs before any detail.
- Build a cURL example that includes the auth header, the content type, and the example payload exactly, so it runs unchanged.
- Document the success response with its JSON and a field table, then one subsection per selected error code with its trigger condition and sample body.
- Read the page top to bottom as a first-time integrator and remove any sentence that does not help them make the call.
What you get
A Markdown reference page in this order: summary, authentication, request (parameters table, headers, body table), cURL example, success response, error responses. Every payload sits in a fenced code block.
What it watches out for
- Inventing field types or constraints the example does not show; a wrong type in docs costs more than an honest (confirm) marker.
- Listing every error code the service can emit; document only the ones this endpoint actually returns so readers trust the list.
- Writing a cURL example without the auth header, which fails on first copy and makes the reader doubt the rest of the page.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.