Agent skill

Diataxis Docs Writer

by calf-ai in calf-ai/calfkit-sdk

Write or improve software documentation using the Diátaxis framework — four documentation types (tutorials, how-to guides, reference, explanation), each serving a different user need.

Apache-2.0Auto-check passedDevelopment

Install Diataxis Docs Writer

skills CLI
$ npx skills add calf-ai/calfkit-sdk --skill diataxis-docs-writer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install calf-ai/calfkit-sdk diataxis-docs-writer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/calf-ai/calfkit-sdk.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/diataxis-docs-writer .claude/skills/diataxis-docs-writer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
diataxis-docs-writer
GitHub stars
149
Used in
1 other repo
Token cost
~3k tokens
SKILL.md length
1,518 words
Files
8 (incl. references)
Skills in repo
2
Repo updated
First seen
Licence
Apache-2.0

At a glance

Write or improve software documentation using the Diátaxis framework — four documentation types (tutorials, how-to guides, reference, explanation), each serving a different user need.

  • Works in 2 steps: Classify before you write (the compass) → Write to the type's discipline
  • Youre about to write
  • SKILL.md covers The two axes (why there are…, Step 1 — Classify before you…, Step 2 — Write to the type's… and Working mode: authoring vs.…, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Diataxis Docs Writer is an agent skill from calf-ai/calfkit-sdk. Write or improve software documentation using the Diátaxis framework — four documentation types (tutorials, how-to guides, reference, explanation), each serving a different user need. Use it whenever you're about to write or revise documentation for a finished feature, implementation, API, library, CLI, service, or project — READMEs, /docs pages, guides, API/config reference, conceptual overviews — even when the user just says "document this" or "write docs." Especially reach for it right after a feature or PR…

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/distinctions.md`, `references/explanation.md` and `references/how-to-guides.md`).

It sits in Development, covering Technical documentation, Event-driven systems and Technical writing. It works with OpenAI, Pydantic AI, Python and Apache Kafka. The repository describes itself as: 🐮 Build distributed, event-driven agents. The licence is Apache-2.0.

When your agent uses it

  • Youre about to write
  • Revise documentation for a finished feature
  • Project — READMEs
  • API/config reference

Example prompts

  • “document this”
  • “write docs.”
  • “/diataxis-docs-writer”

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Classify before you write (the compass)
  2. Write to the type's discipline

What it can do on your machine

Read from SKILL.md and the folder at commit d50af54. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Diataxis Docs Writer loads about 3k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 256 tokens; SKILL.md has 1,518 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~256
When it runs · the whole SKILL.md, loaded when a task matches
~3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from calf-ai/calfkit-sdk at commit d50af54, republished under its Apache-2.0 licence (© calf-ai). 1,518 words, ~2,952 tokens.

Download SKILL.mdSave it as .claude/skills/diataxis-docs-writer/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
diataxis-docs-writer
description
Write or improve software documentation using the Diátaxis framework — four documentation types (tutorials, how-to guides, reference, explanation), each serving a different user need. Use it whenever you're about to write or revise documentation for a finished feature, implementation, API, library, CLI, service, or project — READMEs, /docs pages, guides, API/config reference, conceptual overviews — even when the user just says "document this" or "write docs." Especially reach for it right after a feature or PR lands and documentation is the next step, and whenever asked to organize, audit, or improve an existing doc set. It helps you pick the right kind of doc, write each in its correct mode, ground every claim in the actual code, and avoid blurring the four types — the most common documentation failure. Do not use it for in-code docstrings or type hints, debugging, summarizing text, code review, proposing or designing something new (e.g. an RFC), or looking up a library's existing docs.

Diátaxis documentation

Good documentation is not one thing. It is four things, each answering a different question a user has, each written in a different way. Most bad documentation is bad not because the writing is poor but because two of these four got mixed together — a tutorial clogged with explanation, a reference page that wanders into opinion, a "how-to" that's really a half-finished lesson.

Your job with this skill is to keep them separate. Decide which kind you're writing, commit to its discipline, and link out to the others rather than bleeding into them.

Diátaxis is a guide, not a plan. You don't start by building four empty sections and filling them in. You write each piece well, in its proper mode, and good structure emerges from that.


The two axes (why there are exactly four)

Every craft involves two distinctions. Documentation must serve both sides of each:

  • Action ↔ Cognition — is the content about doing (practical steps) or about knowing (theoretical facts and ideas)?
  • Acquisition ↔ Application — does it serve the user at study (learning the craft) or at work (applying it to get something done)?

Cross those two axes and you get four quadrants — the four documentation types. There can't be three or five; the two axes define the whole territory.


Step 1 — Classify before you write (the compass)

Before writing a sentence, decide which type you're producing. Ask just two questions:

  1. Action or cognition? (Is this about what the user does, or what they know?)
  2. Acquisition or application? (Is the user studying, or working?)
If the content informs……and serves the user's……then it is a…It answersIts form is
actionacquisition (study)Tutorial"Can you teach me to…?"a lesson
actionapplication (work)How-to guide"How do I…?"a recipe
cognitionapplication (work)Reference"What is…? / What are the options?"dry description
cognitionacquisition (study)Explanation"Why…? / Tell me about…"a discursive article

Use the terms loosely at first — the point is to force a decision, not to win a naming argument. Apply the questions at any zoom level: a whole document, a section, or a single sentence that feels out of place.

Documenting a finished feature usually needs more than one type. A new API endpoint might want a reference entry (the parameters and return values), a how-to (accomplishing a real task with it), and maybe an explanation (why it works the way it does). Don't try to serve all of these in one page. Identify which types the feature actually needs right now, and write each separately. Skip the types it doesn't need yet — better a complete how-to than four thin, half-blurred pages.

When the type genuinely isn't obvious, or you suspect intuition is misleading you, read references/distinctions.md.


Step 2 — Write to the type's discipline

Once you know the type, open its reference file and follow it. Each gives you the principles, the sentence-level language patterns, a worked software example, a skeleton to adapt, and a self-check. Read the one you need — don't work from the summary below alone.

TypeOne-line disciplineRead
TutorialA lesson. Learning-oriented. The user learns by doing, on a single safe path you guarantee works. Ruthlessly minimize explanation.references/tutorials.md
How-to guideDirections to a real-world goal. Goal-oriented. Assumes competence. Can branch. Omit the unnecessary. Title it "How to …".references/how-to-guides.md
ReferenceNeutral technical description. Information-oriented. Austere, consistent, mirrors the structure of the code. Describe and only describe.references/reference.md
ExplanationDiscursive discussion. Understanding-oriented. Answers why. Gives context, alternatives, opinions. Read away from the keyboard.references/explanation.md
The cardinal rule: don't blur the types

Each type has a natural pull toward its neighbours, and resisting that pull is most of the craft:

  • Writing a tutorial or how-to, you'll feel the urge to explain why. Resist it — give the one-line version and link to an explanation.
  • Writing reference, you'll feel the urge to instruct or editorialize. Resist it — link to a how-to or explanation.
  • Writing explanation, you'll feel the urge to fold in steps or full specs. Resist it — they live in the how-to and reference.

The fix is almost always the same: say the minimum, then link to the right place. A one-line "We use HTTPS here because it's more secure (see About transport security)" keeps a tutorial on track far better than a paragraph.

The two confusions worth knowing cold — because they cause the most damage — are tutorial vs. how-to (study vs. work) and reference vs. explanation (consult-while-working vs. read-while-reflecting). Both are covered in references/distinctions.md.

Write only what's true — the code is the source of truth

Documentation is something users trust and act on, so an invented or stale detail is worse than a missing one — it sends people confidently toward something that isn't there. Never document an implementation that doesn't exist.

When your docs describe code — a function, its parameters, return values, flags, errors, a config key, an endpoint — verify every statement against the actual code. The code is the only source of truth that can be fully trusted. Specs, tickets, design docs, the feature description you were handed, and even the existing documentation can all be out of date or have drifted from reality: implementations deviate when problems are hit mid-build, and written intentions are rarely updated to match. So read the real signature, the real schema, the real behavior in the source. When a description and the code disagree, trust the code — and flag the discrepancy so a human can reconcile it. If all you have is a description and you can't see the code, treat the description as an unverified claim: document what you can ground, and clearly mark what you couldn't verify rather than presenting it as fact.

This bites hardest in examples, which are tempting to embellish. An example must demonstrate real, verified behavior — don't reach for an input that asserts behavior nobody confirmed: how a function handles Unicode or empty input, what a config does at its limits, a package's install command or name, an error a call might raise. If a detail matters but you can't verify it against the code, say so plainly ("behavior for X is unspecified") or leave it out — never paper over the gap with a plausible-sounding guess. A confident hallucination is the most damaging thing documentation can contain. Accuracy is the first obligation of functional quality; see references/quality.md.


Show full SKILL.md (467 more words)Show less

Working mode: authoring vs. improving

Authoring new docs for a feature you (or the user) just built:

  1. Ground yourself in the real implementation first. Read the actual code — the source, signatures, config schema, or API surface you're about to document. The code is the source of truth; don't work from the spec, the ticket, or the feature description alone, since those drift from what was actually built. You cannot write truthful docs for code you haven't looked at, and a plausible guess that turns out wrong is worse than no doc at all (see Write only what's true above).
  2. List the user needs the feature creates — "learn it," "do task X with it," "look up its options," "understand why it's designed this way." Map each to a type via the compass.
  3. Write each piece in its proper mode, reading the relevant reference file.
  4. Match the project's existing docs conventions — file layout, format, tone. Default to Markdown if there's nothing to match. Look at how the repo already documents things before inventing a structure.
  5. Run the per-type self-check, then the quality pass (references/quality.md).

Improving an existing doc set — don't rewrite it top-down. Diátaxis works iteratively, and improvements cascade naturally from small changes:

  1. Choose something — a page, a section, even a single paragraph. Don't hunt for the worst problem; start with what's in front of you.
  2. Assess it against the standards: What user need does this serve? How well? Does its language and logic match its mode? What's blurred in from another type?
  3. Decide one change that produces an immediate improvement.
  4. Do it, and consider it complete. Then repeat.

Resist two temptations when improving: tearing it all down to start over, and creating empty tutorial/, how-to/, reference/, explanation/ folders to "fix the structure." Structure should emerge from improved content, not be imposed on top of it.


Organizing a documentation set

When you're shaping more than a single page — a /docs tree, a landing page, a whole site — the four types become top-level sections, but the real world is often more complex (multiple user types, platforms, or topic areas). For how to structure landing pages, hierarchies, and these two-dimensional cases, read references/structure.md.


Before you call it done

Read references/quality.md for the self-review pass. The short version: first secure functional quality (accuracy, completeness, consistency) — Diátaxis can't give you these but it exposes where they're missing — then check for deep quality: does each page do exactly one job, in the right voice, with nothing blurred in from a neighbour, in a way that flows?

Reference files

© calf-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in .agents/skills/diataxis-docs-writer of calf-ai/calfkit-sdk.

  • SKILL.md
  • references/distinctions.md
  • references/explanation.md
  • references/how-to-guides.md
  • references/quality.md
  • references/reference.md
  • references/structure.md
  • references/tutorials.md

Open the folder on GitHubat commit d50af54

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in calf-ai/calfkit-sdk, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Diataxis Docs Writer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Diataxis Docs Writer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Diataxis Docs Writer this skillcalf-ai/calfkit-sdk1491 repos~3kAutomated safety check: PassApache-2.0
Docsbrickbots/PiFinder250—~6.2kAutomated safety check: PassGPL-3.0
Updating Docs For Releasestreamlit/docs178—~4kAutomated safety check: PassApache-2.0
Generate Readmedivar-ir/ai-doc-gen767—~996Automated safety check: PassMIT
Adk Stylegoogle/adk-python22k—~769Automated safety check: PassApache-2.0
Project Docsjjmartres/opencode133—~1.3kAutomated safety check: PassMIT

Similar skills

  • Docs

    brickbots/PiFinder

    Author and edit PiFinder's user-facing documentation in the project's house style.

    250 GitHub stars~6.2k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Update the streamlit/docs repo for a new Streamlit release. An agent skill from streamlit/docs.

    178 GitHub stars~4k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Generate Readme

    divar-ir/ai-doc-gen

    Generate or refresh a comprehensive, professional README.md for a repository, with architecture overview, mermaid and optional C4 diagrams, repository structure, dependencies, and API documentation.

    767 GitHub stars~996 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Adk Style

    google/adk-python

    Official

    Python style and codebase conventions for ADK (Agent Development Kit): private-by-default file visibility, imports, type hints, Pydantic v2 models, formatting, docstrings, logging, async I/O, file…

    22k GitHub stars~769 tokensUpdated today
    DevelopmentAuto-check passed
  • Project Docs

    jjmartres/opencode

    Generate comprehensive, professional project documentation structures including README, ARCHITECTURE, USERGUIDE, DEVELOPERGUIDE, and CONTRIBUTING files.

    133 GitHub stars~1.3k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed
  • Python Code Style

    wshobson/agents

    Python code style, linting, formatting, naming conventions, and documentation standards.

    40k GitHub stars~2k tokensUpdated 5 days ago
    DevelopmentAuto-check passed

More from calf-ai/calfkit-sdk

  • Opensource Guide Coach

    calf-ai/calfkit-sdk

    A skill your agent uses when a user wants guidance on starting, contributing to, growing, governing, funding, securing, or sustaining an open source project, or asks about contributor onboarding…

    149 GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed

Categories

Questions about Diataxis Docs Writer

What does Diataxis Docs Writer do?

Write or improve software documentation using the Diátaxis framework — four documentation types (tutorials, how-to guides, reference, explanation), each serving a different user need. Diataxis Docs Writer is an agent skill from calf-ai/calfkit-sdk. Write or improve software documentation using the Diátaxis framework — four documentation types (tutorials, how-to guides, reference, explanation), each serving a different user need.

When should I use Diataxis Docs Writer?

Diataxis Docs Writer fits situations like: youre about to write; revise documentation for a finished feature; project — READMEs; API/config reference.

How do I install Diataxis Docs Writer in Claude Code?

Run `npx skills add calf-ai/calfkit-sdk --skill diataxis-docs-writer -a claude-code`. Or copy the skill folder (.agents/skills/diataxis-docs-writer in calf-ai/calfkit-sdk) into .claude/skills/diataxis-docs-writer in your project. Claude Code loads it when a task matches its description.

How do I install Diataxis Docs Writer in Codex?

Run `npx skills add calf-ai/calfkit-sdk --skill diataxis-docs-writer -a codex`. Or copy the skill folder (.agents/skills/diataxis-docs-writer in calf-ai/calfkit-sdk) into .agents/skills/diataxis-docs-writer in your project. Codex loads it when a task matches its description.

Can I use Diataxis Docs Writer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add calf-ai/calfkit-sdk --skill diataxis-docs-writer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/diataxis-docs-writer, .gemini/skills/diataxis-docs-writer, .github/skills/diataxis-docs-writer and .opencode/skills/diataxis-docs-writer in your project.

What does Diataxis Docs Writer need to run?

SKILL.md names no scripts, command-line tools or credentials: Diataxis Docs Writer is instructions for the agent only.

Does Diataxis Docs Writer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Diataxis Docs Writer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Diataxis Docs Writer use?

Diataxis Docs Writer is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Diataxis Docs Writer use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9.6k tokens, read only when the agent opens those files.

What are the alternatives to Diataxis Docs Writer?

Skills that share tags, products or a category with Diataxis Docs Writer: Docs (brickbots/PiFinder, 250 stars), Updating Docs For Release (streamlit/docs, 178 stars), Generate Readme (divar-ir/ai-doc-gen, 767 stars) and Adk Style (google/adk-python, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Diataxis Docs Writer?

calf-ai (a GitHub organization) maintains it in calf-ai/calfkit-sdk, which has 149 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on August 31, 2026.

Source: calf-ai/calfkit-sdk on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.