api-contracts
Keep workspace/CONTRACTS.md in sync with schemas and REST endpoints, including idempotency and financial invariants. Use when creating or changing any API or data model.
- License 许可
- MIT
- 最近更新
- 2026-10-20
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- api-contracts
- license
- MIT
- description
- Keep workspace/CONTRACTS.md in sync with schemas and REST endpoints, including idempotency and financial invariants. Use when creating or changing any API or data model.
- compatibility
- opencode
03 SKILL.md 正文
What I do
- Define the exact contract format every backend/architect agent must maintain.
When to use me
Use when creating or altering a schema, table, endpoint, or response shape.
Rules
- Document immediately in
workspace/CONTRACTS.md: route + method, request headers/body schema, response schemas per status code (200/201/400/404/500), validation rules. Every documented error status ships a test that triggers it. - Money: integer minor units + ISO currency; amounts immutable once processing begins.
- Idempotency:
Idempotency-Keyon POST create/confirm paths; effectively-once webhook handling with(provider_id, provider_event_id)uniqueness. - Tenancy: every query tenant-scoped; public IDs (UUIDv4) opaque and non-secret.
- Never invent: frontend and QA build strictly against documented contracts — no guessed paths or params.
- Collections: cursor pagination with capped
limit({ data, nextCursor }); filtering/sorting via explicit query params, documented per endpoint. - Rate limits: document quotas and
429+Retry-Afterbehavior for public endpoints.
04 同仓库更多 Skills
demo-skill
暂无简介
web-accessibility
WCAG 2.2 AA practice for keyboard, screen reader, contrast, and motion. Use when building or auditing user interfaces.
ui-conventions
Black/white token system, accessible components, and copy rules for frontend work. Use when building screens, components, or design tokens.
test-evidence
stack-toolchain test matrices, concurrency cases, and TASK_PROGRESS proof format for QA verification. Use when writing tests or proving deliverables work.
test-driven-development
RED-GREEN-REFACTOR cycle for new behavior. Use when implementing any feature, fix, or endpoint before writing production code.
systematic-debugging
Reproduce-isolate-fix-verify loop for defects and flaky behavior. Use when facing a bug, test failure, or unexpected behavior.