Docs review

From storybookjs/storybook · View interactive version

Docs review is an AI agent skill from the GitHub repository storybookjs/storybook. Review, improve, rewrite, author, or plan Storybook documentation in /docs. Use this when asked to review docs, improve a page, rewrite documentation, draft new docs, or advise on docs strategy.

How to use this skill

Skill file

Documentation Review

Scope

This skill applies to documentation files in /docs and docs-owned snippet files in docs/_snippets/. Do not use this skill for non-docs files (code, configuration, READMEs outside /docs).

Use This Skill When

Use a Light Touch When

Reference Files

This skill uses four reference files under references/. Load them in order and only as needed:

| File | Owns | When to Load |

|------|------|--------------|

| references/docs-principles.md | North star, quality dimensions, dual-reader requirement | Always — read first |

| references/docs-strategy.md | Modes, doc types, intervention thresholds, page-shape guidance | Always — read second |

| references/docs-antipatterns.md | Diagnosis patterns and corrective moves | When diagnosing a weak or confusing draft |

| references/storybook-style.md | Editorial, MDX components, frontmatter, formatting, validation rules | In maintenance mode, or as the final pass of edit modes |

Ownership Rules

Workflow

Follow this sequence for every request. Steps 1–4 are diagnosis; steps 5–7 are action.

1. Determine the Requested Outcome

Read the user's request and map it to a mode:

| Request Pattern | Mode |

|----------------|------|

| "Fix links, callouts, formatting" | maintenance |

| "Make this clearer", "improve this page" | improve |

| "This doc is a mess; rewrite it" | rewrite |

| "Draft docs for feature X" | author |

| "What kind of page should this be?" | strategy |

| "Review this doc" (unspecified) | hybrid — see below |

Hybrid behavior: For vague asks like "review this doc":

Default: When ambiguous, default to improve, not maintenance.

2. Determine the Primary Doc Type

Read the page and classify it using the doc types in references/docs-strategy.md:

Always select one primary type, even if the page contains secondary elements.

After selecting the primary type, identify any secondary sections — sections with their own heading whose content follows a different doc type's shape. Note these for Step 3. See "Common Secondary Sections" in references/docs-strategy.md for expected combinations.

3. Diagnose the Draft

Evaluate the page against the quality dimensions in references/docs-principles.md, in order:

  1. Intent clarity
  2. Audience fit
  3. Information shape
  4. Conceptual clarity
  5. Task usability
  6. Example quality
  7. Economy

For secondary sections, evaluate dimensions 3 (Information Shape) and 5 (Task Usability) against the secondary section's own doc type, not the page's primary type. All other dimensions apply page-wide.

If the page shows signs of structural weakness, load references/docs-antipatterns.md and check for common patterns.

4. Choose the Intervention Level

Use the thresholds in references/docs-strategy.md:

Hard rule: When the draft is structurally weak, do not stop at sentence-level edits. Reorder, split, replace examples, or rewrite the page shape.

Split/escalation rule: If the dominant job is unclear or the page serves multiple unrelated jobs, switch to strategy mode or recommend a page split before polishing. Well-structured secondary sections (see references/docs-strategy.md) are not a reason to split.

5. Improve or Plan

Execute based on the chosen mode:

When editing, you may also improve docs-owned snippet files in docs/_snippets/ if example quality depends on them.

6. Apply Storybook Style

For edit modes (maintenance, improve, rewrite, author):

7. Validate

For edit modes only:

yarn fmt:write
yarn docs:check

Fix any errors reported by yarn docs:check, then run it again to confirm.

Do not run validation in strategy mode or when no files were edited.

Handoffs

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.