Design consumer-driven contract testing strategies using Pact, verify provider contracts, and manage API evolution with contract-first approaches.
Design consumer-driven contract testing strategies using Pact, verify provider contracts, and manage API evolution with contract-first approaches.
/plugin marketplace add melodic-software/claude-code-plugins/plugin install test-strategy@melodic-softwareThis skill is limited to using the following tools:
references/matchers-cicd.mdreferences/message-contracts.mdreferences/pact-dotnet-implementation.mdreferences/strategy-template.mdUse this skill when:
Contract testing verifies that services communicate correctly by testing the contract (API agreement) between a consumer and provider. Consumer-driven contracts (CDC) ensure providers don't break their consumers.
| Aspect | E2E Tests | Integration Tests | Contract Tests |
|---|---|---|---|
| Scope | Full system | Component + deps | Consumer-provider |
| Speed | Slow (minutes) | Medium (seconds) | Fast (ms) |
| Reliability | Often flaky | Moderate | Very stable |
| Deployment coupling | High | Medium | Low (async) |
| Failure localization | Poor | Moderate | Excellent |
| Maintenance | High | Medium | Low |
┌─────────────────────────────────────────────────────────────┐
│ CONSUMER SIDE │
│ │
│ 1. Consumer writes test 2. Test generates contract │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ Consumer │ │ Contract │ │
│ │ Test │ ─────► │ (JSON) │ │
│ └──────────────┘ └──────────────┘ │
│ │ │
└──────────────────────────────────────┼──────────────────────┘
│
▼ Publish to Broker
┌──────────────────┐
│ Contract Broker │
│ (Pact Broker) │
└────────┬─────────┘
│
┌──────────────────────────────────────┼──────────────────────┐
│ PROVIDER SIDE │ │
│ ▼ │
│ 3. Provider verifies contract │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ Provider │ ◄───── │ Contract │ │
│ │ Verification│ │ (JSON) │ │
│ └──────────────┘ └──────────────┘ │
│ │ │
│ ▼ │
│ 4. Provider tests pass = Contract honored │
│ │
└─────────────────────────────────────────────────────────────┘
| Change Type | Breaking? | Action |
|---|---|---|
| Remove field | Yes | Block deployment |
| Change field type | Yes | Block deployment |
| Add required field | Yes | Block deployment |
| Add optional field | No | Allow |
| Add new endpoint | No | Allow |
| Purpose | Tool | Rationale |
|---|---|---|
| Contract Framework | PactNet | .NET native, mature |
| Broker | Pact Broker | Standard, free tier |
| Async Contracts | Pact Message | Same ecosystem |
| Schema Validation | OpenAPI | Industry standard |
| Reference | Content | When to Load |
|---|---|---|
| strategy-template.md | Contract testing strategy template, service maps, workflows | Planning contract testing strategy |
| pact-dotnet-implementation.md | Consumer tests, provider verification, provider states | Implementing Pact in .NET |
| message-contracts.md | Async message/event contract testing | Testing event-driven architectures |
| matchers-cicd.md | Pact matchers, breaking change detection, CI/CD pipelines | Matcher syntax, CI/CD integration |
Inputs from:
test-strategy-planning skill → Contract test scopeOutputs to:
api-design-fundamentals skill → Contract-first designQuery: "Help me design a contract testing strategy for our microservices"
Expected: Skill activates, provides strategy template, guides through service mapping
Query: "Show me how to write Pact consumer tests in .NET"
Expected: Skill activates, loads pact-dotnet-implementation.md reference, provides code examples
Query: "How do I integrate contract testing into our GitHub Actions pipeline?"
Expected: Skill activates, loads matchers-cicd.md reference, provides pipeline examples
Last Updated: 2025-12-28
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.