API documentation with OpenAPI and developer portals
Generates comprehensive API documentation from OpenAPI specs and developer portals. Triggers when creating or updating API docs, SDKs, or changelogs for REST APIs.
/plugin marketplace add pluginagentmarketplace/custom-plugin-api-design/plugin install custom-plugin-api-design@pluginagentmarketplace-api-designThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/config.yamlassets/schema.jsonreferences/GUIDE.mdreferences/PATTERNS.mdscripts/validate.pyCreate comprehensive API documentation.
openapi: 3.1.0
info:
title: My API
version: 1.0.0
description: |
API description with **markdown** support.
## Authentication
Use Bearer tokens.
servers:
- url: https://api.example.com
description: Production
paths:
/users:
get:
operationId: listUsers
summary: List all users
tags: [Users]
parameters:
- $ref: '#/components/parameters/PageParam'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/UserList'
components:
schemas:
User:
type: object
required: [id, name]
properties:
id:
type: string
format: uuid
name:
type: string
# In OpenAPI
paths:
/users:
post:
x-codeSamples:
- lang: curl
source: |
curl -X POST https://api.example.com/users \
-H "Authorization: Bearer TOKEN" \
-d '{"name": "John"}'
- lang: python
source: |
import requests
requests.post('https://api.example.com/users',
headers={'Authorization': 'Bearer TOKEN'},
json={'name': 'John'})
- lang: javascript
source: |
await fetch('https://api.example.com/users', {
method: 'POST',
headers: { 'Authorization': 'Bearer TOKEN' },
body: JSON.stringify({ name: 'John' })
});
# Generate TypeScript SDK
npx @openapitools/openapi-generator-cli generate \
-i openapi.yaml \
-g typescript-fetch \
-o ./sdk
# Generate Python SDK
openapi-generator generate \
-i openapi.yaml \
-g python \
-o ./sdk-python
# Changelog
## [1.2.0] - 2024-12-30
### Added
- `GET /users/export` endpoint
### Changed
- `POST /users` now returns 201
### Deprecated
- `GET /users/:id/profile` (use `/users/:id`)
### Fixed
- Pagination cursor encoding
import { validate } from '@apidevtools/swagger-parser';
describe('OpenAPI Spec', () => {
it('should be valid OpenAPI 3.1', async () => {
const api = await validate('./openapi.yaml');
expect(api.openapi).toMatch(/^3\.1\./);
});
it('should have examples for all endpoints', async () => {
const api = await validate('./openapi.yaml');
Object.values(api.paths).forEach(path => {
Object.values(path).forEach(operation => {
if (operation.responses?.['200']) {
expect(operation.responses['200'].content)
.toHaveProperty('application/json.examples');
}
});
});
});
});
| Issue | Cause | Solution |
|---|---|---|
| Spec validation fails | Invalid syntax | Use spectral linter |
| SDK types wrong | Schema mismatch | Regenerate from spec |
| Missing examples | Incomplete docs | Add request/response examples |
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.