api-reference-documentation · aj-geddes — Claude Code skill: API docs
A skill that walks the agent through writing API reference docs: endpoints, auth, request and response examples, OpenAPI specs.
npx skills add aj-geddes/useful-ai-prompts --skill api-reference-documentation -a claude-codeWhat api-reference-documentation does
This skill gives the agent a shape for API documentation work. It starts from an OpenAPI 3.0+ spec and moves through endpoint descriptions, authentication, request and response examples, rate limits and pagination. The skill ships a starter spec example plus a references/ directory with deeper write-ups, including an OpenAPI specification example and a list-products endpoint.
REST is not the only target. The skill also covers GraphQL, webhooks, API versioning and SDK docs. A best-practices section lists what to include: error response formats, consistent naming, SDK examples in several languages, an interactive Swagger UI. It also lists what to avoid — undocumented endpoints, missing auth notes, ignored deprecation notices.
The skill installs across Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. In Claude the file lands at ~/.claude/skills/api-reference-documentation/SKILL.md. If your project still runs an older OpenAPI version, expect to rewrite part of the examples before the skill's output fits.
What it helps with
- document REST endpoints well enough for outside teams to integrate
- turn scattered notes into an OpenAPI 3.0+ specification
- add request and response examples to every endpoint
- write up authentication, rate limits and pagination
- cover webhooks and API versioning with a migration guide
Example prompts for the agent
- Write API reference docs for our orders service: endpoints, auth, request and response examples.
- Turn these endpoints into an OpenAPI spec and add error response examples.
- Document the webhooks and explain how to ship a new API version without breaking clients.
How to install api-reference-documentation
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill api-reference-documentation -a claude-code2Manually: put the files in place
~/.claude/skills/api-reference-documentation/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/api-reference-documentation/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill api-reference-documentation -a codex2Manually: put the files in place
.agents/skills/api-reference-documentation/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill api-reference-documentation -a cursor2Manually: put the files in place
.cursor/skills/api-reference-documentation/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts api-reference-documentation2Manually: put the files in place
.github/skills/api-reference-documentation/SKILL.md1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill api-reference-documentation -a gemini-cli2Platform CLI
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/api-reference-documentationManually: put the files in place
.devin/skills/api-reference-documentation/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill api-reference-documentation -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about api-reference-documentation
How do I install api-reference-documentation in Claude?
Run npx skills add aj-geddes/useful-ai-prompts --skill api-reference-documentation -a claude-code. The skill file then sits at ~/.claude/skills/api-reference-documentation/SKILL.md.
What does api-reference-documentation do?
It guides the agent through writing API reference docs: an OpenAPI spec, endpoint descriptions, authentication, request and response examples, rate limits and pagination.
Which API types does the skill cover?
REST and GraphQL, plus webhooks, versioning and SDK documentation.
Source text
SKILL.md · MIT
---
name: api-reference-documentation
description: >
Create comprehensive API reference documentation with OpenAPI/Swagger specs,
REST endpoints, authentication, examples, and SDKs. Use when documenting REST
APIs, GraphQL APIs, endpoint documentation, or OpenAPI specifications.
---
# API Reference Documentation
## Table of Contents
- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)
## Overview
Generate professional API documentation that developers can use to integrate with your API, including endpoint specifications, authentication, request/response examples, and interactive documentation.
## When to Use
- Documenting REST APIs
- Creating OpenAPI/Swagger specifications
- GraphQL API documentation
- SDK and client library docs
- API authentication guides
- Rate limiting documentation
- Webhook documentation
- API versioning guides
## Quick Start
Minimal working example:
```yaml
openapi: 3.0.3
info:
title: E-Commerce API
description: |
Complete API for managing e-commerce operations including products,
orders, customers, and payments.
## Authentication
All endpoints require Bearer token authentication. Include your API key
in the Authorization header: `Authorization: Bearer YOUR_API_KEY`
## Rate Limiting
- 1000 requests per hour for authenticated users
- 100 requests per hour for unauthenticated requests
## Pagination
List endpoints return paginated results with `page` and `limit` parameters.
version: 2.0.0
contact:
name: API Support
email: [email protected]
url: https://example.com/support
license:
name: MIT
url: https://opensource.org/licenses/MIT
// ... (see reference guides for full implementation)
```
## Reference Guides
Detailed implementations in the `references/` directory:
| Guide | Contents |
|---|---|
| [OpenAPI Specification Example](references/openapi-specification-example.md) | openapi: 3.0.3 |
| [List Products](references/list-products.md) | List Products |
## Best Practices
### ✅ DO
- Use OpenAPI 3.0+ specification
- Include request/response examples for every endpoint
- Document all query parameters and headers
- Provide authentication examples
- Include error response formats
- Document rate limits and pagination
- Use consistent naming conventions
- Include SDK examples in multiple languages
- Document webhook payloads
- Provide interactive API explorer (Swagger UI)
- Version your API documentation
- Include migration guides for breaking changes
### ❌ DON'T
- Skip error response documentation
- Forget to document authentication
- Use inconsistent terminology
- Leave endpoints undocumented
- Ignore deprecation notices
- Skip versioning information
© aj-geddes · MIT · aj-geddes/useful-ai-prompts
Similar skills
Everything for Writing and docs →api-reference-documentation by other authors comes first.