Back to skills
SKILL.md
Api Docs
ASecurityGenerates API documentation from route definitions (Express, Fastify, Hono, etc.)
- 10 stars
- 0 votes
- 0 copies
- 0 views
- Added June 1, 2026
Works with
Security analysis
100/100npx -y skills add berkcangumusisik/claude-code-practices --skill api-docs --agent claude-codeAre you the author of Api Docs?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/berkcangumusisik-api-docs)---
name: api-docs
description: Generates API documentation from route definitions (Express, Fastify, Hono, etc.)
argument-hint: [routes-directory]
user-invocable: true
allowed-tools: Read Glob Grep Edit
effort: medium
---
## Generate API Documentation
Routes directory: **$1** (or auto-detect)
1. Find all route definitions:
```bash
grep -rn "router\.\(get\|post\|put\|patch\|delete\)\|app\.\(get\|post\|put\|patch\|delete\)" ${1:-src/} --include="*.ts" -l
```
2. For each route, extract:
- Method + path
- Path parameters, query params
- Request body shape (from Zod schema, type, or interface)
- Response shape
- Auth requirements (middleware check)
- Error responses
3. Generate documentation in OpenAPI 3.0 YAML format OR a readable Markdown table - ask the user which format.
**Markdown format:**
```markdown
### POST /api/users
Creates a new user.
**Body:** `{ name: string, email: string }`
**Response:** `{ id: string, createdAt: string }`
**Auth:** Bearer token required
```
4. Save to `docs/api.md` or `openapi.yaml`.
Attribution
Comments
Loading comments…