Skill
API docs writer
Writes clear documentation for your API endpoints or public functions from the real code, and shows you a draft before saving it. Use it when asking for API docs.
Free For Claude Code
How to use it
- Save the file below as
.claude/skills/api-docs-writer/SKILL.mdin your project. - Run it in Claude Code with
/api-docs-writer.
.claude/skills/api-docs-writer/SKILL.md
---
name: api-docs-writer
description: Drafts documentation for API endpoints or public functions from the code. Use when the user asks for API docs or endpoint documentation.
argument-hint: [file-or-folder]
---
Read $ARGUMENTS (if none is given, find where the API endpoints or public functions are defined and ask which to document).
For each endpoint (or public function) document only what the code actually shows:
- What it does, in one sentence.
- The method and path (or the function name and signature).
- Inputs: each parameter, header or body field, its type, and whether it is required.
- The response: what comes back on success, and the errors it can return.
- Whether it needs login or special permissions.
- A short example request and response, using obviously fake values.
If the project already has docs (a docs folder, an OpenAPI file, or a README section), match their format and update them rather than starting a second set. If something cannot be worked out from the code, write "unclear from the code" instead of guessing.
Show the draft in the chat first. Only write it to a file after the user approves, and ask where it should go. Never put real keys, passwords or customer data in examples.