원클릭으로
api-contract
Generate or validate OpenAPI and AsyncAPI specs from code or requirements with consistent naming, errors, and pagination
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generate or validate OpenAPI and AsyncAPI specs from code or requirements with consistent naming, errors, and pagination
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Create Architecture Decision Records using the Michael Nygard template with context, decision, alternatives, and consequences
Generate CHANGELOG.md from git history in Keep a Changelog format with Added, Changed, Deprecated, Removed, Fixed, and Security categories
Generate CI/CD pipeline config for detected platform with lint, test, build, and deploy stages
Scan dependencies for CVEs, outdated packages, license issues, and unused deps to produce a prioritized remediation list
Guide deployment processes including CI/CD pipeline creation, environment setup, and rollback procedures
Analyze Dockerfile and produce optimized version with multi-stage builds, layer caching, minimal base, and security hardening
| name | api-contract |
| description | Generate or validate OpenAPI and AsyncAPI specs from code or requirements with consistent naming, errors, and pagination |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","workflow":"general"} |
Use this skill when you need to:
Discover: Analyze existing API code or requirements
Design resource model: Map domain entities to API resources
/users, /orders)/users/{id}/orders)Define endpoints: Specify each operation
Standardize patterns: Apply consistent conventions
Generate spec: Produce the OpenAPI/AsyncAPI document
Validate: Check spec for completeness and correctness
| Element | Convention | Example |
|---|---|---|
| Paths | kebab-case, plural nouns | /api/v1/user-accounts |
| Query params | camelCase | ?pageSize=20&sortBy=createdAt |
| Request/response fields | camelCase | { "firstName": "Jane" } |
| Schema names | PascalCase | UserAccount, OrderItem |
| Enum values | UPPER_SNAKE_CASE | "ORDER_PENDING" |
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Human-readable description",
"details": [
{
"field": "email",
"message": "Must be a valid email address",
"code": "INVALID_FORMAT"
}
],
"requestId": "req_abc123"
}
}
| Code | Usage |
|---|---|
| 200 | Successful GET, PUT, PATCH |
| 201 | Successful POST that creates a resource |
| 204 | Successful DELETE with no response body |
| 400 | Validation error or malformed request |
| 401 | Missing or invalid authentication |
| 403 | Authenticated but insufficient permissions |
| 404 | Resource not found |
| 409 | Conflict (duplicate, state violation) |
| 422 | Semantically invalid request |
| 429 | Rate limit exceeded |
| 500 | Unexpected server error |
# Query parameters
parameters:
- name: page
in: query
schema:
type: integer
minimum: 1
default: 1
- name: pageSize
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 20
# Response envelope
PagedResponse:
type: object
properties:
data:
type: array
items: { $ref: '#/components/schemas/Item' }
pagination:
type: object
properties:
page: { type: integer }
pageSize: { type: integer }
totalItems: { type: integer }
totalPages: { type: integer }
/api/v1/...)requestId in all error responses for traceabilityX-RateLimit-Limit, X-RateLimit-Remaining)$ref for reusable schemas over inline definitions