write-api-reference
Skill144k starsChanged 7 months agoMITView on GitHub
Produces API reference documentation for Next.js APIs: functions, components, file conventions, directives, and config options.
Trending
Less talk lately.about the whole repository
Who's talking about vercel/next.js
- A Hacker News story“RCE Vulnerability in React and Next.js”Hacker News · Dec 3, 2025 · 628 points
- getsentry/sentry-javascript“Next.js Turbopack Support”GitHub · May 11, 2023 · 365 reactions
- react/react“eslint-plugin-react-hooks & "Flat Config" (ESLint 9)”GitHub · Feb 13, 2024 · 296 reactions
- sveltejs/kit“Add incremental static regeneration”GitHub · Mar 25, 2021 · 183 reactions
- payloadcms/payload“feat: next.js 16 support”GitHub · Nov 3, 2025 · 163 reactions
The biggest 5 of 92 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 92
Talked about on Bluesky, GitHub and Hacker News (92 times).
On Bluesky · 50
- Jan 17, 2025📦 vercel / next.js ⭐ 128,623 (+39) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social6 likes and reposts
- Apr 27, 2025📦 vercel / next.js ⭐ 131,376 (+38) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social5 likes and reposts
- Dec 2, 2024📦 vercel / next.js ⭐ 127,482 (+35) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social5 likes and reposts
- Oct 8, 2026You can also follow security advisories through GitHub or a dependency monitoring service. On the Next.js repository, choose Watch → Custom… — @nextjs.org4 likes and reposts
- Jun 4, 2026📦 vercel / next.js ⭐ 139,667 (+32) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social4 likes and reposts
45 more on Bluesky
- Jan 12, 2025📦 vercel / next.js ⭐ 128,495 (+43) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social4 likes and reposts
- Nov 15, 2024📦 vercel / next.js ⭐ 127,010 (+42) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social4 likes and reposts
- May 17, 2025📦 vercel / next.js ⭐ 131,846 (+36) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social3 likes and reposts · 1 reply
- Apr 2, 2025📦 vercel / next.js ⭐ 130,747 (+38) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social3 likes and reposts
- Mar 22, 2025📦 vercel / next.js ⭐ 130,452 (+45) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social3 likes and reposts
- Jan 8, 2025📦 vercel / next.js ⭐ 128,373 (+39) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social3 likes and reposts
- Sep 14, 2024📦 vercel / next.js ⭐ 124,905 (+46) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social3 likes and reposts
- Oct 23, 2026📦 vercel / next.js ⭐ 143,195 (+78) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Sep 26, 2026📦 vercel / next.js ⭐ 142,463 (+31) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Sep 17, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 vercel / next.js ⭐ 142,336 (+129) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Aug 4, 2026📦 vercel / next.js ⭐ 141,327 (+45) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Jul 30, 2026📦 vercel / next.js ⭐ 141,186 (+43) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Jul 4, 2026📦 vercel / next.js ⭐ 140,320 (+54) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Jun 29, 2026📦 vercel / next.js ⭐ 140,437 (+36) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Jun 24, 2026📦 vercel / next.js ⭐ 140,207 (+94) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Jun 17, 2026📦 vercel / next.js ⭐ 140,037 (+34) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Dec 14, 2025📦 vercel / next.js ⭐ 136,507 (+34) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Dec 4, 2025📦 vercel / next.js ⭐ 136,067 (+71) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Nov 8, 2025📦 vercel / next.js ⭐ 135,508 (+32) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Sep 16, 2025📦 vercel / next.js ⭐ 134,471 (+46) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Jun 13, 2025📦 vercel / next.js ⭐ 132,413 (+32) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- May 10, 2025📦 vercel / next.js ⭐ 131,707 (+35) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Apr 16, 2025📦 vercel / next.js ⭐ 131,086 (+41) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Mar 18, 2025📦 vercel / next.js ⭐ 130,300 (+50) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Mar 14, 2025📦 vercel / next.js ⭐ 130,174 (+37) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Feb 23, 2025📦 vercel / next.js ⭐ 129,609 (+43) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Feb 14, 2025📦 vercel / next.js ⭐ 129,307 (+47) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Feb 1, 2025📦 vercel / next.js ⭐ 128,951 (+38) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Dec 24, 2024📦 vercel / next.js ⭐ 128,052 (+37) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Dec 20, 2024📦 vercel / next.js ⭐ 127,957 (+39) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Dec 12, 2024📦 vercel / next.js ⭐ 127,744 (+34) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Dec 7, 2024📦 vercel / next.js ⭐ 127,618 (+32) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Oct 15, 2024📦 vercel / next.js ⭐ 125,776 (+44) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Sep 6, 2024📦 vercel / next.js ⭐ 124,675 (+50) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts
- Aug 31, 2024📦 vercel / next.js ⭐ 124,487 (+39) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social2 likes and reposts · 1 reply
- Nov 19, 2026📦 vercel / next.js ⭐ 143,721 (+68) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social1 likes and repost
- Oct 7, 2026📦 vercel / next.js ⭐ 143,230 (+38) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social1 likes and repost
- Sep 26, 2026📦 vercel / next.js ⭐ 142,463 (+31) 🗒 JavaScript The React Framework — @github-trending.bsky.social1 likes and repost
- Aug 27, 2026📦 vercel / next.js ⭐ 141,963 (+38) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social1 likes and repost
- Jul 10, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 vercel / next.js ⭐ 140,578 (+176) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social1 likes and repost
- May 13, 2026📦 vercel / next.js ⭐ 139,406 (+31) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social1 likes and repost
- Apr 10, 2026📦 vercel / next.js ⭐ 138,815 (+63) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social1 likes and repost
- Apr 5, 2026📦 vercel / next.js ⭐ 138,637 (+41) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social1 likes and repost
- Mar 28, 2026📦 vercel / next.js ⭐ 138,508 (+38) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social1 likes and repost
- Mar 22, 2026📦 vercel / next.js ⭐ 138,434 (+32) 🗒 JavaScript The React Framework — @github-trending-js.bsky.social1 likes and repost
On GitHub · 26
- May 11, 2023Next.js Turbopack Support — getsentry/sentry-javascript365 reactions · 92 comments
- Feb 13, 2024eslint-plugin-react-hooks & "Flat Config" (ESLint 9) — react/react296 reactions · 108 comments
- Mar 25, 2021Add incremental static regeneration — sveltejs/kit183 reactions · 75 comments
- Nov 3, 2025feat: next.js 16 support — payloadcms/payload163 reactions · 25 comments
- Feb 25, 2021Make initial incremental/watch builds as fast normal builds — microsoft/TypeScript140 reactions · 31 comments
21 more on GitHub
- Oct 19, 2022[system] Support new style engine that generates static CSS files at build time — mui/material-ui96 reactions · 32 comments
- Nov 24, 2023Deprecate `setRequestLocale` in favor of `next/root-params` — amannn/next-intl95 reactions · 45 comments
- Feb 8, 2024📈 Tracking: Flat Config support — eslint/eslint91 reactions · 100 comments
- Jan 22, 2024add next.js app router example — mswjs/examples53 reactions · 61 comments
- May 11, 2023feat(client): esm support draft — prisma/orm35 reactions · 5 comments
- Apr 24, 2023RFC: The Next.js "App Router", React Server Component & "SSR with Suspense" story — apollographql/apollo-client-integrations28 reactions · 8 comments
- Jan 9, 2025feat: Key isolation — 47ng/nuqs24 reactions · 6 comments
- Jan 27, 2022fix(nextjs): TypeError: res.once is not a function — getsentry/sentry-javascript22 reactions · 1 comment
- May 2, 2024fix(next-auth): Add support for Next.js basePath configuration — nextauthjs/next-auth18 reactions · 27 comments
- Mar 9, 2024[labs/nextjs, labs/ssr-react, lit/react] Add support for Next.js v14 and App Router — lit/lit18 reactions · 3 comments
- Apr 16, 2021update Next.js example — bugsnag/bugsnag-js18 reactions · 3 comments
- Mar 20, 2026feat(next): prevent admin panel errors when cacheComponents is enabled — payloadcms/payload17 reactions · 11 comments
- Sep 7, 2020Modernize example for nextjs. Adds support for fast refresh, native p… — tailwindlabs/tailwindcss-setup-examples17 reactions · 4 comments
- Jun 24, 2022fix: don't fallback on rendering the html when the page is not found — serverless-nextjs/serverless-next.js15 reactions · 2 comments
- Mar 6, 2025Fix for next 15.2 and renderHTML should not be called in minimal mode — opennextjs/opennextjs-cloudflare12 reactions · 2 comments
- Dec 20, 2024fix: Deprecate `setRequestLocale` and add blog post on `next/root-params` — amannn/next-intl12 reactions · 13 comments
- Jan 28, 2022fix(nextjs): Unwrap `req` and `res` if necessary when instrumenting server — getsentry/sentry-javascript12 reactions · 5 comments
- Aug 12, 2021fix(nextjs): Next 11.1.0 compatibility — nrwl/nx12 reactions · 13 comments
- Oct 4, 2024Update auth.ts to await `params` in NextJS 15 — auth0/nextjs-auth010 reactions · 2 comments
- Mar 16, 2024Turbopack support for Blitz — blitz-js/blitz10 reactions · 12 comments
- Jan 27, 2023feat: bring action up to date — github/issue-labeler10 reactions
On Hacker News · 16
- Dec 3, 2025RCE Vulnerability in React and Next.js628 points · 259 comments
- May 31, 2025Next.js: The "Versatile" React Framework That Can't Handle Dynamic Routes17 points · 20 comments
- Mar 21, 2025Authorization Bypass in Next.js Middleware8 points
- May 7, 2026Six New High Severity CVEs for Next.js and 1 for React4 points · 2 comments
- May 15, 2026Next.js – Server-side request forgery in applications using WebSocket upgrades3 points
11 more on Hacker News
- May 7, 2026New security vulnerabilities disclosed in Next.js (patches released)3 points
- Apr 2, 2025RFC: Deployment Adapters API for Next.js3 points
- Aug 7, 2024Vercel/Next.js memory leak in Fetch API3 points
- Dec 29, 2025Next.js makes many tiny serverless requests for all visible links2 points · 1 comment
- Sep 17, 2025Next.js GET Cache Bypass via Multipart POST – Reproduces on Vercel.com2 points · 1 comment
- May 26, 2025How hardware identifiers work on a PC2 points
- Apr 9, 2025Next.js with Rspack1 point
- Jul 3, 2023Is server component default always a performance win? Or should it be opt-in?1 point
- Mar 29, 2022Next.js: Support SSG (one-time SSR) during runtime1 point
- Nov 3, 2021What libraries do you recommend for a Node.js CRUD web app?1 point · 1 comment
- Jan 19, 2021Unconfigured next.js application with TypeScript does not work in IE111 point
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apps/bundle-analyzer/AGENTS.mdAGENTS.md
- crates/AGENTS.mdAGENTS.md
- evals/AGENTS.mdAGENTS.md
- evals/evals/agent-062-pokedex-dev-loop/AGENTS.mdAGENTS.md
- evals/next-upgrade/apps/member-dashboard/next-13/AGENTS.mdAGENTS.md
- evals/next-upgrade/apps/member-dashboard/next-15/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- packages/next/AGENTS.mdAGENTS.md
- test/AGENTS.mdAGENTS.md
- turbopack/AGENTS.mdAGENTS.md
- evals/next-upgrade/apps/member-dashboard/next-13/CLAUDE.mdCLAUDE.md
- evals/next-upgrade/apps/member-dashboard/next-15/CLAUDE.mdCLAUDE.md
- authoring-skillsSkill
- backport-prSkill
- create-prSkill
- dce-edgeSkill
- deploy-release-testSkill
- docs-diagramsSkill
- flagsSkill
- gate-testsSkill
- gh-stackSkill
- insight-error-pageSkill
- next-rspackSkill
- pr-status-triageSkill
- react-syncSkill
- react-vendoringSkill
- rebase-prSkill
- router-actSkill
- run-testsSkill
- runtime-debugSkill
- rust-turbopackSkill
- sandbox-benchSkill
- update-docsSkill
- v8-jitSkill
- write-guideSkill
- next-bundle-optimizerSkill
- next-cache-components-adoptionSkill
- next-cache-components-optimizerSkill
- next-dev-loopSkill
- next-partial-prefetching-adoptionSkill
- next-partial-prefetching-optimizerSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 4 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 97
Components: Start with a props summary table (| Prop | Example | Type | Required |).
- Very specific: line 106
Use
switcherfor tsx/jsx pairs: Always include both. Always include filename="path/to/file.ext". - Very specific: line 108
Tables for simple APIs, subsections for complex ones: If a prop/param needs only a type and one-line description, use a table row.
- Distinctive: line 112
No em dashes: Use periods, commas, or parentheses instead.
- Very specific: line 114
Link to related docs with relative paths: Use /docs/app/... format.
- Distinctive: line 132
Ask for reference material: Ask the user if they have any RFCs, PRs, design docs, or other context that should inform the doc.
- Distinctive: line 134
Research the implementation: Read the source code to understand params, return types, edge cases, and defaults.
- Very specific: line 135
Check e2e tests: Search test/ for tests exercising the API to find real usage patterns, edge cases, and expected behavior.
- Distinctive: line 137
Write using the appropriate category template: Follow the rules above.
- Very specific: line 138
Review against the rules: Verify: one sentence opener, immediate code example, correct switcher/filename usage, tables vs subsections, …
- Very specific: line 142
Read these pages in docs/01-app/03-api-reference/ before writing.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Writing API Reference Pages
Goal
Produce an API reference page that documents a single API surface (function, component, file convention, directive, or config option). The page should be concise, scannable, and example-driven.
Each page documents one API. If the API has sub-methods (like cookies.set()), document them on the same page. If two APIs are independent, they get separate pages.
Structure
Identify which category the API belongs to, then follow the corresponding template.
Categories
- Function (
cookies,fetch,generateStaticParams): signature, params/returns, methods table, examples - Component (
Link,Image,Script): props summary table, individual prop docs, examples - File convention (
page,layout,route): definition, code showing the convention, props, behavior, examples - Directive (
use client,use cache): definition, usage, serialization/boundary rules, reference - Config option (
basePath,images, etc.): definition, config code, behavioral sections
Template
---
title: {API name}
description: {API Reference for the {API name} {function|component|file convention|directive|config option}.}
---
{One sentence defining what it does and where it's used.}
```tsx filename="path/to/file.tsx" switcher
// Minimal working usage
```
```jsx filename="path/to/file.js" switcher
// Same example in JS
```
## Reference
{For functions: methods/params table, return type.}
{For components: props summary table, then `#### propName` subsections.}
{For file conventions: `### Props` with `#### propName` subsections.}
{For directives: usage rules and serialization constraints.}
{For config: options table or individual option docs.}
### {Subsection name}
{Description + code example + table of values where applicable.}
## Good to know
- {Default behavior or implicit effects.}
- {Caveats, limitations, or version-specific notes.}
- {Edge cases the developer should be aware of.}
## Examples
### {Example name}
{Brief context, 1-2 sentences.}
```tsx filename="path/to/file.tsx" switcher
// Complete working example
```
```jsx filename="path/to/file.js" switcher
// Same example in JS
```
## Version History
| Version | Changes |
| -------- | --------------- |
| `vX.Y.Z` | {What changed.} |Category-specific notes:
- Functions: Lead with the function signature and
awaitif async. Document methods in a table if the return value has methods (likecookies). Document options in a separate table if applicable. - Components: Start with a props summary table (
| Prop | Example | Type | Required |). Then document each prop under#### propNamewith description, code example, and value table where useful. - File conventions: Show the default export signature with TypeScript types. Document each prop (
params,searchParams, etc.) under#### propNamewith a route/URL/value example table. - Directives: No
## Referencesection. Use## Usageinstead, showing correct placement. Document serialization constraints and boundary rules. - Config options: Show the
next.config.tssnippet. Use subsections for each behavioral aspect.
Rules
- Lead with what it does. First sentence defines the API. No preamble.
- Show working code immediately. A minimal usage example appears right after the opening sentence, before
## Reference. - Use
switcherfor tsx/jsx pairs. Always include both. Always includefilename="path/to/file.ext". - Use
highlight={n}for key lines. Highlight the line that demonstrates the API being documented. - Tables for simple APIs, subsections for complex ones. If a prop/param needs only a type and one-line description, use a table row. If it needs a code example or multiple values, use a
####subsection. - Behavior section uses
> **Good to know**:or## Good to know. Use the blockquote format for brief notes (1-3 bullets). Use the heading format for longer sections. Not "Note:" or "Warning:". - Examples section uses
### Example Namesubsections. Each example solves one specific use case. - Version History table at the end. Include when the API has changed across versions. Omit for new APIs.
- No em dashes. Use periods, commas, or parentheses instead.
- Mechanical, observable language. Describe what happens, not how it feels. "Returns an object" not "gives you an object".
- Link to related docs with relative paths. Use
/docs/app/...format. - No selling or justifying. No "powerful", "easily", "simply". State what the API does.
| Don't | Do |
| "This powerful function lets you easily manage cookies" | "cookies is an async function that reads HTTP request cookies in Server Components" |
| "You can conveniently access..." | "Returns an object containing..." |
| "The best way to handle navigation" | "<Link> extends the HTML <a> element to provide prefetching and client-side navigation" |
- Bridge new framework terms with legacy or generic vocabulary. When the API renames or differentiates from a prior concept (Pages-era term, generic web term, REST vocabulary), include one such synonym in the frontmatter
descriptionand once in prose. Example:description: "Use Dynamic Segments to read URL parameters and generate routes from dynamic data."mentions "URL parameters" alongside "Dynamic Segments". One synonym, folded into natural prose. No separate "Synonyms" or "Also known as" section, no keyword stuffing. Goal: preserve discoverability for users still searching the old vocabulary even when the framework has moved on.
| Don't | Do |
| "Learn how to use Route Handlers" | "Build API endpoints with Route Handlers, the App Router replacement for API Routes" |
| "Configure dynamic route segments" | "Read URL parameters from dynamic route segments" |
Workflow
- Ask for reference material. Ask the user if they have any RFCs, PRs, design docs, or other context that should inform the doc.
- Identify the API category (function, component, file convention, directive, config).
- Research the implementation. Read the source code to understand params, return types, edge cases, and defaults.
- Check e2e tests. Search
test/for tests exercising the API to find real usage patterns, edge cases, and expected behavior. - Check existing related docs for linking opportunities and to avoid duplication.
- Write using the appropriate category template. Follow the rules above.
- Review against the rules. Verify: one sentence opener, immediate code example, correct
switcher/filenameusage, tables vs subsections, "Good to know" format, no em dashes, mechanical language.
References
Read these pages in docs/01-app/03-api-reference/ before writing. They demonstrate the patterns above.
04-functions/cookies.mdx- Function with methods table, options table, and behavior notes03-file-conventions/page.mdx- File convention with props subsections and route/URL/value tables02-components/link.mdx- Component with props summary table and detailed per-prop docs01-directives/use-client.mdx- Directive with usage section and serialization rules04-functions/fetch.mdx- Function with troubleshooting section and version history
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

