/nexus-agents:diataxisfrom nexus-agents
Classifies, audits, restructures, or generates documentation pages by Diátaxis type (tutorial, how-to, reference, explanation), with confidence scores and quoted evidence. Owns the diataxis/audience frontmatter contract.
Ships in nexus-agents. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Diátaxis sorts documentation by what the reader is doing at the moment they open the page. A page that serves one need does it well. A page that serves two usually does both badly, because the two needs ask for opposite writing. This skill says which need a page serves, finds the passages that serve a different one, and moves those passages to where they belong.
It does not score quality. Quality is the 100-point rubric in
.rules/docs-rubric.md, applied by docs-review.
Two questions place any page, or any single sentence (diataxis.fr/compass):
| Acquisition (learning) | Application (working) | |
|---|---|---|
| Action | tutorial | how-to |
| Cognition | explanation | reference |
Apply the questions sentence by sentence, not only page by page. A how-to that stops to explain a design choice has a sentence of explanation inside it. Each such sentence counts as evidence in a verdict.
Every page under docs/ (except the generated docs/api/) declares:
---
diataxis: how-to # tutorial | how-to | reference | explanation | none
audience: user # user | project
---
none is allowed only on the page kinds named in
docs/ops/diataxis-none-kinds.json: index and landing pages, ADRs,
changelogs, research notes and archive. Do not add a kind to get one page past
the gate. Change that file only when a whole class of pages is not
reader-facing documentation.audience: user means someone using nexus-agents. audience: project
means someone working on nexus-agents itself: maintainers, contributors, and
the agents that work on this repo.The gate is a ratchet over a set of pages, not a count.
docs/ops/diataxis-frontmatter-baseline.json lists, for each key, the exact
pages allowed to omit it. The check fails when an undeclared page is not on
the list, when a listed page now declares the key, and when a listed path no
longer exists. So a PR that declares a page must also drop it from the list:
run pnpm exec tsx scripts/check-diataxis-frontmatter.ts --update-baseline,
which only removes entries. Adding an entry needs --allow-growth as well, and
a reviewer should ask why. Zero pages scanned is a failure reported as
unmeasured, not a pass.
Pick one mode per request. Each mode builds on the one before it.
Return one verdict per page:
path: docs/guides/SETUP.md
declared: how-to # or "missing"
type: tutorial # what the content is now
confidence: medium # high | medium | low
evidence:
- line: 12
quote: "In this lesson you'll build your first pipeline"
signal: acquisition + action
- line: 40
quote: 'Run `pnpm install`, then check that the output matches below'
signal: guided steps with expected output
high when nearly every quoted signal points one way,
medium when one type dominates but others appear, and low when the page
splits or is too short to tell. Low confidence is a valid answer. Do not round
it up.Classify the page, then walk the checklist for its declared type, or its
inferred type if it declares none. Report each mixed-mode passage as
{line range, foreign type, quote}. Report frontmatter errors from the gate as
they are. The output is a finding list. Make no edits.
Move each mixed-mode passage to a page of the right type, then link back to it from the old location.
tutorials/, how-to/,
reference/ and explanation/ sections in advance. A page or section exists
once there is content for it
(diataxis.fr/how-to-use-diataxis).diataxis: and audience: on every page you touch.Write a new page of one declared type. Set the frontmatter first, write to that type's checklist, and link to the other types rather than absorbing them. Classify the result before handing it back. If the verdict differs from the declared type, the page is not done.
Each list is what the type needs and what it must not contain. Each list links to the diataxis.fr page that explains the type in depth.
These are the patterns an audit reports most often. Each one names the passage type that crept in and where it should go.
| Pattern | Foreign content | Move it to |
|---|---|---|
| A tutorial step stops for a design digression | explanation | an explanation page, then link |
| A how-to opens with "background" sections | explanation | an explanation page |
| A how-to pastes the full option or flag table | reference | the reference page |
| A reference entry says "first, do X; then Y" | how-to | a how-to guide |
| A reference page argues why the design is good | explanation | an explanation page |
| An explanation ends with a step-by-step procedure | how-to | a how-to guide |
| A "getting started" page offers five install paths | how-to options | one tutorial path + a how-to |
| A README tries to be all four | everything | a landing page that links |
docs-review: the audit dimension. It runs diataxis in audit mode
alongside the rubric, and reports a mixed-mode passage or a declared/inferred
mismatch as a Structure finding. The rubric weights stay in
.rules/docs-rubric.md.docs-rewrite: restructure mode. When the audit finds a mixed-mode
passage, the rewrite plan lists each move (from, to, link-back) before any
edit. Move-never-delete applies inside its Phase 4.documentation-management: the "declare frontmatter" step for every new
or touched page, and the Diátaxis Frontmatter job in docs-check.yml..rules/docs-rubric.md via docs-review.docs/api/. That tree is generated. Fix its source instead.Diátaxis is Daniele Procida's framework, published at diataxis.fr under CC BY-SA 4.0. This file links to it and is written in its own words. Two ideas come from other agent skills; their text is not reused:
documentation-diataxis): keep the declared type and the inferred type
apart, and report when they differ.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Claude Code installs this plugin but refuses to load it
hooks/hooks.json: hooks.PreToolUse.0: Hook matcher "hooks" must be an array of hook entries; received undefined; hooks.PreToolUse.1: Hook matcher "hooks" must be an array of hook entries; received undefined — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
hooks/hooks.json: hooks.PreToolUse.0: Hook matcher "hooks" must be an array of hook entries; received undefined; hooks.PreToolUse.1: Hook matcher "hooks" must be an array of hook entries; received undefined — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
Checked against Claude Code 2.1.332. The listing below is what the repository ships; Claude Code doesn't load it as published.
34 skills in this plugin
/api-and-interface-designDesign stable, hard-to-misuse interfaces — REST endpoints, MCP tool
schemas, module boundaries, type contracts. Apply when defining new
surfaces or evolving public ones. Triggers on "API design", "interface",
"schema", "contract", "module boundary", "type design".
/browser-testing-with-devtoolsTest UI in real browsers via Chrome DevTools MCP. Apply when debugging
rendering issues, console errors, network behavior, performance, or
accessibility — anywhere static code analysis can't see runtime state.
Triggers on "browser test", "DOM inspect", "console errors",
"network trace", "core web vitals in browser", "ui bug repro".
/bug-fixFix a bug following project standards.
Use when fixing defects, debugging issues, or resolving reported problems.
Triggers on "fix bug", "debug", "fix issue", "resolve bug".
/code-simplificationReduce nesting, extract names, eliminate redundancy without changing
behavior. Apply after features work and tests pass — never as a
drive-by during feature work. Triggers on "simplify", "refactor for clarity",
"this is hard to read", "code review flagged complexity".
/codex-delegatorDelegate code generation tasks to Codex CLI for optimal performance.
Use when implementing features, generating tests, refactoring code, or
making bulk code changes. Triggers on "delegate to codex", "route to codex",
"use codex", "code generation".
/context-engineeringCurate what the agent sees, when, and how it's structured. Apply when
starting a session, when output quality drifts, when fanning out
subagents, or when configuring rules files. Triggers on
"context engineering", "rules file", "agent context",
"subagent fan-out", "context budget".
Other plugins' skills for the same job