Agent skill
api-documentation
Guide writing clear, comprehensive API documentation that helps developers integrate
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/api-documentation-baphled-dotopencode
SKILL.md
Skill: api-documentation
What I do
I guide the creation of clear, developer-centric API documentation. I focus on technical accuracy, intuitive structure, and practical examples to ensure developers can integrate with services quickly and reliably.
When to use me
- Writing OpenAPI (Swagger) or GraphQL schema documentation
- Creating developer portals, SDK guides, or integration tutorials
- Documenting authentication flows, error codes, and rate limits
- Writing API changelogs and migration guides for breaking changes
Core principles
- Technical Accuracy — Every parameter, type, and endpoint must match the actual implementation exactly.
- Context Before Mechanics — Explain what an endpoint achieves and why to use it before detailing its parameters.
- Consistency — Use the same terminology, formatting, and data structures across all documented endpoints.
- Clarity Through Examples — Provide realistic request and response samples for every endpoint.
- Standardised Errors — Document every possible error code and the specific conditions that trigger them.
Patterns & examples
Endpoint Documentation Template
Every endpoint should follow a consistent structure:
- Summary: Concise one-line description of the action.
- Description: Detailed context, requirements, and side effects.
- Authentication: Required scopes, tokens, or headers.
- Parameters: Detailed table with types, constraints, and descriptions.
- Request Body: JSON example with realistic data.
- Responses: Success and error codes with examples.
Example Request/Response
POST /v1/users/register
Content-Type: application/json
{
"email": "[email protected]",
"full_name": "Dev User"
}
Anti-patterns to avoid
- ❌ Auto-generated fluff — Relying purely on tools without adding descriptive context and use cases.
- ❌ Missing error states — Documenting only the 200 OK response and leaving failures to guesswork.
- ❌ Stale examples — Using field names or data structures that have been deprecated or removed.
- ❌ Internal jargon — Using terms that only internal developers understand without explanation.
KB Reference
~/vaults/baphled/3. Resources/Knowledge Base/AI Development System/Skills/Communication-Writing/API Documentation.md
Related skills
api-design— Align documentation with API design best practices.documentation-writing— Apply general technical writing standards.writing-style— Maintain a professional and consistent voice.release-notes— Document API changes and updates for consumers.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?