Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate comprehensive technical documentation including API docs (OpenAPI/Swagger), code documentation (TypeDoc/Sphinx), documentation sites (Docusaurus/MkDocs), Architecture Decision Records (ADRs), and diagrams (Mermaid/PlantUML). Use when documenting APIs, libraries, systems architecture, or building developer-facing documentation sites.
.claude/skills/ancoleman-generating-documentation/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-12 | ✗→✓ | ▲ Improved | 453% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 201% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 134% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 135% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 163% | 0% |
Generate comprehensive technical documentation across multiple layers: API documentation, code documentation, documentation sites, architecture decisions, and system diagrams.
Use this skill when:
Technical documentation operates at five distinct layers:
Layer 1: API Documentation - OpenAPI specs for REST/GraphQL APIs (Swagger UI, Redoc, Scalar) Layer 2: Code Documentation - Generated from code comments (TypeDoc, Sphinx, godoc, rustdoc) Layer 3: Documentation Sites - Comprehensive guides and tutorials (Docusaurus, MkDocs) Layer 4: Architecture Decisions - ADRs using MADR template format Layer 5: Diagrams - Visual architecture (Mermaid, PlantUML, D2)
See references/api-documentation.md, references/code-documentation.md, and references/documentation-sites.md for detailed guides.
API for external consumers?
→ Layer 1: API Documentation (OpenAPI + Swagger UI/Redoc)
Code for maintainers?
→ Layer 2: Code Documentation (TypeDoc/Sphinx/godoc/rustdoc)
Comprehensive guides?
→ Layer 3: Documentation Site (Docusaurus/MkDocs)
Architectural decision?
→ Layer 4: ADR (MADR template)
Visual system design?
→ Layer 5: Diagrams (Mermaid/PlantUML/D2)| Need | Primary Tool | Best For | |------|-------------|----------| | Doc Site | Docusaurus | Feature-rich React sites | | Doc Site | MkDocs Material | Simple Python docs | | API Docs (Interactive) | Swagger UI | Testing | | API Docs (Read-Only) | Redoc | Professional design | | TypeScript | TypeDoc | All TS projects | | Python | Sphinx | All Python projects | | Go | godoc | Built-in | | Rust | rustdoc | Built-in | | Diagrams | Mermaid | All-purpose |
Create OpenAPI specification:
yamlopenapi: 3.1.0 info: title: User API version: 1.0.0 servers: - url: https://api.example.com/v1 paths: /users/{userId}: get: summary: Get a user parameters: - name: userId in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/User' components: schemas: User: type: object required: [id, email, name] properties: id: type: string email: type: string format: email name: type: string securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT security: - bearerAuth: []
Render with Swagger UI, Redoc, or Scalar. See references/api-documentation.md for complete examples and templates/openapi-template.yaml for starter template.
typescript/** * Calculate the sum of two numbers. * * @param a - The first number * @param b - The second number * @returns The sum of a and b * * @example * ```typescript * const result = add(2, 3); * console.log(result); // 5 * ``` */ export function add(a: number, b: number): number { return a + b; }
Generate docs:
bashnpm install -D typedoc npx typedoc --entryPoints src/index.ts --out docs
pythondef calculate_total(items: list[dict], tax_rate: float = 0.0) -> float: """Calculate the total price including tax. Args: items: List of items with 'price' and 'quantity' keys. tax_rate: Tax rate as decimal (e.g., 0.1 for 10%). Returns: Total price including tax. Example: >>> items = [{'price': 10, 'quantity': 2}] >>> calculate_total(items, tax_rate=0.1) 22.0 """ subtotal = sum(item['price'] * item['quantity'] for item in items) return subtotal * (1 + tax_rate)
Generate docs:
bashpip install sphinx sphinx-rtd-theme sphinx-quickstart docs cd docs && make html
See references/code-documentation.md for Go and Rust examples.
bashnpx create-docusaurus@latest my-website classic cd my-website npm start
Basic config:
javascript// docusaurus.config.js module.exports = { title: 'My Project', url: 'https://docs.example.com', themeConfig: { navbar: { items: [ {type: 'doc', docId: 'intro', label: 'Docs'}, ], }, }, presets: [ ['@docusaurus/preset-classic', { docs: { sidebarPath: require.resolve('./sidebars.js'), }, }], ], };
bashpip install mkdocs mkdocs-material mkdocs new my-project mkdocs serve
Basic config:
yaml# mkdocs.yml site_name: My Project theme: name: material features: - navigation.tabs - search.suggest plugins: - search nav: - Home: index.md - Getting Started: getting-started.md
See references/documentation-sites.md for versioning and deployment.
Use MADR template for recording decisions:
markdown# Use PostgreSQL for Primary Database * Status: accepted * Deciders: Engineering Team, CTO * Date: 2025-01-15 ## Context and Problem Statement Application requires relational database with complex queries, ACID transactions, JSON support, and full-text search. ## Decision Drivers * Data integrity (ACID compliance) * Performance (10K+ queries/second) * Cost (open-source preferred) * Features (JSONB, full-text search) ## Considered Options * PostgreSQL * MySQL * Amazon Aurora ## Decision Outcome Chosen "PostgreSQL" for best balance of features and cost. ### Positive Consequences * Open-source with no licensing costs * Advanced features (JSONB, full-text search) * Strong ACID compliance ### Negative Consequences * Self-hosting requires DevOps investment * Horizontal scaling requires changes
Copy full template from templates/adr-template.md. See references/adr-guide.md for workflow and examples/adr/0001-database-selection.md for complete example.
Create diagrams with Mermaid:
`markdown
sequenceDiagram User->>Frontend: Click "Login" Frontend->>API: POST /auth/login API->>Database: Verify credentials Database-->>API: User found API-->>Frontend: JWT token Frontend->>User: Redirect to dashboard
Mermaid renders in GitHub, Docusaurus, and MkDocs. See references/diagram-generation.md for PlantUML and D2 examples.
Design-First:
Pros: Contract before implementation, parallel development Cons: Spec authoring can be verbose
Code-First:
Pros: Faster development, spec matches code Cons: Documentation lags behind
Recommendation: Design-first for new APIs, code-first for existing.
Docusaurus integration:
javascript// docusaurus.config.js plugins: [ ['docusaurus-plugin-openapi-docs', { config: { api: { specPath: 'openapi/api.yaml', outputDir: 'docs/api', }, }, }], ], themes: ['docusaurus-theme-openapi-docs'],
See references/api-documentation.md for MkDocs integration.
yaml# .github/workflows/docs.yml name: Documentation on: push: branches: [main] jobs: build-deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 - name: Generate API docs run: npm run docs:api - name: Generate code docs run: npm run docs:code - name: Build site run: npm run docs:build - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build
See references/ci-cd-integration.md for validation and versioning.
Write ADRs for:
✅ Technology selection (database, framework, cloud) ✅ Architecture patterns (microservices, event-driven) ✅ Decisions with trade-offs (pros/cons) ✅ Team alignment needed
Don't write ADRs for:
❌ Trivial decisions (naming, formatting) ❌ Easily reversible (config tweaks) ❌ Implementation details (document in code)
See references/adr-guide.md for workflow and examples.
For detailed guides:
references/api-documentation.md - OpenAPI, Swagger UI, Redoc, Scalar, design-first vs code-firstreferences/code-documentation.md - TypeDoc, Sphinx, godoc, rustdoc with examplesreferences/documentation-sites.md - Docusaurus and MkDocs setup, versioning, deploymentreferences/adr-guide.md - MADR template, workflow, when to write ADRsreferences/diagram-generation.md - Mermaid, PlantUML, D2 syntax and integrationreferences/ci-cd-integration.md - Automation, validation, deployment strategiestemplates/adr-template.md - MADR template for Architecture Decision Recordstemplates/openapi-template.yaml - OpenAPI 3.1 specification starterexamples/openapi/ - Complete OpenAPI specificationsexamples/typescript/ - TypeDoc configuration and TSDoc examplesexamples/python/ - Sphinx configuration and docstring examplesexamples/adr/ - Real-world Architecture Decision Recordsexamples/diagrams/ - Mermaid, PlantUML, D2 examplesBased on research (December 2025):
Documentation Sites:
API Documentation:
Code Documentation:
Diagrams:
api-patterns - API implementation and documentationbuilding-ci-pipelines - Automate documentation generationtesting-strategies - Document test patternssdk-design - Generate SDK documentationDocumentation Drift - Docs become outdated → Automate generation, validate in CI/CD
Over-Documentation - Documenting obvious behavior → Focus on "why" not "what"
Fragmented Docs - Information scattered → Single site with clear navigation
No Examples - Theory without practice → Include runnable examples
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 13,800 | 9,640 | -30% | 1 | 1 | 0% | 2,070 | 4,847 | +134% | 0 | 0 | — |
case-02 | pass→pass | 13,241 | 9,873 | -25% | 1 | 1 | 0% | 2,027 | 4,766 | +135% | 0 | 0 | — |
case-03 | pass→pass | 13,613 | 12,386 | -9% | 1 | 1 | 0% | 2,024 | 5,318 | +163% | 0 | 0 | — |
case-04 | pass→pass | 14,217 | 9,879 | -31% | 1 | 1 | 0% | 2,083 | 4,845 | +133% | 0 | 0 | — |
case-05 | pass→pass | 9,131 | 3,688 | -60% | 1 | 1 | 0% | 1,044 | 3,767 | +261% | 0 | 0 | — |
case-06 | pass→pass | 10,240 | 7,987 | -22% | 1 | 1 | 0% | 1,636 | 4,404 | +169% | 0 | 0 | — |
case-07 | pass→pass | 11,809 | 4,159 | -65% | 1 | 1 | 0% | 1,829 | 3,810 | +108% | 0 | 0 | — |
case-08 | pass→pass | 8,830 | 6,766 | -23% | 1 | 1 | 0% | 1,311 | 4,200 | +220% | 0 | 0 | — |
case-09 | pass→pass | 13,059 | 10,131 | -22% | 1 | 1 | 0% | 2,057 | 4,803 | +133% | 0 | 0 | — |
case-10 | pass→pass | 9,180 | 8,996 | -2% | 1 | 1 | 0% | 1,361 | 4,454 | +227% | 0 | 0 | — |
case-11 | pass→pass | 10,953 | 5,985 | -45% | 1 | 1 | 0% | 1,554 | 4,115 | +165% | 0 | 0 | — |
case-12 | fail→pass | 4,086 | 3,773 | -8% | 1 | 1 | 0% | 674 | 3,729 | +453% | 0 | 0 | — |
case-13 | pass→pass | 3,106 | 3,356 | +8% | 1 | 1 | 0% | 491 | 3,594 | +632% | 0 | 0 | — |
case-14 | pass→pass | 5,623 | 9,777 | +74% | 1 | 1 | 0% | 968 | 4,096 | +323% | 0 | 0 | — |
case-15 | pass→pass | 3,025 | 2,870 | -5% | 1 | 1 | 0% | 534 | 3,664 | +586% | 0 | 0 | — |
case-16 | pass→pass | 3,619 | 3,439 | -5% | 1 | 1 | 0% | 570 | 3,641 | +539% | 0 | 0 | — |
case-17 | pass→pass | 8,330 | 7,219 | -13% | 1 | 1 | 0% | 1,196 | 4,348 | +264% | 0 | 0 | — |
case-18 | pass→pass | 9,994 | 7,308 | -27% | 1 | 1 | 0% | 1,447 | 4,360 | +201% | 0 | 0 | — |
case-19 | fail→pass | 8,716 | 4,697 | -46% | 1 | 1 | 0% | 1,288 | 3,882 | +201% | 0 | 0 | — |
case-20 | pass→pass | 9,149 | 8,025 | -12% | 1 | 1 | 0% | 1,526 | 4,467 | +193% | 0 | 0 | — |
case-21 | pass→pass | 10,177 | 7,675 | -25% | 1 | 1 | 0% | 1,541 | 4,377 | +184% | 0 | 0 | — |
case-22 | pass→pass | 12,094 | 8,805 | -27% | 1 | 1 | 0% | 1,806 | 4,463 | +147% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.