skills/diataxis/SKILL.md
Helps maintain documentation pages based on the Diataxis method. Analyzes existing docs, classifies pages into tutorials/how-to/explanation/reference categories, identifies gaps, and helps create or restructure documentation following Diataxis principles. Use when user mentions documentation structure, Diataxis, doc categories, tutorials vs how-to guides, or reorganizing docs.
npx skillsauth add rlespinasse/agent-skills 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 are helping the user organize and maintain their project documentation following the Diataxis framework.
Diataxis (from Ancient Greek: dia — "across", taxis — "arrangement") is a systematic approach to technical documentation that organizes content into four categories based on user needs. See diataxis.fr for the full framework.
| Category | Orientation | Purpose | Form | | ----------------- | ---------------------- | ---------------------------------------- | ------------------- | | Tutorials | Learning-oriented | Guide a beginner through learning | A lesson | | How-to guides | Task-oriented | Help accomplish a specific goal | A series of steps | | Explanation | Understanding-oriented | Deepen understanding through discussion | A discursive essay | | Reference | Information-oriented | Provide precise technical descriptions | Dry, accurate facts |
Use two questions to classify any content (see references/compass.md):
| | Acquisition (study) | Application (work) | | --- | --- | --- | | Action (practical) | Tutorial | How-to guide | | Cognition (theoretical) | Explanation | Reference |
Scan the project for documentation files:
docs/, doc/, documentation/ directoriesREADME.md, CONTRIBUTING.md, CHANGELOG.md.rst, .adoc, .txtmkdocs.yml, docusaurus.config.js, conf.py, antora.yml, hugo.tomlRead existing documentation to understand what is already covered.
If no documentation exists:
Analyze each documentation page and classify it into one of the four Diataxis categories.
Before suggesting reclassification, check git history for deliberate prior moves:
git log --all --oneline --diff-filter=R -- 'docs/**/*.md'
If a file was intentionally moved between categories (e.g., a commit message like
docs(diataxis): reclassify X as reference), respect that decision unless the user
explicitly asks to revisit it. A prior deliberate reclassification reflects a judgment
that the compass alone may not capture — flag it to the user rather than overriding it.
Use the compass questions and these signals. For detailed writing guidance per category,
see the reference files in references/.
A page is a Tutorial if it (see references/tutorials.md):
A page is a How-to guide if it (see references/how-to-guides.md):
A page is Explanation if it (see references/explanation.md):
A page is Reference if it (see references/reference.md):
Many pages contain content from multiple categories. Flag these for the user and suggest how to split them:
Some content types sit at the compass boundary. Do not apply the compass mechanically — consider the page's structure and intended use:
When in doubt about a boundary case, consider: how will the reader use this page? Consulted for lookup → Reference. Followed as steps → How-to.
Present results as a table:
| File | Current Category | Suggested Category | Notes |
|--------------------------|------------------|--------------------|--------------------------------|
| docs/getting-started.md | - | Tutorial | Good tutorial structure |
| docs/api.md | - | Reference | Contains some how-to content |
| docs/architecture.md | - | Explanation | Well-structured explanation |
Based on the analysis, propose a Diataxis-aligned directory structure.
docs/
tutorials/ # Learning-oriented
getting-started.md
first-project.md
how-to/ # Task-oriented
install.md
configure.md
deploy.md
explanation/ # Understanding-oriented
architecture.md
design-decisions.md
reference/ # Information-oriented
api.md
configuration.md
cli.md
After classifying existing content, identify missing pieces:
Present gaps clearly:
Documentation gaps identified:
- [ ] Missing: Tutorial for getting started
- [ ] Missing: How-to guide for deployment
- [ ] Missing: Reference for configuration options
- [x] Covered: Architecture explanation exists
Always ask the user before making changes. Present the plan and wait for approval.
Tutorial template (see references/tutorials.md for writing principles):
# [Title — state what we will build/create]
In this tutorial, we will [concrete goal — what the reader will have at the end].
## Before you begin
- [Prerequisite 1]
## Step 1: [First step — concrete action]
[Direct instruction. Show expected output after each step.]
The output should look something like:
[example output]
## Step 2: [Second step — builds on previous]
[Direct instruction. Point out what to notice.]
Notice that [observation that closes a learning loop].
## What you've built
You have [concrete summary of achievement].
## Next steps
- [Link to next tutorial or related how-to guide]
How-to guide template (see references/how-to-guides.md for writing principles):
# How to [accomplish specific goal]
This guide shows you how to [task description].
## Prerequisites
- [Prerequisite — assume basic competence]
## Steps
### 1. [First step]
[Concise, actionable instruction]
### 2. [Second step]
[Concise, actionable instruction]
Refer to the [x reference](link) for a full list of options.
## Troubleshooting
### [Common problem]
If you want [x], do [y].
Explanation template (see references/explanation.md for writing principles):
# [Topic — should read naturally after "About"]
[Opening paragraph that establishes context and scope]
## Background
[Historical context, design decisions, or foundational concepts]
## [Main concept]
[Discursive explanation — make connections, provide context, admit perspective]
The reason for [x] is because [historical/technical context].
[W] is better than [z] because [reasoning].
## Alternatives and trade-offs
[Discussion of other approaches and why this one was chosen]
## Further reading
- [Related resources]
Reference template (see references/reference.md for writing principles):
# [Component] Reference
[One-line description of what this reference covers]
## [Section — mirrors structure of the machinery]
| Parameter | Type | Default | Description |
| --------- | ------ | ------- | ----------- |
| `name` | string | - | Description |
## [API/Function/Command]
**Signature:** `function_name(param1, param2)`
**Parameters:**
- `param1` (type) — Description
- `param2` (type) — Description
**Returns:** Description of return value
**Example:**
result = function_name("value", 42)
If a page is already in the right category but needs improvement to better follow Diataxis principles:
Detailed writing guidance for each category, extracted from diataxis.fr:
development
Ensures all project content is written in proper French with correct accents, grammar, and typography. Use when user mentions french, français, langue française, accents, orthographe, typographie, or when working on a project that requires French language content. Also use when generating any text-based file (SVG, Mermaid, PlantUML, Draw.io, HTML, CSV, JSON, YAML, etc.) in a French-language project. Helps enforce French writing conventions across all file types.
development
Verifies that features listed in a README (or similar documentation) are actually implemented in the codebase. Use when user mentions verify features, check feature list, confirm README, validate documentation claims, or audit feature accuracy. Helps catch stale, missing, or inaccurate feature descriptions.
development
Checks GitHub Actions CI logs on a pull request, diagnoses failures, and guides the agent to implement fixes. Use when user mentions CI failing, check PR logs, fix pipeline, GitHub Actions errors, workflow failures, build broken, tests failing on PR, or debug CI. Focuses on PR-scoped CI analysis only.
testing
Migrates GitHub Actions workflows to use pinned commit SHAs instead of tags, resolves the latest release versions, flags major version jumps, and configures Dependabot with grouped updates. Use when user mentions pin actions, pinned versions, SHA pinning, GitHub Actions security, dependabot setup, or supply-chain security.