java/src/main/resources/targets/claude/skills/conditional/test/x-test-contract/SKILL.md
Runs consumer-driven contract tests (Pact, Spring Cloud Contract) to verify API compatibility between services.
npx skillsauth add edercnj/ia-dev-environment x-test-contractInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run consumer-driven contract tests to verify API compatibility between services. Support both consumer-side (pact generation) and provider-side (pact verification) workflows using Pact or Spring Cloud Contract.
Include this skill when testing.contract_tests == true in the project configuration.
/x-test-contract --consumer -- generate pact files from consumer tests/x-test-contract --provider -- verify provider against published pacts/x-test-contract --all -- run both consumer generation and provider verification| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| --consumer | Flag | No | false | Generate pact files from consumer tests |
| --provider | Flag | No | false | Verify provider against published pacts |
| --all | Flag | No | false | Run both consumer generation and provider verification |
Check contract testing framework installed:
Based on argument:
--consumer: generate pact files--provider: verify against pacts--all: both in sequence@PactTest, Pact, pact.describe)target/pacts/ or pacts/ directoryGenerate structured output:
## Contract Test Results — [Mode: Consumer/Provider]
### Summary
- Interactions tested: [N]
- Passed: [N]
- Failed: [N]
### Failed Interactions
1. [Consumer -> Provider: interaction description, expected vs actual]
### Checklist Results
[Items that passed / failed / not applicable]
### Verdict: PASS / FAIL
| Scenario | Action | |----------|--------| | Contract framework not installed | Report missing dependency with install instructions for the detected language | | Consumer-provider interaction fails | Report failed interactions with expected vs actual details | | Pact broker unreachable | Warn and continue with local pact files | | Sensitive data detected in pact files | FAIL with file location and remediation guidance |
development
Documentation freshness gate: validates 6 dimensions (readme, api, adr, etc.) per PR.
testing
Conditional dep-policy gate: CVEs, licenses, versions, freshness; SARIF + report.
documentation
Incrementally updates the service or system architecture document; never regenerative.
development
Scans code and git history for leaked credentials, API keys, and tokens; SARIF output.