mcpField
D
diataxis

diataxis

github.com/keithpattonDocuments2269 installsUpdated 39w ago
Repository

About diataxis

diataxis is a documentation-governance skill that applies the Diátaxis framework to classify, audit, generate, or restructure documentation. It is intended for people and agents maintaining docs, with rules that keep tutorials, how-to guides, reference, and explanation distinct.

Key features

  1. 01Classify docs into four quadrants
  2. 02Audit coverage and mixed-mode issues
  3. 03Generate quadrant-specific documentation
  4. 04Restructure documents by content type
  5. 05Require confirmation before generation

Use cases

  1. 01Classify an existing documentation page
  2. 02Find gaps across a documentation set
  3. 03Draft content for a chosen quadrant
  4. 04Plan a split for mixed-purpose docs

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/keithpatton/diataxis-agent-skill --skill diataxis

After installing, type/diataxisin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
anti-patterns.md
compass.md
quadrants.md

Details

From the project README

Diátaxis Documentation Governance

This skill enforces the Diátaxis framework for documentation. Diátaxis identifies four distinct documentation types based on user needs: tutorials, how-to guides, reference, and explanation. Each serves a different purpose and must be written differently.

Operating Modes

This skill operates in one of the following modes:

  • classify: Identify which quadrant content belongs to
  • audit: Analyze a doc set for gaps, imbalances, and violations
  • generate: Create new documentation in a specified quadrant
  • restructure: Split or reorganize existing mixed-mode content

The mode must be inferred from the user request or explicitly stated. If the operating mode cannot be confidently inferred, ask for clarification before proceeding.

Refusal with explanation is a valid and successful outcome when quadrant purity cannot be maintained.

Generate Mode Policy

For generate mode, one of the following must be true before producing content:

  • The user explicitly states the target quadrant ("write a How-to for X"), OR
  • The agent classifies the request, presents reasoning with confidence+evidence, and receives user confirmation

The Diátaxis Compass

Use this decision tree to classify content into exactly ONE quadrant:

If content......and serves user's......then it belongs to...
informs actionacquisition (study)Tutorial
informs actionapplication (work)How-to Guide
informs cognitionapplication (work)Reference
informs cognitionacquisition (study)Explanation

Two questions to ask:

  1. Does this inform action (doing) or cognition (knowing)?
  2. Does this serve acquisition (learning/study) or application (working)?

Quadrant Summary

Tutorial (learning-oriented)

A lesson that takes the learner through a practical experience. The instructor is responsible for the learner's success. Focus on doing, not explaining. Deliver results early and often. Minimize explanation. No choices or alternatives.

  • Form: Sequential lesson with concrete steps
  • Language: "We will...", "First, do X", "You'll notice that..."
  • Not: Teaching concepts, offering alternatives, explaining why
How-to Guide (goal-oriented)

Directions that guide an already-competent user through a real-world problem. Assumes the reader knows what they want to achieve. Focused on work, not study.

  • Form: Series of steps addressing a specific goal
  • Language: "To achieve X, do Y", "If you want...", conditional imperatives
  • Not: Teaching beginners, explaining concepts, describing machinery
Reference (information-oriented)

Technical description of the machinery. Austere, neutral, accurate. Structure mirrors the thing being described. The user consults it, not reads it.

  • Form: Structured descriptions, tables, specifications
  • Language: "X is...", "The options are...", factual statements
  • Not: Instructing, explaining why, narrative, opinions
Explanation (understanding-oriented)

Discursive treatment that provides context, background, and answers "why". Makes connections, admits opinion, circles around the subject.

  • Form: Prose discussion of a topic
  • Language: "The reason for X is...", "This is because...", "Consider..."
  • Not: Step-by-step procedures, technical specifications, teaching tasks

Core Workflow

For Classification
  1. Read the content carefully
  2. Apply the compass: action/cognition × acquisition/application
  3. Identify the single quadrant
  4. Report with confidence and evidence
For Generation
  1. Confirm the target quadrant (stated or inferred with confirmation)
  2. Apply quadrant constraints strictly
  3. Refuse to blend quadrants; recommend splitting if needed
  4. Validate output against quadrant characteristics
For Audit
  1. Inventory all documentation
  2. Classify each document
  3. Identify gaps (missing quadrants)
  4. Flag violations (mixed-mode, wrong quadrant)
  5. Report imbalances (e.g., "reference-heavy, tutorial-poor")
For Restructure
  1. Classify the existing content
  2. Identify quadrant violations
  3. Propose splits (one document per quadrant)
  4. Present plan for user confirmation before changes

Output Requirements

When classifying or flagging violations, always provide:

  • Quadrant: The identified type (Tutorial, How-to, Reference, Explanation)
  • Confidence: high | medium | low
  • Evidence: Specific phrases, structural patterns, or signals

Example:

Classified as How-to (high confidence). Evidence: imperative verbs ("configure", "set up"), goal-oriented heading, absence of conceptual framing, assumes reader competence.

Violation Detection

Flag these anti-patterns:

  • Tutorial with explanation: Lengthy "why" sections, conceptual digressions
  • How-to that teaches: Beginner framing, "let's learn" language
  • Reference with narrative: First-person voice, procedural instructions
  • Explanation with procedures: Numbered steps, imperative commands
  • Mixed-mode documents: Multiple quadrant signals in single document

For detailed detection patterns and remediation, see references/anti-patterns.md.

Non-Goals

This skill does not:

  • Invent documentation strategy or information architecture
  • Decide product architecture or feature scope
  • Merge multiple Diátaxis quadrants into a single document
  • Override repository-specific documentation rules or style guides
  • Generate content without explicit quadrant classification

Additional Resources

Attribution

Diátaxis is the work of Daniele Procida. This skill encodes the Diátaxis framework for use by AI agents. For the authoritative source and complete documentation, see diataxis.fr.

Licensed under CC-BY-SA 4.0. Citation metadata available at the Diátaxis GitHub repository.

Comments

Markdown supported