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 documentatio
The `update-docs` skill is designed to streamline the process of keeping Next.js documentation in sync with ongoing code changes. It addresses the common challenge of ensuring that documentation accurately reflects the current state of a codebase, particularly when reviewing pull requests or adding new features. By providing a structured workflow, this skill reduces the likelihood of outdated or incomplete documentation, helping maintainers and contributors maintain high-quality reference material.
The skill offers a guided workflow with multiple stages: analyzing code changes, mapping them to affected documentation files, updating or scaffolding documentation, and validating changes. Key capabilities include identifying documentation-relevant changes in source files, mapping these changes to the appropriate `.mdx` documentation files, reviewing existing content for necessary updates, and applying edits with user confirmation. It also supports scaffolding entirely new feature documentation by determining the type of feature and suggesting the appropriate template and location in the documentation hierarchy. Additional validation steps, such as running linting and formatting checks, ensure that all updates adhere to project standards.
Target users include Next.js maintainers, documentation reviewers, and developers contributing new features or modifications that impact documentation. Use cases range from reviewing documentation for completeness during pull requests, updating API references for components or server functions, adding deprecation notices or new examples, to scaffolding documentation for new components or features. By following a structured workflow, the skill helps teams maintain accurate, consistent, and high-quality documentation across the Next.js project.
Begin by analyzing code changes on your branch using `git diff canary...HEAD --stat`, then identify which documentation files are affected before proceeding with updates.
It primarily focuses on `.mdx` files under `docs/` directories, including API references, component documentation, and feature guides.
Yes, it provides guidance for scaffolding documentation for new features by determining the doc type and suggesting the correct location and template.
Yes, after applying updates, you should run `pnpm lint` and optionally `pnpm prettier-fix` to ensure formatting and consistency.
The skill is intended for Next.js maintainers and contributors responsible for reviewing, updating, or adding documentation for code changes.
Quick Setup:
.claude/skills/Repository
vercel/next.js