perfect-docs
The target state for a library's documentation site: Learn, Guides and Reference, one home per fact, concepts taught in learning-graph order, every code example checked against the source, every export covered, rigorous cross-links, redirects for every moved URL. Use when writing, restructuring or auditing a docs site, deciding where a piece of documentation belongs, or adding a check that keeps docs true to the code.
How do I install this agent skill?
npx skills add https://github.com/mattpocock/skills --skill perfect-docsIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides guidelines and a target state for documentation. It contains no executable code, tool grants, or network operations. It is purely instructional.
- Socketpass
No alerts
- Snykwarn
Risk: MEDIUM · 2 issues
What does this agent skill do?
Perfect Docs
Measure a docs site against this target: every gap is a finding, and every change moves the site toward it. The target holds for any language and any docs tool. Each automated check below says what it must guarantee; the project picks the tool.
Vocabulary
Use these words exactly, each in this one sense.
- Learn: the reader's first journey through the library. It names the problems the library solves, then teaches every concept in learning-graph order.
- Guide: one task, titled the way a developer searches for it.
- Reference: one entry per public export, written by hand.
- Concept: an idea a reader must hold to use the library. Its home is a heading in Learn.
- Learning graph: concepts as nodes, with an edge from A to B when B makes sense only after A. It has no cycles.
- Forward mention: a mention of a concept before its home in reading order. It is a cycle in the learning graph.
- Home: the one place a fact lives. Every other place links to it.
- Entry: the Reference heading for one export. Its anchor is the export's name.
- Aside: a collapsible block in Learn that holds depth a first-time reader can skip.
- Fold: lines of a code example hidden until the reader expands them.
Say concept where "topic" or "idea" might come to mind, and entry where "API doc" might.
The sections
The site has three sections, and each owns one kind of fact:
| Section | Owns | Links out to |
|---|---|---|
| Learn | what each concept is, why it exists, the order to learn it | Reference, on every export mention |
| Guides | the steps and choices of one task | Learn for concepts, Reference for exports |
| Reference | what each export does | Learn, for the concept behind it |
A fact lives in exactly one home. Every other page that needs it links there, with at most a one-line gloss. A change to a behaviour is then a one-place edit, and the site cannot contradict itself.
Learn and Reference are complete: every concept has a home in Learn, and every public export has an entry in Reference. Guides are extra and never needed for completeness.
Topic files
Read a topic file when the work touches that area.
learn.md: turning the learning graph into a reading order, breadth and depth, the problem-first arc, asides.guides.md: choosing Guide topics and the shape of a Guide.reference.md: the shape of an entry, and the coverage check.examples.md: concise examples, folds, and the examples check.links.md: cross-link rules, the link check, the URL list and redirects.style.md: the prose style, glossary terms, and the style review.
Automated checks
Each runs in CI and fails the build on a violation.
- Examples: every code block is checked by the project's compiler or type checker against the current source. See
examples.md. - Coverage: every public export has an entry, and every entry names a public export. See
reference.md. - Cross-links: every export mention in Learn and Guides links to its entry, and every entry links to Learn. See
links.md. - Links: every internal link and anchor resolves. See
links.md. - Redirects: every page or anchor that leaves the URL list has a redirect or alias. See
links.md.
What no check can judge (reading order, the problem each section opens with, the prose) is the job of the style review in style.md.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/mattpocock/skills/perfect-docs">View perfect-docs on skillZs</a>