Command Palette

Search for a command to run...

Назад к скиллам
скилл № 80990

contract-testing

Test an integration boundary against explicit request, response, event, schema, error, authentication, pagination, and compatibility contracts without…

БесплатноБез исполняемых скриптов
Dadmin88от Dadmin88★ 52 звезды на GitHub

Установить contract-testing в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Integration Contract Testing

Use when two independently owned systems must evolve without silently breaking their shared interface.

Procedure

  1. Define the contract surface being protected: operations/events, schemas, required/optional fields, identifiers, types, units, auth context, errors, pagination, ordering, retries, and side effects as relevant.
  2. Identify the authoritative contract source: provider specification, OpenAPI/GraphQL/IDL/schema, consumer expectations, recorded fixtures, or a jointly versioned interface.
  3. Build focused contract cases for common success, empty/optional data, validation/auth errors, pagination boundaries, rate limits, conflict/retry states, and provider-specific edge behavior.
  4. Validate both syntax and semantics. A response that decodes successfully may still violate units, identifiers, default behavior, enum meaning, or state transitions expected by the consumer.
  5. Use generated/mocked provider behavior only for deterministic local coverage. Keep at least one validation path against a real sandbox/test provider or current authoritative fixtures when practical so mocks do not become the only source of truth.
  6. For consumer-driven contracts, ensure they represent supported provider behavior rather than requiring every accidental consumer assumption forever.
  7. Version fixtures/schemas and record the provider/API revision they represent. Refresh them deliberately when provider behavior changes.
  8. Test compatibility across the actual rollout window, including old/new client or provider representations when mixed versions or replayed events can coexist.
  9. Make failures explain which contract dimension changed and preserve provider correlation/fixture identifiers needed to investigate.
  10. Run contract tests at a cadence appropriate to provider change risk, especially before upgrading SDK/API versions or after provider deprecation notices.

Decision rules

  • Mocks can prove consumer handling of a contract but cannot prove the external provider still honors it.
  • Do not snapshot enormous payloads when a smaller explicit assertion better captures the contract.
  • Provider quirks that matter to correctness should be encoded deliberately, not left as tribal knowledge.
  • Contract tests complement end-to-end testing; they do not replace product-level validation of the assembled workflow.

Quality gate

Contract coverage is adequate when the meaningful integration surface is explicit, important success/error/compatibility cases are executable, mocks/fixtures are tied to authoritative behavior, mixed-version assumptions are tested, and a provider or client change that violates a relied-on contract produces a precise failure before production surprises consumers.

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл contract-testing?

Test an integration boundary against explicit request, response, event, schema, error, authentication, pagination, and compatibility contracts without confusing mocks with provider truth.

Как установить скилл contract-testing?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл contract-testing запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить contract-testing с