Generate API specification documentation from codebase analysis. Detects REST endpoints, function signatures, type definitions, and schemas. Use when: API specification, endpoints, REST API, type definitions, OpenAPI, Swagger, API documentation.
This skill is limited to using the following tools:
scripts/detect-endpoints.shscripts/extract-types.shAutomatically generate API specification documentation.
REST API Endpoints
app.get(), router.post(), etc.fastify.get(), etc.app.get(), etc.app/api/**/route.ts, pages/api/**/*.ts@app.route() decorator@app.get() decorator@api_view decoratorFunction Signatures
Type Definitions
OpenAPI/Swagger
Detect API endpoints:
~/.claude/skills/documenting-apis/scripts/detect-endpoints.sh {path}
Output:
Extract type definitions:
~/.claude/skills/documenting-apis/scripts/extract-types.sh {path}
Output:
# API Specification
## Overview
- Base URL
- Authentication method
- Response format
## Endpoint List
### GET /api/users
**Description**: Get user list
**Request**:
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| page | number | No | Page number |
**Response**:
\`\`\`json
{
"users": [...]
}
\`\`\`
## Type Definitions
### User
| Field | Type | Description |
|-------|------|-------------|
| id | string | User ID |
| name | string | User name |
assets/api-template.md - Markdown template for API specification
# Call from command
/docs:api
# Direct skill reference
"Generate API specification"
documenting-architecture, setting-up-docs/docs:api