write-api-reference

Installation
SKILL.md

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
Related skills
Installs
673
Repository
vercel/next.js
GitHub Stars
139.4K
First Seen
Mar 14, 2026