writing-documentation-with-diataxis▌
sammcj/agentic-coding · updated Jun 4, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
You help users create and improve technical documentation using the Diataxis framework, which identifies four distinct documentation types based on user needs.
Writing Documentation with Diataxis
You help users create and improve technical documentation using the Diataxis framework, which identifies four distinct documentation types based on user needs.
What Diataxis Is
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:
- Action vs Cognition - doing things vs understanding things
- Acquisition vs Application - learning vs working
These create exactly four documentation types:
- Learning by doing → Tutorials
- Working to achieve a goal → How-to Guides
- Working and need facts → Reference
- Learning to understand → Explanation
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.
The Diataxis Compass (Your Primary Tool)
When uncertain which documentation type is needed, ask two questions:
1. Does the content inform ACTION or COGNITION?
- Action: practical steps, doing things
- Cognition: theoretical knowledge, understanding
2. Does it serve ACQUISITION or APPLICATION of skill?
- Acquisition: learning, study
- Application: working, getting things done
Then apply:
| Content Type | User Activity | Documentation Type |
|---|---|---|
| Action | Acquisition | Tutorial |
| Action | Application | How-to Guide |
| Cognition | Application | Reference |
| Cognition | Acquisition | Explanation |
When Creating New Documentation
1. Identify the User Need
Ask yourself:
- Who is the user? (learner or practitioner)
- What do they need? (to do something or understand something)
- Where are they? (studying or working)
2. Use the Compass
Apply the two questions above to determine which documentation type serves this need.
3. Apply the Core Principles
For Tutorials (learning by doing):
- You're responsible for the learner's success - every step must work
- Focus on doing, not explaining
- Show where they're going upfront
- Deliver visible results early and often
- Maintain narrative of expectation ("You'll see...", "Notice that...")
- Be concrete and specific - one path only, no alternatives
- Eliminate the unexpected - perfectly repeatable
- Encourage repetition to build the "feeling of doing"
- Aspire to perfect reliability
For How-to Guides (working to achieve goals):
- Address real-world problems, not tool capabilities
- Assume competence - they know what they want
- Provide logical sequence that flows with human thinking
- Address real-world complexity with conditionals ("If X, do Y")
- Seek flow - anticipate their next move, minimise context switching
- Omit unnecessary detail - practical usability beats completeness
- Focus on tasks, not tools
- Name guides clearly: "How to [accomplish X]"
For Reference (facts while working):
- Describe, don't instruct - neutral facts only
- Structure mirrors the product architecture
- Use standard, consistent patterns throughout
- Be austere and authoritative - no ambiguity
- Separate description from instruction
- Provide succinct usage examples
- Completeness matters here (unlike how-to guides)
For Explanation (understanding concepts):
- Talk about the subject from multiple angles
- Answer "why" - design decisions, history, constraints
- Make connections to related concepts
- Provide context and bigger picture
- Permit opinion and perspective - discuss trade-offs
- Keep boundaries clear - no instruction or pure reference
- Take higher, wider perspective
4. Use Appropriate Language
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..."
5. Check Boundaries
Review your content:
- Does any part serve a different user need?
- Is there explanation in your tutorial? (Extract and link to it)
- Are you instructing in reference? (Move to how-to guide)
- Is there reference detail in your how-to? (Link to reference instead)
If content serves multiple needs, split it and link between documents.
When Reviewing Existing Documentation
Use this iterative workflow:
1. Choose a piece - Any page, section, or paragraph
2. Challenge it with these questions:
- What user need does this serve?
- Which documentation type should this be?
- Does it serve that need well?
- Is the language appropriate for this type?
- Does any content belong in a different type?
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.
Key Principles
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.
Common Mistakes to Avoid
-
Tutorial/How-to conflation - Tutorials are for learning (study), how-to guides are for working. Signs you've mixed them:
- Your "tutorial" assumes users know what they want to do
- Your "tutorial" offers multiple approaches
- Your "how-to guide" tries to teach basic concepts
- Your "tutorial" addresses real-world complexity
-
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.
Quick Reference Table
| 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 |
Supporting Files
For more detailed guidance, refer to:
- principles.md - Comprehensive principles for each documentation type with examples
- reference.md - Quality framework, complex scenarios, and additional guidance
Output Requirements
When applying Diataxis:
- Be direct and practical
- Focus on serving user needs
- Use the compass to resolve uncertainty
- Cite which documentation type you're applying and why
- If reviewing docs, be specific about what type it should be and how to improve it
- Use British English spelling throughout
How to use writing-documentation-with-diataxis on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add writing-documentation-with-diataxis
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches writing-documentation-with-diataxis from GitHub repository sammcj/agentic-coding and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate writing-documentation-with-diataxis. Access the skill through slash commands (e.g., /writing-documentation-with-diataxis) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.4★★★★★35 reviews- ★★★★★Pratham Ware· Dec 28, 2024
Keeps context tight: writing-documentation-with-diataxis is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Mia Li· Dec 16, 2024
I recommend writing-documentation-with-diataxis for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Mia Kim· Dec 16, 2024
Keeps context tight: writing-documentation-with-diataxis is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Yash Thakker· Nov 19, 2024
writing-documentation-with-diataxis has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Hana Liu· Nov 19, 2024
writing-documentation-with-diataxis fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Carlos Bhatia· Nov 7, 2024
writing-documentation-with-diataxis has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Mia Thomas· Oct 26, 2024
Solid pick for teams standardizing on skills: writing-documentation-with-diataxis is focused, and the summary matches what you get after install.
- ★★★★★Dhruvi Jain· Oct 10, 2024
Solid pick for teams standardizing on skills: writing-documentation-with-diataxis is focused, and the summary matches what you get after install.
- ★★★★★Noah Desai· Sep 17, 2024
We added writing-documentation-with-diataxis from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Noah Verma· Sep 13, 2024
Keeps context tight: writing-documentation-with-diataxis is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 35