Skills/diataxis-documentation/SKILL.md
Applies the Diataxis framework to create or improve technical documentation. Use when being asked to write high quality tutorials, how-to guides, reference docs, or explanations, when reviewing documentation quality, or when deciding what type of documentation to create. Helps identify documentation types using the action/cognition and acquisition/application dimensions.
npx skillsauth add sammcj/agentic-coding writing-documentation-with-diataxisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You help users create and improve technical documentation using the Diataxis framework, which identifies four distinct documentation types based on user needs.
Diataxis is a framework for creating documentation that feels good to use - documentation that has flow, anticipates needs, and fits how humans actually interact with a craft.
Important: Diataxis is an approach, not a template. Don't create empty sections for tutorials/how-to/reference/explanation just to have them. Create content that serves actual user needs, apply these principles, and let structure emerge organically.
Core insight: Documentation serves practitioners in a domain of skill. What they need changes based on two dimensions:
These create exactly four documentation types:
Why exactly four: These aren't arbitrary categories. The two dimensions create exactly four quarters - there cannot be three or five. This is the complete territory of what documentation must cover.
When uncertain which documentation type is needed, ask two questions:
1. Does the content inform ACTION or COGNITION?
2. Does it serve ACQUISITION or APPLICATION of skill?
Then apply:
| Content Type | User Activity | Documentation Type | |--------------|---------------|--------------------| | Action | Acquisition | Tutorial | | Action | Application | How-to Guide | | Cognition | Application | Reference | | Cognition | Acquisition | Explanation |
Ask yourself:
Apply the two questions above to determine which documentation type serves this need.
For Tutorials (learning by doing):
For How-to Guides (working to achieve goals):
For Reference (facts while working):
For Explanation (understanding concepts):
Tutorials: "We will create..." "First, do X. Now, do Y." "Notice that..." "You have built..."
How-to Guides: "This guide shows you how to..." "If you want X, do Y" "To achieve W, do Z"
Reference: "X is available as Y" "Sub-commands are: A, B, C" "You must use X. Never Y."
Explanation: "The reason for X is..." "W is better than Z, because..." "Some prefer W. This can be effective, but..."
Review your content:
If content serves multiple needs, split it and link between documents.
Use this iterative workflow:
1. Choose a piece - Any page, section, or paragraph
2. Challenge it with these questions:
3. Use the compass if the type is unclear
4. Identify one improvement that would help right now
5. Make that improvement according to Diataxis principles
6. Repeat with another piece
Don't try to restructure everything at once. Structure emerges from improving individual pieces.
Flow is paramount: Documentation should move smoothly with the user, anticipating their next need. For how-to guides especially, think: What must they hold in their mind? When can they resolve those thoughts? What will they reach for next?
Boundaries are protective: Keep documentation types separate. The most common mistake is mixing tutorials (learning) with how-to guides (working).
Structure follows content: Don't create empty sections. Write content that serves real needs, apply Diataxis principles, and let structure emerge organically.
One need at a time: Each piece serves one user need. If users need multiple things, create multiple pieces and link between them.
Good documentation feels good: Beyond accuracy, documentation should anticipate needs, have flow, and fit how humans work.
Tutorial/How-to conflation - Tutorials are for learning (study), how-to guides are for working. Signs you've mixed them:
Over-explaining in tutorials - Trust that learning happens through doing. Give minimal explanation and link to detailed explanation elsewhere.
How-to guides that teach - Assume competence. Don't explain basics.
Reference that instructs - Reference describes, it doesn't tell you what to do.
Explanation in action-oriented docs - Move it to explanation docs and link to it.
| Aspect | Tutorials | How-to Guides | Reference | Explanation | |--------------------|---------------------|---------------------|----------------------|------------------------| | Answers | "Can you teach me?" | "How do I...?" | "What is...?" | "Why...?" | | User is | Learning by doing | Working on task | Working, needs facts | Studying to understand | | Content | Action steps | Action steps | Information | Information | | Form | A lesson | Directions | Description | Discussion | | Responsibility | On the teacher | On the user | Neutral | Shared | | Tone | Supportive, guiding | Direct, conditional | Austere, factual | Discursive, contextual |
For more detailed guidance, refer to:
When applying Diataxis:
development
Use when answering questions from this machine-learning knowledge base. Triggers: questions about transformers, attention cost and efficiency, and long-context scaling; 'what do we know about attention', 'check the ML wiki'. Read-only querying of compiled knowledge; to add, update, supersede, lint, or audit, use the llm-wiki skill instead.
development
Use when building or maintaining a self-contained personal knowledge base (an LLM wiki) as plain markdown, optionally opened as an Obsidian vault. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki health, auditing article claims against their sources, superseding stale knowledge, 'add to wiki', or any mention of 'LLM wiki' or 'Karpathy wiki'.
tools
Provides guidance and tools for hardware design. Activate when using KiCAD, looking up electronic parts or designing PCBs.
testing
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise.