オプション
家家 Skill API開発 update-docs

update-docs

vercel/next.js vercel/next.js

このスキルは、ユーザーが「変更内容に合わせてドキュメントを更新してほしい」、「このプルリクエスト(PR)のドキュメントを確認してほしい」、「どのドキュメントを更新する必要があるか」、「ドキュメントとコードを同期してほしい」、「この機能のドキュメントの骨組みを作成してほしい」、「この機能のドキュメントを作成してください」、「ドキュメントの網羅性を確認してください」、「この変更に関するドキュメントを追加してください」、「どのドキュメントが影響を受けますか」、「ドキュメントへの影響」といった要求があった場合、または「docs/」 「docs/01-app」、「docs/02-pages」、「MDX」、「ドキュメントの更新」、「APIリファレンス」、「.mdxファイル」といったキーワードが含まれている場合。 コードの変更に基づいて Next.js のドキュメントを更新するための、ガイド付きのワークフローを提供します。

...すべて拡張します
32
更新された時間 2026年8月3日

Next.js ドキュメント更新ツール

アクティブなブランチでのコード変更に基づいて、Next.js のドキュメントを更新する手順を案内します。ドキュメントの完全性を確認するためにプルリクエスト(PR)をレビューするメンテナー向けに設計されています。

クイックスタート

  1. 変更内容を分析する: git diff canary...HEAD --stat を実行して、変更されたファイルを確認します
  2. 影響を受けるドキュメントの特定:変更されたソースファイルをドキュメントのパスにマッピングします
  3. 各ドキュメントのレビュー:ユーザーの確認を得ながら更新内容を確認
  4. 検証: pnpm lint を実行して書式を確認する
  5. コミット:ドキュメントの変更をステージングする

ワークフロー:コードの変更を分析する

ステップ 1: 差分を取得する

# See all changed files on this branch
git diff canary...HEAD --stat# See changes in specific areas
git diff canary...HEAD -- packages/next/src/

ステップ 2: ドキュメントに関連する変更を特定する

以下の領域で変更点を探します:

ステップ3: ドキュメントファイルへのマッピング

対応するドキュメントファイルを見つけるには、 references/CODE-TO-DOCS-MAPPING.md を使用して、対応するドキュメントファイルを検索します。

マッピング例:

  • 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/

ワークフロー:既存のドキュメントを更新する

ステップ1:現在のドキュメントを読む

変更を加える前に、既存のドキュメントを読み、以下の点を把握してください:

  • 現在の構成とセクション
  • 使用されているフロントマターフィールド
  • 以下を使用しているかどうか / router-specific content

ステップ2:更新が必要な箇所を特定する

一般的な更新内容には以下が含まれます:

  • 新しいプロパティ/オプション:propsテーブルに追加し、使用方法を説明するセクションを作成する
  • 動作の変更:説明文と例を更新する
  • 非推奨機能:非推奨の旨の通知と移行ガイドラインを追加する
  • 新しい例:規約に従ってコードブロックを追加する

ステップ3: 確認を経て更新を適用する

変更点ごとに:

  1. 変更内容をユーザーに提示する
  2. 編集を行う前に確認を待つ
  3. 編集を適用する
  4. 次の変更に進む

ステップ4:共有コンテンツの確認

ドキュメントで source フィールドパターン(Pages Routerのドキュメントで一般的)を使用している場合、編集対象はソースファイルです。例:

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

Pages Routerのファイルではなく、App Routerのソースを編集してください。

ステップ5:変更内容の検証

pnpm lint          # Check formatting
pnpm prettier-fix  # Auto-fix formatting issues

ワークフロー:新機能のドキュメント作成

まったく新しい機能のドキュメントを追加する際にこれを使用してください。

ステップ1:ドキュメントの種類を決定する

ステップ 2: 適切な命名規則に従ってファイルを作成する

  • ケバブケースを使用してください: my-new-feature.mdx
  • 順序が重要な場合は、数字のプレフィックスを追加してください: 05-my-new-feature.mdx
  • 機能の種類に応じて適切なディレクトリに配置する

ステップ 3: 適切なテンプレートを使用する

APIリファレンス用テンプレート:

---
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 `Content` 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
| Prop | Example | Type | Status | | ----------------------- | ------------------ | ------ | -------- | | [`propName`](#propname) | `propName="value"` | String | Required |
#### `propName`Description of the prop.\`\`\`tsx filename="app/example.tsx" switcher // TypeScript example \`\`\`\`\`\`jsx filename="app/example.js" switcher // JavaScript example \`\`\`

ガイド用テンプレート:

---
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.## PrerequisitesWhat the reader needs to know before starting.## Step 1: First StepExplanation and code example.\`\`\`tsx filename="app/example.tsx" switcher
// Code example
\`\`\`## Step 2: Second StepContinue with more steps...## Next StepsRelated topics to explore.

ステップ4: 関連リンクを追加する

関連ドキュメントをフロントマターに追加:

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

ドキュメントの記述規則

詳細な書式規則については references/DOC-CONVENTIONS.md を参照してください。

クイックリファレンス

フロントマター(必須):

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

コードブロック:

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

ルーター固有のコンテンツ:

Content only for App Router docs.Content only for Pages Router docs.

注意事項:

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

検証チェックリスト

ドキュメントの変更をコミットする前に:

  • フロントマターには title と description
  • コードブロックには filename 属性
  • TypeScriptの例では switcher JS バリアントでは
  • プロパティテーブルは適切にフォーマットされています
  • 関連リンクは有効なパスを指しています
  • pnpm lint 合格
  • 変更内容が正しくレンダリングされる(プレビューが利用可能な場合)

参考文献

  • references/DOC-CONVENTIONS.md - フロントマターおよび書式設定ルールの完全な記述
  • references/CODE-TO-DOCS-MAPPING.md - ソースコードとドキュメントの対応関係
GitHubで見る

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

# 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:

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:

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

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

Step 5: Validate changes

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

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:

---
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:

---
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.## PrerequisitesWhat the reader needs to know before starting.## Step 1: First StepExplanation and code example.\`\`\`tsx filename="app/example.tsx" switcher
// Code example
\`\`\`## Step 2: Second StepContinue with more steps...## Next StepsRelated topics to explore.

Step 4: Add related links

Update frontmatter with related documentation:

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):

---
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:

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

Notes:

> **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

すべてのファイル

3件のファイル

update-docsをインストール

スキルファイルをダウンロードし、.claude/skills/ ディレクトリに解凍してください。

ZIPをダウンロード

リポジトリをクローンし、スキルファイルをプロジェクトにコピーしてください。

git clone https://github.com/vercel/next.js/tree/canary/.agents/skills/update-docs # Copy the skill folder to .claude/skills/ or .codex/skills/

コピー コピー
クイックセットアップ: skill フォルダを .claude/skills/ にコピーすると、Claude が自動的にそのスキルを検出して使用します。
リポジトリ vercel/next.js

関連スキル

agentwallet
更新された時間 2026年7月7日
brightdata-cli
更新された時間 2026年6月29日
humanize
更新された時間 2026年7月7日
trello
更新された時間 2026年7月1日
OR