plugins/writing-and-docs/skills/documenting-apis/SKILL.md
Create OpenAPI/Swagger specifications, generate SDK documentation, and write developer-focused API guides. Use when creating API documentation, writing endpoint specs, documenting REST APIs, or generating client library documentation.
npx skillsauth add arosenkranz/claude-code-config documenting-apisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create comprehensive, developer-focused API documentation following OpenAPI standards.
openapi: 3.0.0
info:
title: Your API
version: 1.0.0
description: Brief API description
servers:
- url: https://api.example.com/v1
paths:
/users:
get:
summary: List users
parameters:
- name: limit
in: query
schema:
type: integer
default: 10
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
components:
schemas:
User:
type: object
required:
- id
- email
properties:
id:
type: string
email:
type: string
format: email
## Authentication
All requests require an API key in the Authorization header:
\`\`\`bash
curl -H "Authorization: Bearer YOUR_API_KEY" \\
https://api.example.com/v1/users
\`\`\`
Get your API key from the [dashboard](https://example.com/dashboard).
For each endpoint, include:
## GET /users/{id}
Retrieve a specific user by ID.
**Parameters:**
- `id` (path, required): User UUID
**Response 200:**
\`\`\`json
{
"id": "123e4567-e89b-12d3",
"email": "[email protected]",
"created_at": "2024-01-15T10:30:00Z"
}
\`\`\`
**Response 404:**
\`\`\`json
{
"error": "user_not_found",
"message": "User with id '...' does not exist"
}
\`\`\`
| Status | Code | Meaning |
|--------|------|---------|
| 400 | invalid_request | Missing required parameters |
| 401 | unauthorized | Invalid or missing API key |
| 404 | not_found | Resource doesn't exist |
| 429 | rate_limit_exceeded | Too many requests |
| 500 | internal_error | Server error, contact support |
Provide examples in multiple languages:
### Create User
**cURL:**
\`\`\`bash
curl -X POST https://api.example.com/v1/users \\
-H "Authorization: Bearer YOUR_API_KEY" \\
-H "Content-Type: application/json" \\
-d '{"email": "[email protected]", "name": "John Doe"}'
\`\`\`
**JavaScript:**
\`\`\`javascript
const response = await fetch('https://api.example.com/v1/users', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ email: '[email protected]', name: 'John Doe' })
});
const user = await response.json();
\`\`\`
**Python:**
\`\`\`python
import requests
response = requests.post(
'https://api.example.com/v1/users',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={'email': '[email protected]', 'name': 'John Doe'}
)
user = response.json()
\`\`\`
When documenting client libraries:
## Installation
\`\`\`bash
npm install @example/sdk
\`\`\`
import { ExampleClient } from '@example/sdk';
const client = new ExampleClient({ apiKey: 'YOUR_API_KEY' });
// Create a user
const user = await client.users.create({
email: '[email protected]',
name: 'John Doe'
});
### `client.users.create(data)`
Create a new user.
**Parameters:**
- `data.email` (string, required): User email address
- `data.name` (string, required): User full name
**Returns:** Promise<User>
**Throws:**
- `ValidationError`: Invalid email format
- `ApiError`: Server-side error
**Example:**
\`\`\`javascript
const user = await client.users.create({
email: '[email protected]',
name: 'John Doe'
});
\`\`\`
Include exportable collection for testing:
{
"info": {
"name": "Example API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/"
},
"auth": {
"type": "bearer",
"bearer": [{"key": "token", "value": "{{api_key}}"}]
},
"item": [
{
"name": "Get Users",
"request": {
"method": "GET",
"url": "{{base_url}}/users"
}
}
]
}
tools
Lightweight orchestrator for spec-before-plan workflow. Use when starting a feature with ambiguous requirements. Walks SPEC.md → PLAN.md → execute, delegating to /superpowers:writing-plans and /superpowers:executing-plans. Invoke when asked to "spec this out", "spec-first", "spec and plan for X", or when feature requirements are vague.
tools
Problem Statement Co-Authoring Skill
development
Structure and maintain professional brag documents with clear templates for accomplishments, projects, and growth tracking. Use when documenting achievements, creating brag document entries, formatting accomplishments, or tracking career progress.
development
Analyze technical documentation for clarity, conciseness, and effectiveness using Google Technical Writing principles. Use when reviewing documentation, checking writing quality, improving docs, or providing writing feedback.