vercel avatar

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

Installs 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

  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

Sponsors

Details

Repository
github.com/vercel/next.js
Categories
Frontend Development, Backend & APIs, Cloud & Infrastructure
First seen
May 16, 2026

More from vercel/next.js

All 14
1vercel avatarnext-cache-componentsvercel/nextjs-skillsnext cache components704skills.sh installs
2awesome-skills avatarcode-review-excellenceawesome-skills/code-review-skillProvides comprehensive code review guidance for React 19, Vue 3, Angular 17+, Svelte 5, Rust, TypeScript, Java, PHP, Python, Django, Go, C#/.NET, Kotlin, NestJS688skills.sh installs
3mindrally avatargraphql-developmentmindrally/skillsGraphQL development guidelines with type-safe clients, schema design, and integration with React and Next.js.685skills.sh installs
4janjaszczak avatarvanilla-webjanjaszczak/cursorBuild or modify plain HTML/CSS/JavaScript (no framework) using modular ES modules (ESM), SRP, minimal global state, and shippable runnable files with lightweigh669skills.sh installs
5web-infra-dev avatarchrome-bridge-automationweb-infra-dev/midscene-skillsVision-driven browser automation using Midscene Bridge mode. Operates entirely from screenshots — no DOM or accessibility labels required. Can interact with all661skills.sh installs
6josiahsiegel avatartailwindcss-advanced-design-systemsjosiahsiegel/claude-plugin-marketplaceTailwind CSS advanced design systems with design tokens and @theme configuration. PROACTIVELY activate for: (1) building a design system on Tailwind v4, (2) @th657skills.sh installs