Loading...
Loading...
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.
npx skill4agent add vercel/next.js update-docsgit diff canary...HEAD --statpnpm lint# See all changed files on this branch
git diff canary...HEAD --stat
# See changes in specific areas
git diff canary...HEAD -- packages/next/src/| Source Path | Likely Doc Impact |
|---|---|
| Component API reference |
| Function API reference |
| Varies by export |
| Configuration or build docs |
| Various features |
references/CODE-TO-DOCS-MAPPING.mdsrc/client/components/image.tsxdocs/01-app/03-api-reference/02-components/image.mdxsrc/server/config-shared.tsdocs/01-app/03-api-reference/05-config/<AppOnly><PagesOnly>source# docs/02-pages/... file with shared content
---
source: app/building-your-application/optimizing/images
---pnpm lint # Check formatting
pnpm prettier-fix # Auto-fix formatting issues| Feature Type | Doc Location | Template |
|---|---|---|
| New component | | API Reference |
| New function | | API Reference |
| New config option | | Config Reference |
| New concept/guide | | Guide |
| New file convention | | File Convention |
my-new-feature.mdx05-my-new-feature.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
\`\`\`---
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.related:
title: Next Steps
description: Learn more about related features.
links:
- app/api-reference/functions/related-function
- app/guides/related-guidereferences/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
\`\`\`<AppOnly>Content only for App Router docs.</AppOnly>
<PagesOnly>Content only for Pages Router docs.</PagesOnly>> **Good to know**: Single line note.
> **Good to know**:
>
> - Multi-line note point 1
> - Multi-line note point 2titledescriptionfilenameswitcherpnpm lintreferences/DOC-CONVENTIONS.mdreferences/CODE-TO-DOCS-MAPPING.md