Perfect Docs
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, then copy.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install matt-pocock-perfect-docsWhat this does: The target state for a library's documentation site: quick starts, 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.
Manual setup by platform
Claude Code
~/.claude/skills/matt-pocock-perfect-docs/SKILL.md
Instructions
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.
- Quick start: the shortest path from install to working code, for one mode of use.
- Mode: a distinct way to use the library, such as a CLI and a library API, or one framework among several.
- 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.
Every site has a quick start for each mode of use, first in the navigation, before Learn. A quick start takes the shape of a Guide (see guides.md): it ends with working, checked code and teaches nothing, so every concept links to its home in Learn and every export to its entry.
The quick starts, Learn and Reference are complete: every mode has a quick start, 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.
Stateful context
Security
Reviews (0)
Related skills
Browse all →More from Matt Pocock
View source →More Build skills
Browse category →Frequently asked questions about perfect-docs
What does the perfect-docs skill do?
The target state for a library's documentation site: quick starts, 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. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the perfect-docs skill?
Run `npx @skills-hub-ai/cli install matt-pocock-perfect-docs` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/matt-pocock-perfect-docs/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does perfect-docs work with?
perfect-docs runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the perfect-docs skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use perfect-docs after installing it?
In Claude Code, type `/matt-pocock-perfect-docs` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the perfect-docs skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.