doc-generator
What it does
It guides your agent to create API reference pages from code, covering each endpoint, its parameters, its responses, and example calls. It is for developers who need clear docs for the people who use their API.
When to use it
- ✓When you need documentation written for an API's endpoints.
- ✓When you want an OpenAPI or Swagger specification generated or updated.
- ✓When you need example code for calling an API in several languages.
Skill link
https://github.com/luongnv89/claude-howto/blob/main/03-skills/doc-generator/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you write API docs for my users endpoint, with cURL and Python examples?”
5 new skills a week. 1 minute to read.
How it works
The agent reads the source code for each endpoint, then fills in a standard layout with parameters, success and error responses, and example calls.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
API Documentation Generator Skill
Generates
- OpenAPI/Swagger specifications
- API endpoint documentation
- SDK usage examples
- Integration guides
- Error code references
- Authentication guides
Documentation Structure
For Each Endpoint
## GET /api/v1/users/:id
### Description
Brief explanation of what this endpoint does
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| id | string | Yes | User ID |
### Response
**200 Success**
```json
{
"id": "usr_123",
"name": "John Doe",
"email": "john@example.com",
"created_at": "2025-01-15T10:30:00Z"
}
```
**404 Not Found**
```json
{
"error": "USER_NOT_FOUND",
"message": "User does not exist"
}
```
### Examples
**cURL**
```bash
curl -X GET "https://api.example.com/api/v1/users/usr_123" \
-H "Authorization: Bearer YOUR_TOKEN"
```
**JavaScript**
```javascript
const user = await fetch('/api/v1/users/usr_123', {
headers: { 'Authorization': 'Bearer token' }
}).then(r => r.json());
```
**Python**
```python
response = requests.get(
'https://api.example.com/api/v1/users/usr_123',
headers={'Authorization': 'Bearer token'}
)
user = response.json()
```
Last Updated: August 4, 2026 Claude Code Version: 2.1.220 Sources:
- https://code.claude.com/docs/en/skills Compatible Models: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
FAQ
Where do the examples come from?
The skill is built to document what the source code does, so the examples should reflect the code.
What does each endpoint section include?
A description, a parameters table, success and error responses, and examples in cURL, JavaScript, and Python.
Can it create an OpenAPI spec?
Yes. The skill says it generates OpenAPI or Swagger specifications.
Details
Original description by the author
Generate comprehensive, accurate API documentation from source code. Use when creating or updating API documentation, generating OpenAPI specs, or when users mention API docs, endpoints, or documentation.
repo: luongnv89/claude-howto
Popularity
- GitHub stars
- 46k
- Ranking position
- #6323
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
lesson-quiz
46kQuizzes you on one Claude Code tutorial lesson with 10 questions, scores your answers, and points out topics to review.
self-assessment
46kGives you a quiz across 10 Claude Code feature areas, then a score by topic and a learning path for what to study next.
blog-draft
46kGuides your agent through drafting a blog post from your ideas and sources, step by step, with versions tracked as you go.
claude-md
46kHelps your agent create or improve a CLAUDE.md file, the project guide that introduces an AI agent to your codebase.
Similar skills
technical-documentation
394kHelps your agent write and review clear technical docs and agent instruction files, so people and AI tools can follow them easily.
architecture-decision-records
280kHas your agent record important project structure decisions. It helps to understand the reasoning behind choices and maintain a clear history of changes.
code-tour
280kLets your agent create step-by-step code walkthroughs with exact file and line references. Useful for intros, explanations, and reviews.