AI Agent Hub
Back to skills
Next.js Documentation Updater icon

Next.js Documentation Updater

Knowledge Management Updated 2026.08.30

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 --stat to inspect changed files, then maps them to docs using references/CODE-TO-DOCS-MAPPING.md and directories such as docs/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.

Editor's note

Written for AI Agent Hub. This is separate from the publisher description above.

What problem it solves

Docs drift from the code on a branch. This skill targets Next.js documentation so a maintainer can review a docs diff after a real change. The problem is stale docs in that framework, not a general wiki cleanup.

Who it is for

Maintainers of a Next.js repo whose docs live in files you can diff, working on a branch that already contains the code change.

Who should skip it

Skip it for a different framework. A prompt that assumes Next.js file layout will invent routes everywhere else. Skip it if you wanted a memory of decisions across Harness sessions. That is a memory plugin or a markdown file, discussed on the knowledge-management shelf. Skip "reorganize the whole vault."

First three steps

  1. On a branch, add one comment or one small behavior a human would expect the docs to mention. Commit it.
  2. Ask the skill to update docs only, not source.
  3. Read the diff. Docs-only and accurate means keep it. A rewritten component means revert and remove the skill. The install guide uses this trial as the picture of removal, including rules files the skill may have written into the repo.

Alternatives on this site

Write the paragraph yourself if the change is one sentence. A content skill will be less aware of the framework and more likely to add marketing adjectives you do not want in API docs.

Questions

Will teammates get this prompt? If it wrote a rules file and you commit it, yes. Search the diff for the prompt before you push.

Does it watch the repo continuously? Not from this directory. It runs when you invoke it. If a rules file means it runs on every chat, that is the settings layer, and you should see it in the diff before you call the skill installed.

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.

Reader reviews

No approved reader reviews on this listing yet. Yours can be the first.

Reviews are held for moderation and appear after an editor approves them. No links or promotion.