Official agent skill

Update Docs

by vercel in vercel/next.js

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"…

OfficialMITAuto-check passedDocuments & Office

Install Update Docs

skills CLI
$ npx skills add vercel/next.js --skill update-docs -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vercel/next.js update-docs --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vercel/next.js.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/update-docs .claude/skills/update-docs && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
update-docs
GitHub stars
143k
Token cost
~1.9k tokens
SKILL.md length
468 words
Files
3 (incl. references)
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

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"…

  • Works in 12 steps: Get the diff → Identify documentation-relevant changes → Map to documentation files → …
  • Asks to update documentation for my changes
  • SKILL.md covers Quick Start, Workflow: Analyze Code Changes, Workflow: Update Existing… and Workflow: Scaffold New Feature…, plus 3 more sections
  • Calls pnpm and git

What it does

Update Docs is an agent skill from vercel/next.js, published by the product's own GitHub organization. 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…

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/CODE-TO-DOCS-MAPPING.md` and `references/DOC-CONVENTIONS.md`).

It sits in Documents & Office, covering Markdown. It works with Next.js. The licence is MIT.

When your agent uses it

  • Asks to update documentation for my changes
  • Check docs for this PR
  • What docs need updating
  • Sync docs with code

Example prompts

  • “update documentation for my changes”
  • “check docs for this PR”
  • “what docs need updating”
  • “/update-docs”

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Get the diff
  2. Identify documentation-relevant changes
  3. Map to documentation files
  4. Read the current documentation
  5. Identify what needs updating
  6. Apply updates with confirmation
  7. Check for shared content
  8. Validate changes
  9. Determine the doc type
  10. Create the file with proper naming
  11. Use the appropriate template
  12. Add related links

What it can do on your machine

Read from SKILL.md and the folder at commit a32ddfd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Update Docs loads about 1.9k tokens when it runs, and up to ~5.3k if it reads all its reference files. Until then it costs about 134 tokens; SKILL.md has 468 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~134
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vercel/next.js at commit a32ddfd, republished under its MIT licence (© vercel). 468 words, ~1,894 tokens.

Download SKILL.mdSave it as .claude/skills/update-docs/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
update-docs
description
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.
metadata.internal
true

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 PathLikely 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 2: Identify what needs updating

Common updates include:

  • New props/options: Add to the props table and create a section explaining usage
  • Changed behavior: Update descriptions and examples
  • Deprecated features: Add deprecation notices and migration guidance
  • New examples: Add code blocks following conventions
Step 3: Apply updates with confirmation

For each change:

  1. Show the user what you plan to change
  2. Wait for confirmation before editing
  3. Apply the edit
  4. Move to the next change
Step 4: Check for shared content

If the doc uses the source field pattern (common for Pages Router docs), the source file is the one to edit. Example:

yaml
# docs/02-pages/... file with shared content
---
source: app/building-your-application/optimizing/images
---

Edit the App Router source, not the Pages Router file.

Show full SKILL.md (176 more words)Show less
Step 5: Validate changes
bash
pnpm lint          # Check formatting
pnpm prettier-fix  # Auto-fix formatting issues

Workflow: Scaffold New Feature Documentation

Use this when adding documentation for entirely new features.

Step 1: Determine the doc type
Feature TypeDoc LocationTemplate
New componentdocs/01-app/03-api-reference/02-components/API Reference
New functiondocs/01-app/03-api-reference/04-functions/API Reference
New config optiondocs/01-app/03-api-reference/05-config/Config Reference
New concept/guidedocs/01-app/02-guides/Guide
New file conventiondocs/01-app/03-api-reference/03-file-conventions/File Convention
Step 2: Create the file with proper naming
  • Use kebab-case: my-new-feature.mdx
  • Add numeric prefix if ordering matters: 05-my-new-feature.mdx
  • Place in the correct directory based on feature type
Step 3: Use the appropriate template

API Reference Template:

mdx
---
title: Feature Name
description: Brief description of what this feature does.
---

{/* The content of this doc is shared between the app and pages router. You can use the `<PagesOnly>Content</PagesOnly>` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */}

Brief introduction to the feature.

## Reference

### Props

<div style={{ overflowX: 'auto', width: '100%' }}>

| Prop                    | Example            | Type   | Status   |
| ----------------------- | ------------------ | ------ | -------- |
| [`propName`](#propname) | `propName="value"` | String | Required |

</div>

#### `propName`

Description of the prop.

\`\`\`tsx filename="app/example.tsx" switcher
// TypeScript example
\`\`\`

\`\`\`jsx filename="app/example.js" switcher
// JavaScript example
\`\`\`

Guide Template:

mdx
---
title: How to do X in Next.js
nav_title: X
description: Learn how to implement X in your Next.js application.
---

Introduction explaining why this guide is useful.

## Prerequisites

What the reader needs to know before starting.

## Step 1: First Step

Explanation and code example.

\`\`\`tsx filename="app/example.tsx" switcher
// Code example
\`\`\`

## Step 2: Second Step

Continue with more steps...

## Next Steps

Related topics to explore.

Update frontmatter with related documentation:

yaml
related:
  title: Next Steps
  description: Learn more about related features.
  links:
    - app/api-reference/functions/related-function
    - app/guides/related-guide

Documentation Conventions

See references/DOC-CONVENTIONS.md for complete formatting rules.

Quick Reference

Frontmatter (required):

yaml
---
title: Page Title (2-3 words)
description: One or two sentences describing the page.
---

Code blocks:

\`\`\`tsx filename="app/page.tsx" switcher
// TypeScript first
\`\`\`

\`\`\`jsx filename="app/page.js" switcher
// JavaScript second
\`\`\`

Router-specific content:

mdx
<AppOnly>Content only for App Router docs.</AppOnly>

<PagesOnly>Content only for Pages Router docs.</PagesOnly>

Notes:

mdx
> **Good to know**: Single line note.

> **Good to know**:
>
> - Multi-line note point 1
> - Multi-line note point 2

Validation Checklist

Before committing documentation changes:

  • Frontmatter has title and description
  • Code blocks have filename attribute
  • TypeScript examples use switcher with JS variant
  • Props tables are properly formatted
  • Related links point to valid paths
  • pnpm lint passes
  • Changes render correctly (if preview available)

References

  • references/DOC-CONVENTIONS.md - Complete frontmatter and formatting rules
  • references/CODE-TO-DOCS-MAPPING.md - Source code to documentation mapping

© vercel, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in .agents/skills/update-docs of vercel/next.js.

  • SKILL.md
  • references/CODE-TO-DOCS-MAPPING.md
  • references/DOC-CONVENTIONS.md

Open the folder on GitHubat commit a32ddfd

Compare with similar skills

Update Docs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Update Docs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Update Docs this skillvercel/next.js143k—~1.9kAutomated safety check: PassMIT
React Zmage IntegrationCaldis/react-zmage946—~370Automated safety check: PassMIT
Live Previewvicoa-ai/vicoa496—~755Automated safety check: NotesAGPL-3.0
Writing Docsc15t/c15t1.9k—~872Automated safety check: PassApache-2.0
Markdown Article FormatterJimLiu/baoyu-skills26k7 repos~3.5kAutomated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT

Similar skills

  • React Zmage Integration

    Caldis/react-zmage

    A skill your agent uses when adding the react-zmage React image viewer to an existing React, Next.js, MDX, CMS, markdown, or rich text image surface.

    946 GitHub stars~370 tokensUpdated 4 mo ago
    Documents & OfficeAuto-check passed
  • Live Preview

    vicoa-ai/vicoa

    Start a local app in the current user project, expose it through a tunnel, and return preview details in structured Markdown.

    496 GitHub stars~755 tokensUpdated today
    Documents & OfficeAuto-check: notes
  • Writing Docs

    c15t/c15t

    Author or edit c15t documentation in docs//.mdx — the source for both the c15t.com site and the docs bundled into published packages.

    1.9k GitHub stars~872 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Markdown Article Formatter

    JimLiu/baoyu-skills

    Reformats plain text or Markdown articles with frontmatter, a title, a summary, headings, bold, lists and code blocks, and saves a separate formatted copy.

    26k GitHub starsUsed in 7 repos~3.5k tokens
    Documents & OfficeAuto-check passed
  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Obsidian Markdown

    Atmosphere/atmosphere

    Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax.

    3.8k GitHub starsUsed in 20 repos~1.3k tokens
    Documents & OfficeAuto-check passed

More from vercel/next.js

All 27 skills in this repo
  • Gh Stack

    vercel/next.js

    Official

    Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack.

    143k GitHub starsUsed in 7 repos~2.3k tokens
    Auto-check passed
  • Sandbox Bench

    vercel/next.js

    Official

    Benchmark React or Next.js changes on Vercel Sandbox VMs with paired A/B statistics: react PR/commit vs base, or Next.js PR/commit vs base, measured end-to-end through the bench/render-pipeline app…

    143k GitHub stars~4.1k tokensUpdated today
    Auto-check passed
  • Next Dev Loop

    vercel/next.js

    Official

    Verify Next.js runtime behavior after editing app code. An agent skill from vercel/next.js.

    143k GitHub starsUsed in 9 repos~2.3k tokens
    Auto-check passed
  • Docs Diagrams

    vercel/next.js

    Official

    Draw diagrams for the Next.js docs in the style of the ones already published there: the light/dark PNGs an mdx references with <Image srcLight="/docs/light/<name.png" srcDark="/docs/dark/<name.png".

    143k GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Official

    Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces.

    143k GitHub starsUsed in 6 repos~8.3k tokens
    Auto-check passed
  • React Sync

    vercel/next.js

    Official

    Build local React changes in the bundle variants consumed by Next.js, sync them into a local Next.js checkout, and test the resulting integration.

    143k GitHub stars~486 tokensUpdated today
    Auto-check passed

Works with

Questions about Update Docs

What does Update Docs do?

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"…. js, published by the product's own GitHub organization.mdx files".

When should I use Update Docs?

Update Docs fits situations like: asks to update documentation for my changes; check docs for this PR; what docs need updating; sync docs with code.

How do I install Update Docs in Claude Code?

Run `npx skills add vercel/next.js --skill update-docs -a claude-code`. Or copy the skill folder (.agents/skills/update-docs in vercel/next.js) into .claude/skills/update-docs in your project. Claude Code loads it when a task matches its description.

How do I install Update Docs in Codex?

Run `npx skills add vercel/next.js --skill update-docs -a codex`. Or copy the skill folder (.agents/skills/update-docs in vercel/next.js) into .agents/skills/update-docs in your project. Codex loads it when a task matches its description.

Can I use Update Docs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vercel/next.js --skill update-docs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/update-docs, .gemini/skills/update-docs, .github/skills/update-docs and .opencode/skills/update-docs in your project.

What does Update Docs need to run?

Going by SKILL.md and its folder, Update Docs needs the command-line tools its instructions call (pnpm and git).

Does Update Docs access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Update Docs safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Update Docs use?

Update Docs is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Update Docs use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.4k tokens, read only when the agent opens those files.

What are the alternatives to Update Docs?

Skills that share tags, products or a category with Update Docs: React Zmage Integration (Caldis/react-zmage, 946 stars), Live Preview (vicoa-ai/vicoa, 496 stars), Writing Docs (c15t/c15t, 1.9k stars) and Markdown Article Formatter (JimLiu/baoyu-skills, 26k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Update Docs?

vercel (a GitHub organization, an official publisher) maintains it in vercel/next.js, which has 143,241 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on October 8, 2026.

Source: vercel/next.js on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.