doc-writing
The doc-writing skill generates structured API documentation in markdown format from a route manifest by reading source code to extract request parameters, response formats, and error handling information. Use this skill after discovering API routes to automatically produce organized endpoint documentation grouped by source file, which can then be validated by downstream quality-checking processes.
git clone --depth 1 https://github.com/huangjia2019/claude-code-engineering /tmp/doc-writing && cp -r /tmp/doc-writing/04-Skills/projects/08-skill-pipeline/.claude/skills/doc-writing ~/.claude/skills/doc-writingSKILL.md
# Doc Writing Skill
Generate structured API documentation from a route manifest.
## Input
You will receive a route manifest (JSON array) from the previous pipeline stage.
Each entry contains: method, path, file, line, middleware, type.
## Process
### Step 1: Read Source Code
For each route in the manifest, read the source file to understand:
- Request parameters (path, query, body)
- Response format
- Error handling
- Business logic summary
### Step 2: Generate Documentation
Use the template at `templates/endpoint-doc.md` for each route group.
Group routes by their source file (e.g., all product routes together).
### Step 3: Write Files
Write one markdown file per route group to the `docs/` directory:
- `docs/products-api.md`
- `docs/categories-api.md`
- etc.
## Output
Return a manifest of generated documentation files:
```json
{
"files_generated": ["docs/products-api.md", "docs/categories-api.md"],
"routes_documented": 8,
"routes_skipped": [],
"warnings": []
}
```
This manifest will be consumed by the next pipeline stage (quality-checking).Deep analysis of code against project standards
API design patterns and conventions for this project. Covers RESTful URL naming, response format standards, error handling, and authentication requirements. Use when writing or reviewing API endpoints, designing new APIs, or making decisions about request/response formats.
Generate comprehensive API documentation by scanning Express route files.
Generate API documentation from code. Use when the user wants to document APIs, create API reference, generate endpoint documentation, or needs help with OpenAPI/Swagger specs.
Explore and analyze API-related code. Use when investigating endpoints, routing, or HTTP handling.
Generate API endpoint documentation from Express route files. Use when the user asks to generate, update, or review API docs for Express.js routes.
Explore and analyze authentication-related code. Use when investigating auth flows, session management, or security.
Analyze root cause of bugs after location is identified. Second step in bug investigation.