backend-openapi-documentation
Use when the user asks about OpenAPI, writing an OpenAPI spec, Swagger, openapi.yaml, spec-first design, Spectral linting, code generation or API docs…
от j4flmao★ 47 звёзд на GitHub
Установить backend-openapi-documentation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Backend OpenAPI Documentation
Purpose
Drive all API development with an OpenAPI 3.x spec-first workflow: spec defines the contract, code is generated from it, and the spec is versioned alongside the code. The OpenAPI spec is the single source of truth for the API contract.
Agent Protocol
Trigger
Exact user phrases: "OpenAPI", "Swagger", "API documentation", "spec-first", "API spec", "openapi.yaml", "swagger.json", "codegen", "openapi-generator", "API contract first".
Input Context
- Existing API endpoints or resource definitions.
- Chosen OpenAPI version (3.0.x or 3.1.x).
- Code generation target language.
Output Artifact
OpenAPI YAML/JSON spec snippet or full spec file. No file unless requested.
Response Format
Path: {path}
Method: {method}
OperationId: {operationId}
Tags: [{tag}]
Completion Criteria
- Every endpoint has: path, method, operationId, summary, tags.
- Every request/response has a schema.
- All schemas use $ref and are not inline.
- Error responses documented.
- Security schemes defined.
- Spec passes validation (spectral or swagger-cli).
Max Response Length
6 lines per endpoint. Unlimited for full spec.
Architecture Decision Tree
Spec-First vs Code-First
Who owns the API contract?
├── Spec-first (OpenAPI as source of truth)
│ ├── PRO: Contract before implementation, generates client/server code
│ ├── CON: Slower initial development, requires spec discipline
│ └── Use when: Public API, multiple consumers, external integrations
└── Code-first (annotations/comments generate spec)
├── PRO: Faster development, single source (code)
├── CON: Spec is afterthought, easy to forget docs
└── Use when: Internal API, single consumer, rapid prototyping
OpenAPI Version Decision
Do you need JSON Schema full compatibility?
├── Yes → OpenAPI 3.1.x (fully compatible with JSON Schema 2020-12)
│ ├── PRO: $ref anywhere, JSON Schema ecosystem
│ └── CON: Less tooling support, newer standard
└── No → OpenAPI 3.0.x (wider tool support)
├── PRO: Most tools support this (Swagger UI, codegen, Spectral)
└── CON: Limited JSON Schema compatibility
API Style Decision
REST or resource-based?
├── Yes → Standard resource endpoints:
│ GET /resources → List resources
│ POST /resources → Create resource
│ GET /resources/{id} → Get resource
│ PUT /resources/{id} → Replace resource
│ PATCH /resources/{id} → Partial update
│ DELETE /resources/{id} → Delete resource
└── No → RPC-style operations:
POST /rpc/operation → Google-style, non-CRUD
Workflow
Step 1: Define Info and Servers
openapi: 3.0.3
info:
title: Payment Service API
version: 1.0.0
description: Handles payment processing and reconciliation
contact:
name: Payment Team
email: [email protected]
license:
name: MIT
servers:
- url: https://api.example.com/v1
description: Production server
- url: https://staging-api.example.com/v1
description: Staging server
Step 2: Define Paths and Operations
paths:
/payments:
get:
operationId: listPayments
summary: List all payments with pagination and filtering
tags: [Payments]
parameters:
- $ref: '#/components/parameters/pageParam'
- $ref: '#/components/parameters/limitParam'
- name: status
in: query
schema:
type: string
enum: [pending, completed, failed, refunded]
responses:
'200':
description: Paginated list of payments
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedPayments'
'400':
$ref: '#/components/responses/BadRequest'
post:
operationId: createPayment
summary: Create a new payment
tags: [Payments]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreatePaymentRequest'
responses:
'201':
description: Payment created
headers:
Location:
schema:
type: string
format: uri
content:
application/json:
schema:
$ref: '#/components/schemas/Payment'
'409':
$ref: '#/components/responses/Conflict'
Step 3: Define Schemas (components)
components:
schemas:
Payment:
type: object
required: [id, amount, currency, status, createdAt]
properties:
id:
type: string
format: uuid
description: Unique payment identifier
amount:
type: number
minimum: 0.01
example: 49.99
currency:
type: string
pattern: '^[A-Z]{3}$'
example:
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/api-documentation-advanced.md
- references/api-documentation-fundamentals.md
- references/api-versioning.md
- references/api_reference.md
- references/architecture_patterns.md
- references/best_practices.md
- references/code-first.md
- references/configuration_templates.md
- references/deployment_strategies.md
- references/design-first.md
- references/documentation-tools.md
- references/merged-api-documentation.md
- references/openapi-basics.md
- references/openapi-codegen.md
- references/openapi-security.md
- references/openapi-setup.md
- references/openapi-testing.md
- references/openapi-tools.md
- references/openapi-versioning-strategies.md
- references/performance_tuning.md
- references/security_guidelines.md
- references/troubleshooting_matrix.md
FAQ
Что делает скилл backend-openapi-documentation?
Use when the user asks about OpenAPI, writing an OpenAPI spec, Swagger, openapi.yaml, spec-first design, Spectral linting, code generation or API docs hosting. Produces OpenAPI 3.1 documents with lint and CI checks. Not for endpoint semantics (use backend-api-design).
Как установить скилл backend-openapi-documentation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл backend-openapi-documentation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…