This skill should be used when the user asks to "update documentation for my changes", "check docs for this PR", "what docs need updating", "sync docs with code", "scaffold docs for this feature", "document this feature", "review docs completeness", "add docs for this change", "what documentation is affected", "docs impact", or mentions "docs/", "docs/01-app", "docs/02-pages", "MDX", "documentation update", "API reference", ".mdx files". Provides guided workflow for updating Next.js documentation based on code changes.
View on GitHubJanuary 25, 2026
Select agents to install to:
npx add-skill https://github.com/vercel/next.js/blob/f51e3acf961c9bbcab68aab6078c9267d230db21/.claude/skills/update-docs/SKILL.md -a claude-code --skill update-docsInstallation paths:
.claude/skills/update-docs/# Next.js Documentation Updater Guides you through updating Next.js documentation based on code changes on the active branch. Designed for maintainers reviewing PRs for documentation completeness. ## Quick Start 1. **Analyze changes**: Run `git diff canary...HEAD --stat` to see what files changed 2. **Identify affected docs**: Map changed source files to documentation paths 3. **Review each doc**: Walk through updates with user confirmation 4. **Validate**: Run `pnpm lint` to check formatting 5. **Commit**: Stage documentation changes ## Workflow: Analyze Code Changes ### Step 1: Get the diff ```bash # See all changed files on this branch git diff canary...HEAD --stat # See changes in specific areas git diff canary...HEAD -- packages/next/src/ ``` ### Step 2: Identify documentation-relevant changes Look for changes in these areas: | Source Path | Likely Doc Impact | | -------------------------------------- | --------------------------- | | `packages/next/src/client/components/` | Component API reference | | `packages/next/src/server/` | Function API reference | | `packages/next/src/shared/lib/` | Varies by export | | `packages/next/src/build/` | Configuration or build docs | | `packages/next/src/lib/` | Various features | ### Step 3: Map to documentation files Use the code-to-docs mapping in `references/CODE-TO-DOCS-MAPPING.md` to find corresponding documentation files. Example mappings: - `src/client/components/image.tsx` → `docs/01-app/03-api-reference/02-components/image.mdx` - `src/server/config-shared.ts` → `docs/01-app/03-api-reference/05-config/` ## Workflow: Update Existing Documentation ### Step 1: Read the current documentation Before making changes, read the existing doc to understand: - Current structure and sections - Frontmatter fields in use - Whether it uses `<AppOnly>` / `<PagesOnly>` for router-specific content ### Step