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.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionwrite-api-referenceExecute the skills CLI command in your project's root directory to begin installation:
Fetches write-api-reference from vercel/next.js and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate write-api-reference. Access via /write-api-reference in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
138.7K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
138.7K
stars
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.
Identify which category the API belongs to, then follow the corresponding template.
cookies, fetch, generateStaticParams): signature, params/returns, methods table, examplesLink, Image, Script): props summary table, individual prop docs, examplespage, layout, route): definition, code showing the convention, props, behavior, examplesuse client, use cache): definition, usage, serialization/boundary rules, referencebasePath, images, etc.): definition, config code, behavioral sections---
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:
await if async. Document methods in a table if the return value has methods (like cookies). Document options in a separate table if applicable.| Prop | Example | Type | Required |). Then document each prop under #### propName with description, code example, and value table where useful.params, searchParams, etc.) under #### propName with a route/URL/value example table.## Reference section. Use ## Usage instead, showing correct placement. Document serialization constraints and boundary rules.next.config.ts snippet. Use subsections for each behavioral aspect.## Reference.switcher for tsx/jsx pairs. Always include both. Always include filename="path/to/file.ext".highlight={n} for key lines. Highlight the line that demonstrates the API being documented.#### subsection.> **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:".### Example Name subsections. Each example solves one specific use case./docs/app/... format.| 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" |
test/ for tests exercising the API to find real usage patterns, edge cases, and expected behavior.switcher/filename usage, tables vs subsections, "Good to know" format, no em dashes, mechanical language.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 historyPrerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
mattpocock/skills
adjfks/corner-skills
jwynia/agent-skills
mindrally/skills
kostja94/marketing-skills
github/awesome-copilot
write-api-reference reduced setup friction for our internal harness; good balance of opinion and flexibility.
write-api-reference has been reliable in day-to-day use. Documentation quality is above average for community skills.
We added write-api-reference from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Keeps context tight: write-api-reference is the kind of skill you can hand to a new teammate without a long onboarding doc.
I recommend write-api-reference for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
write-api-reference fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Solid pick for teams standardizing on skills: write-api-reference is focused, and the summary matches what you get after install.
write-api-reference has been reliable in day-to-day use. Documentation quality is above average for community skills.
Useful defaults in write-api-reference — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
We added write-api-reference from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 43