Skill library / For developers

Claude Code skill for API documentation

For developers who keep meaning to update the API docs after every change.

API docs drift the moment code changes. This skill has Claude Code read your handlers and types directly and regenerate accurate reference docs, with request and response examples that actually match.

Use this skill nowSee the SKILL.md

Answer up to 4 quick questions, add your email, and get a version written around you, ready to paste into Claude Code. Free, no account needed.

What it's good for

The SKILL.md file

Save as api-documentation/SKILL.md. It follows the open Agent Skills format.

---
name: api-documentation
description: "Generates and updates API reference docs from route handlers and types, including endpoints, parameters, responses and examples. Use when the user asks to document an API, endpoint or update the API docs."
---

# API Documentation

## Workflow
1. Locate route definitions and their request/response types
2. For each endpoint record method, path, auth, params and status codes
3. Write a curl example and a sample JSON response
4. Note errors and edge cases from the handler code
5. Update docs/api.md, preserving any hand-written sections

## Rules
- Document only what the code does, not what it should do
- Never include real secrets or tokens in examples
- Mark deprecated endpoints clearly

How to install it in Claude Code

Unzip into .claude/skills/ in your project (or ~/.claude/skills/ for all projects) and invoke it with /skill-name.

Example

Illustrative example. This shows the kind of request and result to expect. It is not a real conversation, and your result will depend on what you give it.

You ask: “Document the /orders endpoints”

What you get back: docs/api.md updated with 5 endpoints, params tables, curl examples and error codes.

Pro tip

Add a scripts/ helper that lists routes so the skill doesn't need to search the whole repo each time.

Make your own version

This prompt is a good start, but it doesn't know you. Answer a few quick questions about your situation and how you like things done, and we'll write a version that does. It appears on screen with a Copy button and setup steps for your AI, and we email you a copy. Free, up to 10 a month.

Make my own version free

Questions

Where does it get the details from?

From your route handlers and types, so the docs match the code instead of memory.

Can it update existing docs?

Yes. Ask it to update the reference after a change and review the diff.

How do I install it in Claude Code?

Unzip into .claude/skills/ in your project (or ~/.claude/skills/ for all projects) and invoke it with /skill-name.

Is it free?

Yes. You can copy the prompt on this page for free, with no sign-up. If you want a version written around you, our generator is free too (up to 10 a month, no account needed): answer a few questions and we email you a copy.

Related skills

One small, practical way to get more from the AI you already use. Free, every Tuesday, five minutes to read.