/a-team:api-contract-firstfrom a-team
Enforces a contract-first workflow requiring OpenAPI 3.x, protobuf, or GraphQL schema before implementing any API endpoint or service interface.
Ships in a-team. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
NO API IMPLEMENTATION WITHOUT A REVIEWED CONTRACT.
Writing endpoints before the contract is building to a spec that doesn't exist.
The contract IS the spec. Code that matches it is correct. Code that doesn't is wrong.
Use this skill before writing ANY of these:
Choose the format that matches the project's stack:
REST → OpenAPI 3.x
# docs/api/openapi.yaml
paths:
/orders:
post:
summary: Create a new order
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrderRequest'
responses:
'201':
description: Order created
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
'400':
$ref: '#/components/responses/ValidationError'
'401':
$ref: '#/components/responses/Unauthorized'
components:
schemas:
CreateOrderRequest:
type: object
required: [userId, items]
properties:
userId:
type: string
format: uuid
items:
type: array
minItems: 1
items:
$ref: '#/components/schemas/OrderItem'
Events / Async → AsyncAPI or JSON Schema
# docs/events/order-created.yaml
name: order.created
version: 1.0.0
payload:
type: object
required: [orderId, userId, createdAt]
properties:
orderId: { type: string, format: uuid }
userId: { type: string, format: uuid }
createdAt: { type: string, format: date-time }
Before implementation begins, verify the contract satisfies all of these:
Naming & Consistency
/orders not /createOrder)Completeness
Versioning
/v2/) — never modify /v1/ in a breaking waySecurity
Consumer Perspective
Save the contract file to docs/api/ or docs/events/. The contract is reviewed before implementation begins — not after.
Approval gate: the planner agent must reference the approved contract file in the implementation plan. If no contract file is referenced, the plan is not complete.
Implementation is correct when it matches the contract exactly. The contract is the source of truth — not the implementation.
If the implementation reveals that the contract needs to change:
Never silently diverge from the contract. Every divergence is a breaking change waiting to happen.
Write at least one contract test per endpoint that validates the actual response against the OpenAPI schema:
// [VALID] — tests the real implementation against the contract
import { validate } from 'openapi-validator'
import { spec } from '../docs/api/openapi.yaml'
test('POST /orders response matches contract', async () => {
const response = await request(app).post('/orders').send(validPayload)
const errors = validate(spec, '/orders', 'post', response)
expect(errors).toHaveLength(0)
})
These mean you are about to skip the contract step:
All of these precede the same outcome: a client built on undocumented assumptions, followed by a breaking change that neither team sees coming.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub rbraga01/a-team --plugin a-team20 skills in this plugin
/architecture-auditSystematic architecture review workflow. Use before major feature work on an unfamiliar or inherited codebase, before scaling milestones, or as a periodic health check. Maps the system as-built (not as-documented), dispatches parallel specialist reviews, and produces an evidence-backed findings report with severity verdicts./brainstormingUse BEFORE any creative work — creating features, building components, adding functionality. Explores user intent, requirements, and design before implementation. Hard-gated: no code until user approves the spec./data-migrationHard gate before any database schema change or data transformation in production. Requires a written migration plan with rollback strategy, dry run, and verification steps before execution. Prevents data loss, downtime, and irreversible schema changes.Other plugins' skills for the same job