Create and evaluate documentation using the Diátaxis framework.
The Diátaxis framework organizes documentation by user need, not by topic. This skill helps you create documentation that works for your audience.
Diátaxis distinguishes four documentation needs using a 2×2 matrix:
| Practical | Theoretical | |
|---|---|---|
| Learning | Tutorials | Explanation |
| Working | How-to Guides | Reference |
When given documentation, determine which category it belongs to:
Common documentation problems map to mixing categories:
When writing documentation, use the appropriate template:
See framework.md for detailed principles, language patterns, and anti-patterns for each category.
Create documentation in this structure:
.docs/
├── tutorials/ # Learning-oriented lessons
│ └── [topic]/
├── how-to/ # Task-oriented guides
│ └── [domain]/
├── reference/ # Technical descriptions
│ └── [component]/
├── explanation/ # Conceptual discussions
│ └── [subject]/
└── index.md # Navigation (generated automatically)
Naming conventions:
kebab-case for all files and foldersgetting-started-with-x.md, your-first-y.mdhow-to-configure-x.md, how-to-deploy-y.mdapi-reference.md, configuration-options.mdabout-architecture.md, understanding-x.mdUse the Python script to automatically generate the index.md file:
python skills/diataxis/scripts/generate_index.py
This script scans the .docs/ subfolders, extracts titles from .md files, and creates links organized by category. Run it whenever you add or remove documentation files to keep the index up-to-date.
To keep the documentation index consistent and up-to-date:
.docs/ subfolders (tutorials/, how-to/, reference/, explanation/).python skills/diataxis/scripts/generate_index.py.md files, extract their titles, and update .docs/index.md with organized links.This workflow should be used after adding new documents or restructuring existing ones.
Every document should serve exactly one user need. When content serves multiple needs, separate it into multiple documents and link them together. This is better than trying to serve all needs in one place.
Remember: The first rule of teaching is simply: don't try to teach. Let the structure and the doing facilitate learning.