com um clique
api-documentation
// Creates API documentation templates with endpoint descriptions, request/response examples, and authentication guides. Use when documenting REST APIs for developers.
// Creates API documentation templates with endpoint descriptions, request/response examples, and authentication guides. Use when documenting REST APIs for developers.
[HINT] Baixe o diretório completo da skill incluindo SKILL.md e todos os arquivos relacionados
| name | api-documentation |
| description | Creates API documentation templates with endpoint descriptions, request/response examples, and authentication guides. Use when documenting REST APIs for developers. |
| allowed-tools | Read Write Glob |
| metadata | {"author":"matthewhitcham","version":"1.0"} |
Use this skill when you need to:
DO NOT use this skill for internal code documentation, SDK documentation, or webhook setup guides. This is for external-facing REST API documentation.
API DOCUMENTATION IS WRITTEN FOR DEVELOPERS WHO WANT TO INTEGRATE, NOT READ — EVERY PAGE MUST ANSWER "HOW DO I DO THIS?" WITH A COPY-PASTE EXAMPLE.
| Input | What to Ask | Default |
|---|---|---|
| API purpose | "What does this API do in one sentence?" | No default — must be provided |
| Base URL | "What is the base URL for API requests?" | No default — must be provided |
| Authentication method | "How do users authenticate? API key, OAuth, Bearer token?" | API key in header |
| Endpoints to document | "List all endpoints with their HTTP methods." | No default — must be provided |
| Response format | "JSON, XML, or both?" | JSON |
| Rate limits | "Are there rate limits? If so, what are they?" | 100 requests per minute |
GATE: Confirm the brief before structuring the documentation.
For each endpoint, document:
GATE: Confirm structure and endpoint list before writing.
## Authentication
All API requests require an API key passed in the header:
\`\`\`
Authorization: Bearer YOUR_API_KEY
\`\`\`
**Getting your API key:**
1. Log in to your dashboard
2. Navigate to Settings → API
3. Click "Generate API Key"
4. Copy and store securely — it will not be shown again
**Security:** Never expose your API key in client-side code, public repositories, or URLs.
Write a complete first-request walkthrough:
## [METHOD] /endpoint/path
[One-sentence description of what this endpoint does.]
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| id | string | Yes | The resource ID |
| limit | integer | No | Max results (default: 20, max: 100) |
### Request Example
\`\`\`bash
curl -X GET "https://api.example.com/v1/resource" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
\`\`\`
### Response Example
\`\`\`json
{
"data": [...],
"meta": {
"total": 42,
"page": 1,
"per_page": 20
}
}
\`\`\`
### Error Responses
| Code | Message | Resolution |
|------|---------|------------|
| 401 | Unauthorized | Check your API key |
| 404 | Not found | Verify the resource ID exists |
| 429 | Rate limited | Wait and retry after the Retry-After header value |
## Error Codes
| HTTP Code | Error Type | Description | Resolution |
|-----------|-----------|-------------|------------|
| 400 | Bad Request | Invalid parameters | Check request body against schema |
| 401 | Unauthorized | Missing or invalid API key | Verify your API key |
| 403 | Forbidden | Insufficient permissions | Check your plan's API access level |
| 404 | Not Found | Resource does not exist | Verify the resource ID |
| 429 | Too Many Requests | Rate limit exceeded | Retry after Retry-After header value |
| 500 | Internal Server Error | Server-side issue | Retry; contact support if persistent |
List official or community SDKs if available. If none exist, provide example code in 2-3 popular languages (Python, JavaScript, cURL).
## API Documentation Checklist
- [ ] Base URL is clearly stated at the top
- [ ] Authentication section includes step-by-step key setup
- [ ] Quick start gets a developer to their first response in under 5 minutes
- [ ] Every endpoint has method, path, description, parameters, and examples
- [ ] cURL examples are copy-paste ready
- [ ] Response examples use realistic fake data
- [ ] Error codes include resolution steps
- [ ] Rate limit policy is documented with handling guidance
- [ ] Changelog tracks breaking changes with dates
- [ ] No placeholder text or TODO items remain
API: Invoice management API for a billing SaaS
Quick start excerpt:
## Quick Start
Make your first API call in 3 steps:
### 1. Get your API key
Go to Settings → API in your dashboard and generate a key.
### 2. List your invoices
curl -X GET "https://api.invoicebot.com/v1/invoices" \
-H "Authorization: Bearer sk_test_abc123"
### 3. Check the response
{
"data": [
{
"id": "inv_001",
"client": "Acme Corp",
"amount": 2500.00,
"status": "paid"
}
]
}
You are ready. Explore the full endpoint reference below.