/agents:docs create|update|publish [design|manual|notes|rules] [repo path]from agents
Create, update or publish a repo's four books in docs/ - docs/design/ (the design doc and repo bible, complete enough that an engineer can rebuild the project from it alone), docs/manual/ (the user manual, in GNU manual chapter order, with real screenshots), docs/notes/ (working notes, tidied and listed) and docs/rules/ (the AI agent working rules, moved out of a thin AGENTS.md) - with D2/TALA and Mermaid diagrams, a build script for checks, a publish mode that makes the HTML, PDF and EPUB book in docs/book, a docs-only rebuild test and a fresh-reader manual test. Use when the user says create docs, write the docs, document this repo, write a design doc or repo bible, write the user manual, tidy the notes, thin AGENTS.md, move the rules, publish the book, docs book, update the docs, sync the docs, docs are stale or runs /docs. Run by hand after a task is done, or by Ishikari's docs ant after a merge; never on its own. Create mode researches first, interviews the user, waits for an OK on the outline, and works on a docs-book branch without pushing; called by an ant it takes its answers from the ant's docs brief and asks nothing. Update mode brings the docs in line with what changed and what was learned.
Trending skills
7-day visitors to each skill page
Ships in 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.
Write the four books in docs/ (see docs/rules/docs.md, The bible, the manual and the notes):
| Folder | Book | Reader | Holds |
|---|---|---|---|
docs/design/ | The bible | An engineer or an agent | What the project is, how it works and why |
docs/manual/ | User manual | A person who uses the app | How to install it and use every screen and command |
docs/notes/ | Notes | The owner | Research, history, plans, measurements and working notes |
docs/rules/ | Rules | An AI agent | How to work in this repo: working rules and code details |
An old design book in docs/, doc/ or a root <repo>.md moves to docs/design/ with git mv.
docs/book/ is the published book: made only by Publish mode, ignored by git, never edited by hand.
Other folders in docs/ (such as agent1's docs/prompts/) are left alone.
Run only when the user asks, after a task is done and its code is written, or when Ishikari's docs ant calls update after a merge.
Called by an ant: never ask the user; put questions in Open questions, and skip the docs-only rebuild test and the fresh-reader manual test.
Create mode called by an ant: the ant's docs brief stands in for the Phase 2 interview and the Phase 3 OK.
Take every answer from the brief, decide the outline yourself and go straight on to Phase 4.
Work on the branch the ant was given, not docs-book.
Install nothing, and move or delete a root file only where the brief says yes; name each skipped step in the report.
The same holds for rules: move them out of AGENTS.md only where the brief says yes to the split; otherwise add the pointer to docs/rules/README.md at the top of AGENTS.md, leave the rest and say so in the report.
Never start on your own, before a task or in the middle of one.
Three modes, picked by the first argument:
create - write the books from scratch, or rebuild a docs folder that is not yet a book. Runs Phases 1-7.update - bring the docs in line with what changed and what was learned. Runs Update mode.publish - make the HTML, PDF and EPUB book in docs/book/. Runs Publish mode. Create and update never publish.The second argument names one book: design, manual, notes or rules.
No book named: all four, and every phase and step below covers all four.
One book named: do only the parts of each phase that belong to it.
No mode given: update if the book exists (for design, also an old book in docs/, doc/ or a root <repo>.md), create otherwise.
With all four, each book gets its own mode: a repo with a design book and no manual updates the first and creates the second.
Say which mode was picked for each book in the first line.
Create the four books in docs/ for this repository.
Done means:
docs/design/ alone, without the source code. The book is language agnostic: no source paths, line numbers, test or function names; those go in docs/rules/.docs/manual/ and the app's own help alone.docs/notes/ and listed in docs/notes/README.md with one line on what it holds.docs/rules/, listed in docs/rules/README.md, and AGENTS.md is only a pointer to it.README.md. The other books link to it.Write for humans first.
AI agents get a thin AGENTS.md that points to docs/rules/.
docs/design/, docs/manual/, docs/notes/ or docs/rules/. Create a folder if it's missing. If it exists, build on it: keep what's correct, fix what's stale, fold in the rest.docs-book, commit at the end of every phase that changes files, and never push. If the working tree has uncommitted changes, stop and ask first. Skip git steps if this isn't a git repo.requirements.org, requirements/*.org, REQUIREMENTS.md, requirements/*.md), entries with :ID: or OPEN/TODO/DONE or Lemmax CONJECTURE/LEMMA/THEOREM/REFUTED headings, Lemmax proofs files (*.proofs.org, :PROVES:/:TEST:), Lemmax tasks and notes files (*.tasks.org, *.notes.org), axioms (AXIOM headings), user stories, PRDs, specs and acceptance-criteria lists. Never convert or delete them on your own: ask the user, per trace, whether to convert it into the docs (its facts go into the chapters that own them: goals into Overview, acceptance criteria into Quality, decisions into ADRs, open items into Open questions, then the source is removed), keep it as is and link to it, or leave it out. Recommend converting. Called by an ant: never ask; leave them and list them in the report.Official sources for the rules in this skill.
| Read | For |
|---|---|
| CommonMark spec | Base Markdown syntax; latest is 0.31.2 |
| GFM spec | Tables, task lists, strikethrough, autolinks |
| GitHub alerts | Callout syntax |
| GitLab alerts | How GitLab renders callouts |
| Mermaid docs | Diagram syntax |
| Mermaid config schema | htmlLabels and theming |
| Mermaid CLI | mmdc options: background, config file |
| D2 tour | D2 language |
| D2 CLI manual | Flags, themes, layout engines |
| TALA layout engine | What TALA supports: position locking, per-container direction, near |
| TALA is open source | Bundled since D2 v0.9.0; seeds and trade-offs |
| Graphviz docs | DOT language, dot -Tsvg |
| librsvg | rsvg-convert, used to check diagram labels |
| C4 model | System context and container diagrams |
| MADR | Decision record format |
| markdownlint-cli2 | Lint config and rules |
| lychee | Link checking, including anchors |
| pandoc manual | GFM input; publish_books reads chapters with it |
| AGENTS.md | Agent instruction file format |
| Claude Code and AGENTS.md | When Claude Code reads AGENTS.md, and the @AGENTS.md import |
d2 v0.9.0 or later (it bundles TALA), Mermaid CLI (mmdc, or npx -p @mermaid-js/mermaid-cli mmdc), markdownlint-cli2, lychee or another link checker, pandoc 3 and texi2any 7 (for Publish mode), rsvg-convert, and Graphviz dot if you'll need it. For anything missing, note an install command; prefer no-install runners (npx, uvx).docs/notes/.--help and help output. Find out how to start the app with invented data, for screenshots.AGENTS.md and every agent-specific file (CLAUDE.md, GEMINI.md, .github/copilot-instructions.md, Cursor rules) and list each rule and each code detail in them.If you can't reach the web or a URL, say which, use the closest official source, and note what you assumed. Don't start Phase 2 until this phase is done.
Interview the user until you can state the project's purpose, users, scope, non-goals and the reasons behind its main design choices, and the user confirms your summary. Ask only what the repo and the web can't tell you. Settle the questions others depend on first, and push back on vague answers.
In the first round, also ask:
docs/notes/ unchanged, or leave it. Recommend docs/notes/ for research, history, plans and measurements. Content that moves is not kept in two places. These always stay in the root: README.md (to be trimmed to a short pitch plus a link to docs/design/README.md), LICENSE, CHANGELOG* and AGENTS.md.Propose, for the design book and the manual, the chapter list (file name, one-line purpose), the diagram list (chapter, type, tool, what it shows) and the screenshot list (chapter, screen).
For notes, propose the list of files to move in and how docs/notes/README.md groups them.
For rules, propose the split: each topic file with the rules that move into it, as written, and what is left in AGENTS.md.
Wait for the user's OK, then write each book's README.md with its table of contents and commit.
Start from these skeletons.
Drop what doesn't apply, split what's too big (for example, one chapter per package in a monorepo), and never pad: a small repo may need four chapters.
Name chapters NN_snake_name.md, numbered in reading order (01_install.md).
Design book:
| Chapter | Covers |
|---|---|
Cover (README.md) | What this is, reading order, conventions, how to render diagrams and run checks |
| Overview | Problem, users, scope, non-goals, success criteria |
| Architecture | System context and container diagrams, components, tech stack with versions and why |
| One per major component | Responsibility, interfaces, internals, failure modes |
| Data | Data model (ER diagram), schemas, invariants, storage, migrations |
| Interfaces | Exact contracts with examples: APIs, CLI, events, file formats, external services used |
| Behavior | Key flows (sequence diagrams), state machines, algorithms in pseudocode, errors, edge cases |
| UI, if any | Screens, navigation map, layout rules |
| Configuration | Every config key and environment variable: type, default, effect |
| Build, run, deploy | Toolchain and dependency versions with their purpose, exact commands, deployment, operations |
| Quality | Testing approach, acceptance criteria taken from the tests (given / when / then), performance, security |
| Decisions | One ADR per significant decision: context, decision, alternatives, consequences |
| Rebuild guide | Ordered milestones from an empty folder, each with the chapters it needs and how to verify it |
| Glossary | Domain terms |
| Open questions | Unknowns awaiting an answer |
Manual, in the order GNU manuals use (see GNU manuals):
| Chapter | Covers |
|---|---|
Cover (README.md) | What the app is in one line, who the manual is for, table of contents |
| Overview | What the app is for, what it does not do, the words a user meets |
| Install | What it needs, install, first start, upgrade, remove |
| Getting started | One first session from start to finish, as a tutorial |
| One per task or screen | What the user wants to do, the steps, the screenshot, what can go wrong |
| Invoking | Each command: what it is for and one example, then a link to x --help; never a copy of usage |
| Settings | The settings a user changes and how; the full key table stays in the design book, linked |
| Troubleshooting | Symptom, cause, fix |
| Copying | A link to LICENSE; left out when there is none |
Notes have no skeleton: docs/notes/README.md lists every note with one line each, grouped by kind (research, history, plans, measurements).
Rules have no skeleton either: one file per topic (git.md, testing.md, code.md), named by topic because rules are looked up, not read front to back. docs/rules/README.md is the entry an agent reads first: it lists every rule file with one line on when to read it.
README.md and AGENTS.md link into docs/; they never restate it.docs/rules/ (see Goal).--help. Show the one command a step runs; never copy a usage line or an option list, link to x --help.docs/manual/images/<chapter>_<screen>.png, at one fixed window size, embedded with alt text that says what it shows. No personal data or secrets on screen.git mv, unchanged, and fix the links the move broke.model_usage_history.md), without numbers or previous / next links: they are looked up by topic, not read front to back.docs/notes/README.md a true list: every note, one line each, nothing listed that is gone.AGENTS.md and the agent-specific files into its topic file, word for word, after the user's yes to the split. Never reword, merge or drop a rule; a rule that looks stale or doubled is named in the report.docs/rules/code.md: layout, build, test and run commands, test names and which rule each checks, evidence with file and line. Write the ones the repo lacks.docs/rules/README.md opens with what an agent must do at session start, then lists every rule file.> [!NOTE], TIP, IMPORTANT, WARNING, CAUTION), never nested inside other blocks. GitHub, GitLab and pandoc understand them; elsewhere they degrade to plain quotes.vars: { d2-config: { layout-engine: tala } }; if TALA isn't available, use ELK and say so.top and left.docs/design/diagrams/ (a manual diagram in docs/manual/diagrams/), named <chapter>_<name>.mmd, .d2 or .dot. Commit the rendered .svg next to each source and embed it as an image whose alt text says what it shows.htmlLabels: false (the per-diagram setting is deprecated): labels inside <foreignObject> vanish in editors, PDF and EPUB.Commit one POSIX shell script, docs/build.sh, pinning tool versions where the runner allows (e.g. npx [email protected]):
diagrams: render every source in docs/design/diagrams/ and docs/manual/diagrams/ to SVG, with Mermaid settings in a committed docs/design/diagrams/mermaid.json;check: markdownlint on design and manual, link check including anchors on all four books, and a full re-render, failing on any error. Notes and rules are not linted: they are the user's own text.An older docs/design/build.sh moves to docs/build.sh with git mv and is widened to all four books.
The script has no export step: the book is made by Publish mode. An older export step and docs/_build/ are removed.
Once every rule and code detail is in docs/rules/ (Phase 4, Rules), replace the root AGENTS.md with only this pointer, leaving out the link to a book the repo lacks:
# AGENTS.md
Before doing anything else, read [docs/rules/README.md](docs/rules/README.md) and follow it.
It lists every rule file.
- Design: [docs/design/README.md](docs/design/README.md)
- Manual: [docs/manual/README.md](docs/manual/README.md)
- Notes: [docs/notes/README.md](docs/notes/README.md)
Write docs/rules/docs.md with these rules, merged with any docs rules that moved in rather than duplicating them:
# Docs
- `docs/design/` is the design source of truth; read `docs/design/README.md` first.
- If a change affects behavior, interfaces, data, configuration or dependencies, update the affected design chapters and diagram sources in the same change. If it changes a screen, a command or an install step, update the manual chapter and its screenshot too. Then run `docs/build.sh diagrams` and `docs/build.sh check`.
- A new working rule goes in its topic file in `docs/rules/`, never in `AGENTS.md`.
- Follow the conventions in `docs/design/README.md`. Link to facts; never restate them.
- `docs/book/` is built output; never edit it.
Existing agent-specific files (CLAUDE.md, GEMINI.md, .github/copilot-instructions.md, Cursor rules) have their rules moved to docs/rules/ the same way and keep only a pointer to AGENTS.md. In CLAUDE.md, that's the line @AGENTS.md, because Claude Code ignores AGENTS.md when a CLAUDE.md exists. Don't create agent-specific files that aren't there.
Apply the root-file decisions from Phase 2 and trim README.md to what it is, install, and links to the design book, the manual and the notes.
docs/build.sh diagrams and docs/build.sh check pass.rsvg-convert.README.md and AGENTS.md.README.md, and the previous / next links form one chain per book.docs/notes/README.md, and no note file was changed beyond its links.AGENTS.md or an agent-specific file is in docs/rules/ word for word, listed in docs/rules/README.md, and AGENTS.md holds only the pointer.Docs-only rebuild test: copy docs/design/ alone into an empty folder and hand it to a fresh agent with no access to the repo (a sub-agent if you can restrict its access, otherwise ask the user to run it in a new session).
Ask it to:
Every guess, wrong answer or "not specified" is a gap. Fix each one in the chapter that owns it and rerun, up to three rounds.
Fresh-reader manual test: copy docs/manual/ alone, plus the saved help output of each command, into an empty folder and hand it to a fresh agent the same way.
Ask it to:
Gaps are counted and fixed the same way, up to three rounds.
In a few lines, per book: chapters, diagrams and screenshots written, screenshots missing, notes moved or filed, rules moved and the file each went to, rules that look stale or doubled, files moved or merged, check results, rebuild-test and manual-test gaps left, open questions, and the branch with its commits.
Keep the docs true after a task. Works with any docs, book or not; a book also follows Ground rules, Phase 4 and Phase 6. No new branch: commit on the current branch, never push.
README.md and docs/build.sh. A missing book is created, not skipped (see Modes).README.md and the previous / next chain in step. Retake the screenshot of every screen that changed. File the lessons that are neither design nor manual in docs/notes/ (see Phase 4, Notes). A working rule the user gave in the session, and a code detail that changed, go in their topic file in docs/rules/.AGENTS.md thin: a rule found in it, or in an agent-specific file, moves to docs/rules/ word for word (Phase 4, Rules and Phase 5). The first time, show the split and wait for a yes.docs/build.sh, run docs/build.sh diagrams and docs/build.sh check. In a book, rerun the docs-only rebuild test when a contract, data shape, config key or flow changed, with questions about the changed parts. Rerun the fresh-reader manual test the same way when a screen, a command or an install step changed.Nothing changed and the docs match the code: say so and stop.
Make the book of this repo in docs/book/. Runs only when asked for by name; changes no doc and makes no commit.
docs/build.sh diagrams and docs/build.sh check if the script exists. A failed check stops here: fix the docs in update mode first.publish_books --repos <folder that holds the repo> --book <repo folder name>. It is agent1's shared script (scripts/publish_books, on PATH); publish_books help has the rest. It needs pandoc 3 and texi2any 7, mmdc, d2 and dot for diagrams, and Google Chrome for the PDF.docs/book/html/index.html (one page per chapter, GNU manual style, parts Manual, Design, Notes, Rules), docs/book/<repo>.pdf and docs/book/<repo>.epub. docs/book/ holds its own .gitignore, so nothing in it is committed.docs/book/, and run again.publish_books or one of its tools is missing, say which and stop; install nothing without a yes.When: after the report of any mode. Judge this skill, not the repo's docs. Signals, from this run only. No signal: say nothing. One suggestion a run.
docs/build.sh or publish_books failed for a reason no step here
names.Every suggestion follows skill_improvement.md. Read it first. Change nothing without a yes.
Where it goes: this file or the reference it names. A lesson about one repo goes in that repo's docs, not here.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub raveensrk/agent1 --plugin agents20 skills in this plugin
/all-doneThe last prompt before the user exits a session. Checks this session's work for loose ends - git state, things still running, leftover files, unverified work, dropped requests, the task list, open improvement notes, installed versus source - shows them in a question dialog, fixes the ones picked, offers to save the rest as tasks, then says whether it is safe to exit. Use when the user says all done, wrap up, am I safe to exit, closing check, or runs /all-done./ask-simpleAsk the user clear questions in simple language, as if they are new to the topic, so each one is easy to answer. Use when the user says ask simple questions, assume I am a newbie, keep it simple, explain like I am new, I do not understand your question, I do not know what you mean, idkwym, I do not understand your last response, or runs /ask-simple. Also use whenever a task needs the user's decision and they have asked for plain words. When run also ask about any open decisions remains to be answered. When invoked manually review the previous response and ask questions based on that./detective-antCheck a change against what it was asked to do - a task, an issue or a plan - and find real bugs, each with its cause and a fix plan a worker can build. Never edits code. In normal use it checks the current branch against main and the task text and answers in the session with pass or fail. Run by Ishikari's detective ant it checks a task or a fix and replies in the ant's JSON. Use when the user says check this against the task, does this do what the issue asked, find bugs in my branch, or runs /detective-ant./determinizeScan a directory and its agent instruction files, turn every rule a program can decide into a check, a guard or a git hook, and thin the instructions to decisions and routing. Use when the user says determinize, make this rule deterministic, convert these rules to checks, add a linter or a hook for a rule, thin an AGENTS.md, or asks which rules could be code instead of prose. Prints the per-rule plan and waits for a yes before writing./docs-to-doorstopTurn a directory of docs and specs into a Doorstop requirements tree in ASPICE 4.0 form - the full V-model, SYS.1 to SYS.5, HWE.1 to HWE.4 and SWE.1 to SWE.6 - written in short, simple YAML items with D2, Mermaid or animated SVG diagrams where a picture explains it more simply. Scans the input first and asks every doubt before writing, then proves the tree with Doorstop and a bundled ASPICE checker. Use when the user says convert docs to doorstop, make requirements from these specs, ASPICE requirements, doorstop tree, or runs /docs-to-doorstop./investigator-antInvestigate a task before building it - read the repo, research missing facts, ask the user simple questions, prove the task can be built with evidence or a throwaway spike, then plan it. In normal use it writes no files and answers in the session with findings and a short plan. Run by Ishikari's investigator ant it writes the product spec, tech spec, docs brief and worker plans and replies in JSON. Use when the user says investigate this, can this be built, how would we build this, plan this task, or runs /investigator-ant.