Skip to main content
BuildStateful

Perfect Docs

v1.0.0New

Unsigned, install at your own risk

Unverified

This 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-docs

What 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.

Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/matt-pocock-perfect-docs/SKILL.md

Setup guide →
0Save

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:

SectionOwnsLinks out to
Learnwhat each concept is, why it exists, the order to learn itReference, on every export mention
Guidesthe steps and choices of one taskLearn for concepts, Reference for exports
Referencewhat each export doesLearn, 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.

  1. Examples: every code block is checked by the project's compiler or type checker against the current source. See examples.md.
  2. Coverage: every public export has an entry, and every entry names a public export. See reference.md.
  3. Cross-links: every export mention in Learn and Guides links to its entry, and every entry links to Learn. See links.md.
  4. Links: every internal link and anchor resolves. See links.md.
  5. 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

Loading security scan...

Reviews (0)

Browse all →

More from Matt Pocock

View source →

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.653 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.553 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.365 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.265 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.185 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions149 installs

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.