New advertisers: 50% off your first month with code FIRSTMONTHSee slots
vercel avatar

Write Api Reference

Structured reference for writing Next.js API documentation pages across functions, components, file conventions, directives, and config options.

skills.sh installs
706
GitHub stars
143.6K
last updated
May 16, 2026
View on GitHub

What it does

  • Covers five API categories: functions, components, file conventions, directives, and config options, each with a category-specific template
  • Includes a page template with YAML frontmatter, tsx/jsx switcher examples, reference, "Good to know" notes, examples, and version history
  • Enforces rules such as no em dashes, mechanical wording, highlight={n} on key lines, and one synonym for legacy terms
  • Designed for contributors drafting or reviewing API reference pages in the Next.js docs under docs/01-app/03-api-reference/

Install

$ npx -y skills add vercel/next.js --skill write-api-reference -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

  1. Function (cookies, fetch, generateStaticParams): signature, params/returns, methods table, examples
  2. Component (Link, Image, Script): props summary table, individual prop docs, examples
  3. File convention (page, layout, route): definition, code showing the convention, props, behavior, examples
  4. Directive (use client, use cache): definition, usage, serialization/boundary rules, reference
  5. Config option (basePath, images, etc.): definition, config code, behavioral sections

Template

Details

Repository
github.com/vercel/next.js
Category
Technical Documentation
First seen
May 16, 2026

More from vercel/next.js

All 14

Similar to Write Api Reference

More Technical Documentation