KS
Killer-Skills

update-docs — how to use update-docs how to use update-docs, update-docs setup guide, Next.js documentation update, update-docs alternative, update-docs vs documentation generators, update-docs install, MDX file documentation, git diff documentation, pnpm lint documentation

v1.0.0
GitHub

About this Skill

Perfect for Next.js Development Agents needing automated documentation updates based on code changes. update-docs is a skill that guides users through updating Next.js documentation based on code changes, ensuring documentation completeness and accuracy.

Features

Analyzes code changes using `git diff` to identify affected documentation
Maps changed source files to documentation paths for efficient review
Walks through updates with user confirmation for accuracy
Validates documentation formatting using `pnpm lint`
Supports Next.js and MDX file formats for comprehensive documentation

# Core Topics

vercel vercel
[138.2k]
[30553]
Updated: 3/6/2026

Quality Score

Top 5%
68
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add vercel/next.js/update-docs

Agent Capability Analysis

The update-docs MCP Server by vercel is an open-source Categories.official integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use update-docs, update-docs setup guide, Next.js documentation update.

Ideal Agent Persona

Perfect for Next.js Development Agents needing automated documentation updates based on code changes.

Core Value

Empowers agents to synchronize documentation with code changes using git diff, map source files to documentation paths, and validate updates with pnpm lint, ensuring documentation completeness and accuracy for Next.js projects with MDX and API reference documentation.

Capabilities Granted for update-docs MCP Server

Updating Next.js documentation for new feature releases
Validating documentation completeness for pull requests
Scaffolding documentation for new features with MDX files

! Prerequisites & Limits

  • Requires git repository access
  • Next.js project setup
  • pnpm installation
SKILL.md
Readonly

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
1# See all changed files on this branch 2git diff canary...HEAD --stat 3 4# See changes in specific areas 5git 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.tsxdocs/01-app/03-api-reference/02-components/image.mdx
  • src/server/config-shared.tsdocs/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
1# docs/02-pages/... file with shared content 2--- 3source: app/building-your-application/optimizing/images 4---

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

Step 5: Validate changes

bash
1pnpm lint # Check formatting 2pnpm 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
1--- 2title: Feature Name 3description: Brief description of what this feature does. 4--- 5 6{/* 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. */} 7 8Brief introduction to the feature. 9 10## Reference 11 12### Props 13 14<div style={{ overflowX: 'auto', width: '100%' }}> 15 16| Prop | Example | Type | Status | 17| ----------------------- | ------------------ | ------ | -------- | 18| [`propName`](#propname) | `propName="value"` | String | Required | 19 20</div> 21 22#### `propName` 23 24Description of the prop. 25 26\`\`\`tsx filename="app/example.tsx" switcher 27// TypeScript example 28\`\`\` 29 30\`\`\`jsx filename="app/example.js" switcher 31// JavaScript example 32\`\`\`

Guide Template:

mdx
1--- 2title: How to do X in Next.js 3nav_title: X 4description: Learn how to implement X in your Next.js application. 5--- 6 7Introduction explaining why this guide is useful. 8 9## Prerequisites 10 11What the reader needs to know before starting. 12 13## Step 1: First Step 14 15Explanation and code example. 16 17\`\`\`tsx filename="app/example.tsx" switcher 18// Code example 19\`\`\` 20 21## Step 2: Second Step 22 23Continue with more steps... 24 25## Next Steps 26 27Related topics to explore.

Step 4: Add related links

Update frontmatter with related documentation:

yaml
1related: 2 title: Next Steps 3 description: Learn more about related features. 4 links: 5 - app/api-reference/functions/related-function 6 - app/guides/related-guide

Documentation Conventions

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

Quick Reference

Frontmatter (required):

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

Code blocks:

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

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

Router-specific content:

mdx
1<AppOnly>Content only for App Router docs.</AppOnly> 2 3<PagesOnly>Content only for Pages Router docs.</PagesOnly>

Notes:

mdx
1> **Good to know**: Single line note. 2 3> **Good to know**: 4> 5> - Multi-line note point 1 6> - 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

Related Skills

Looking for an alternative to update-docs or building a Categories.official AI Agent? Explore these related open-source MCP Servers.

View All

flags

Logo of facebook
facebook

flags is a feature flag management system that enables developers to check flag states, compare channels, and debug feature behavior differences across release channels.

243.6k
0
Design

extract-errors

Logo of facebook
facebook

extract-errors is a skill that assists in extracting and managing error codes in React applications using yarn extract-errors command.

243.6k
0
Design

fix

Logo of facebook
facebook

fix is a technical skill that resolves lint errors, formatting issues, and ensures code quality in declarative, frontend, and UI projects

243.6k
0
Design

flow

Logo of facebook
facebook

Flow is a type checking system for JavaScript, used to validate React code and ensure consistency across applications

243.6k
0
Design