/doc-authoring:agents-documentationfrom doc-authoring
Create and maintain internal project documentation written for AI agents (docs/agents/) — architecture, design decisions, feature status, testing and release conventions — so that any future implementation task starts already knowing the project's patterns and constraints. Use this skill whenever the user asks to document a project for agents, create or update docs/agents/, write internal/agent-facing documentation, capture design decisions or architecture notes, or says things like "document this project", "update the agent docs", or "make sure agents know about X" after a refactor or new feature.
Ships in doc-authoring. 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.
Read when SKILL.md points to them.
Create and maintain a docs/agents/ directory: a small set of dense markdown
files that give a future agent (or developer) the context it cannot cheaply
re-derive from the code — design decisions and their reasons, invariants that
must not be broken, feature status, and project conventions.
An agent starting a task can read code, but code does not say why it is shaped that way, which gaps are deliberate, or which invariant will cause a security bug if moved. Without these docs every task re-explores the repo and risks re-litigating settled decisions. The docs are the project's distilled memory: cheap to read (a few files), current (maintained alongside changes), and honest about debt.
That purpose drives every rule below: write only what the code cannot say by itself, and never let the docs lie about the code.
Decide which situation you are in:
docs/agents/ does not exist (or is empty). Research the
project and write the initial set.In update mode, read the existing docs first, then verify their claims against the code before adding anything. Stale docs are worse than no docs — an agent will confidently use a renamed package or a removed handler.
Gather from the sources that hold decisions, not just structure:
docs/ subdirectories
(e.g. brainstorm/spec folders), review documents. These hold the why;
distill them, then link to them as historical record.Docs live in docs/agents/. Produce the core set, adapted to the project;
skip a file when it genuinely does not apply, and say so if asked.
| File | Contents | When |
|---|---|---|
architecture.md | Layering diagram, package roles, design principles, key domain types, dependencies, known debt pointer | Always — this is the entry point |
features.md | Status table of every user-facing capability: Implemented / Partial / DIY-by-design / Not implemented, and where it lives | Always for products/libraries with features |
testing.md | Test strategy, how to run tests/lint/coverage, gates and thresholds, conventions (table-driven, fixtures, etc.) | Always when the project has tests |
releasing.md | How a release happens, versioning rules, pre-release gates, consumer-compatibility cautions | When the project releases something (tags, packages, deploys) |
<subsystem>.md | Deep dive into one complex subsystem: its invariants, composition, semantics | When a subsystem is complex enough that its rules don't fit in architecture.md — one file per such subsystem |
Every file cross-links the related ones (see [loginflow.md](loginflow.md)),
and architecture.md links all of them so an agent that reads only one file
still discovers the rest.
Wire up discovery: agents must find these docs without being told. Ensure
the project's agent entry file (CLAUDE.md, AGENTS.md, or both — whichever
the project uses) tells agents to read docs/agents/ before implementation
work, e.g. "Before implementing, read docs/agents/architecture.md and the
subsystem doc for the area you're changing." Add the pointer if missing;
don't duplicate the docs' content there.
Read references/style.md for annotated examples of each pattern. The rules:
Distill decisions, don't mirror code. A doc that restates signatures goes stale on the next commit and adds nothing. Record what the code cannot say:
Result{OK:false} so transports stay enumeration-safe"The code wins. State it explicitly when linking historical specs: they are
records of the decision, not the current truth. If a spec named a package
dbuser and it is now userdb, say "the spec's naming is stale, the
structure is not." Never leave the reader to guess which source is current.
Date the decisions. "Redesigned 2026-06-30 (link to spec)" lets a future agent judge freshness and find the full reasoning.
Status tables for features. Feature | Status | Where. The most valuable statuses are the honest ones:
This section is what stops an agent from "helpfully" implementing something that was deliberately omitted, or re-designing a gap that already has a plan.
Name the gates. Testing/releasing docs must give the exact commands
(make verify, thresholds, what refuses to run when) so agents can
self-verify instead of guessing.
Dense and imperative. These docs are read by agents under token pressure.
Short framing paragraph per file (# Topic — subtitle), then tight sections.
"Check here before adding a capability — the gap may already be catalogued."
No marketing prose, no restating what a glance at the directory tree shows.
Keep each file under ~150 lines. If a subsystem needs more, that is the
signal to give it its own <subsystem>.md deep dive.
When maintaining existing docs:
docs/agents/ first.architecture.md links every other agent doc.CLAUDE.md/AGENTS.md) points to docs/agents/.docs/agents/ could answer: how is this layered, what
exists and what is deliberately missing, how do I verify my change, and
what must I never break?What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub andresbott/ai-extension-collection --plugin doc-authoring