Skip to main content
skill CX Codex

doc-generator · luongnv89 — Claude Code skill: API docs from source code

This skill reads your source code and writes API documentation: OpenAPI specs, endpoint descriptions, and cURL, JavaScript and Python examples.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add luongnv89/claude-howto --skill doc-generator -a claude-code
Open on GitHub

What doc-generator does

The skill kicks in when you ask for endpoint docs or an OpenAPI spec. It walks the source code and produces the pieces you would otherwise write by hand: OpenAPI/Swagger specs, endpoint documentation, SDK usage examples, integration guides, error code references and authentication guides.

The output follows a fixed shape. Every endpoint gets a heading with method and path, a short description, a parameter table with type and required flag, response bodies per status code with JSON samples, then call examples in cURL, JavaScript and Python. Because the structure repeats, it is easy to match an existing house style across a large API surface.

It only documents what the code already contains. If a route is not in the source, it will not show up in the spec — so this is a step you run after the handlers exist, not before.

What it helps with

  • turn existing routes into an OpenAPI spec
  • document an endpoint with its parameters and status codes
  • add cURL, JavaScript and Python call examples
  • collect error codes into one reference
  • write an authentication guide for outside developers

Example prompts for the agent

  • generate API docs for every endpoint under src/routes
  • build an OpenAPI spec from the current handlers
  • add cURL and Python examples to the user endpoint docs

How to install doc-generator

1Skills CLI (Vercel)

npx skills add luongnv89/claude-howto --skill doc-generator -a claude-code

2Manually: put the files in place

~/.claude/skills/doc-generator/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/doc-generator/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about doc-generator

How do I install doc-generator in Claude?

Run npx skills add luongnv89/claude-howto --skill doc-generator -a claude-code. The skill lands in ~/.claude/skills/doc-generator/SKILL.md.

What does doc-generator do?

It generates API documentation from source code: OpenAPI/Swagger specs, endpoint descriptions, SDK examples, integration and authentication guides, and error code references.

Which platforms can run this skill?

Besides Claude, there are install commands for Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. The command differs by the platform name after the -a flag.

Source text

SKILL.md · MIT
---
name: doc-generator
description: Генерація вичерпної, точної документації API з вихідного коду. Використовуйте при створенні або оновленні документації API, генерації специфікацій OpenAPI, або коли користувачі згадують документацію API, ендпоінти чи документацію.
---

# Навичка генерації документації API

## Генерує

- Специфікації OpenAPI/Swagger
- Документацію ендпоінтів API
- Приклади використання SDK
- Посібники з інтеграції
- Довідники кодів помилок
- Посібники з автентифікації

## Структура документації

### Для кожного ендпоінту

````markdown
## GET /api/v1/users/:id

### Опис
Короткий опис призначення цього ендпоінту

### Параметри

| Назва | Тип | Обовʼязковий | Опис |
|-------|-----|-------------|------|
| id | string | Так | ID користувача |

### Відповідь

**200 Успіх**
```json
{
  "id": "usr_123",
  "name": "John Doe",
  "email": "[email protected]",
  "created_at": "2025-01-15T10:30:00Z"
}
```

**404 Не знайдено**
```json
{
  "error": "USER_NOT_FOUND",
  "message": "Користувач не існує"
}
```

### Приклади

**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()
```
````

© luongnv89 · MIT · luongnv89/claude-howto

Similar skills

Everything for Writing and docs →

doc-generator by other authors comes first.

From the same set7

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor