Next.js Documentation Updater
Paste the following prompt into your AI chat to install this skill:
Follow https://skillhub.cn/install/skillhub.md to install @user_e40a4360/documentation-updater.
About this skill
Problem Context
In the Next.js repository, code changes often ripple into API references, configuration pages, and guides. Maintainers reviewing PRs need to determine which docs are affected, whether a page is Pages Router shared content, and where new feature documentation should live. This skill turns that “diff-to-documentation” path into a repeatable workflow.
How It Works
- It starts with
git diff canary...HEAD --statto inspect changed files, then maps them to docs usingreferences/CODE-TO-DOCS-MAPPING.mdand directories such asdocs/01-app/03-api-reference/. - For existing docs, it reads the current structure, frontmatter, and router-specific content, then identifies new props, behavior changes, deprecations, and missing examples. Each proposed edit is confirmed before being applied.
- For new features, it selects the right doc type—component, function, config, guide, or file convention—uses kebab-case naming, applies the API Reference or Guide template, and adds related frontmatter links.
- It validates frontmatter, code block filenames, TypeScript/JavaScript switchers, props tables, and related links, and runs
pnpm lint.
Scope and Caveats
This skill is aimed at Next.js documentation maintenance, especially App Router pages and shared Pages Router content. It relies on repository references such as references/DOC-CONVENTIONS.md and the code-to-docs mapping; if those files are incomplete, the output will depend on existing doc structure. It asks for confirmation before edits but still requires human judgment for API semantics and migration guidance.
Use Cases
- When reviewing a component PR, update the component API reference after image.tsx props change.
- When a config PR changes shared config code, update the matching App Router config documentation.
- When adding a new function, scaffold an API reference with frontmatter, examples, and related links.
- Before committing docs, validate frontmatter, code block filenames, TS/JS switchers, and pnpm lint.
Best For
- Next.js documentation maintainers reviewing PRs need to identify affected API pages.
- App Router component engineers updating props references need to add tables and examples.
- Feature authors onboarding new APIs need to scaffold correctly formatted docs.
- Contributors handling shared Pages Router content need to edit the right source file.
Related Skills
Use a book title and author to search reviews, contents, and reader feedback, then generate a structured breakdown of historical or decision-logic books with key claims, concepts, quotes, and reading notes in Obsidian.
A multi-system divination advisor covering Bazi, Ziwei, tarot, feng shui, timing, and naming with structured interpretations.
Provides Bazi, Liu Yao, Qimen, Meihua, and date-selection guidance from classical references, with plain-language explanations and actionable suggestions.
Apply GRADE and Cochrane ROB frameworks to assess methods, statistics, bias, evidence quality, and scientific claims.