
Write Api Reference
This is Next.js's internal standard for writing API reference documentation, now packaged as a skill. It walks you through the five categories they use (function, component, file convention, directive, config option) and gives you templates for each. The approach is opinionated: one API per page, scannable structure with tables, example-driven rather than prose-heavy. If you're documenting a large framework or library and want consistency across dozens of reference pages, this gives you a proven pattern. It's built from how Vercel actually documents Next.js, so you're getting their house style rather than generic API doc advice.
- skills.sh installs
- 706
- GitHub stars
- 139.5K
- last updated
- May 16, 2026
Install
$ npx -y skills add vercel/next.js --skill write-api-reference --agent claude-codeInstalls into .claude/skills of the current project.
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
Sponsors
Details
- Repository
- github.com/vercel/next.js
- Categories
- Frontend Development, Backend & APIs, Cloud & Infrastructure
- First seen
- May 16, 2026