用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aibot88/sec_skill_store --skill contract-check命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Guides the creation of agile user stories and Gherkin feature files. Use when the user wants to create a user story, write acceptance criteria, define Gherkin scenarios, or author BDD feature files. This should trigger for requests such as Create a user story; Write a user story; I need to write a user story. Part of cursor-rules-java project
Guía técnica completa para integrar 250+ servicios externos con agentes IA usando Composio. Cubre instalación, autenticación OAuth, gestión de herramientas, triggers y flujos multi-servicio.
Facilitates conversational discovery to create Architectural Decision Records (ADRs) for non-functional requirements using the ISO/IEC 25010:2023 quality model. Use when the user wants to document quality attributes, NFR decisions, security/performance/scalability architecture, or design systems with measurable quality criteria. This should trigger for requests such as Create ADR for Non-functional requirements; Document Non-functional requirements; Capture Non-functional requirements; Generate Non-functional requirements in an ADR. Part of cursor-rules-java project
基于 SOC 职业分类
正在显示 SKILL.md
| name | contract-check |
| description | Audit health of contract tests across services — staleness, sync gaps, uncommitted pacts, missing tests. |
| allowed-tools | Read,Grep,Glob,Bash(./scripts/contract-check:*),Bash(./scripts/mgit:*),Bash(ls:*),Bash(chmod:*),Skill,AskUserQuestion |
| version | 1.0.0 |
| author | flurdy |
Audits the health of consumer-driven contract tests across all letterbox services. Surfaces staleness, sync gaps, uncommitted pacts, missing tests, documentation drift, and disabled tests.
This is a read-only audit — it does not run tests or modify files. Use /contract-test to execute contract test workflows.
/contract-check # Full audit (all checks)
/contract-check status # Summary dashboard only
/contract-check stale # Consumer output newer than provider copy
/contract-check uncommitted # Pact files not committed in service repos
/contract-check sync-gaps # Pairs missing from sync-pacts.sh
/contract-check missing # Connectors with no consumer tests
/contract-check docs # Documentation drift in pact-workflow.md
/contract-check disabled # Contract tests excluded from default builds
/contract-check <service> # All checks scoped to one service
On first run, ensure the script symlink exists:
ln -sfn "$SKILLS_DIR/contract-check/scripts/contract-check.sh" ./scripts/contract-check
chmod +x ./scripts/contract-check
Where $SKILLS_DIR resolves to ${CLAUDE_HOME:-$HOME/.claude}/skills.
Check that ./scripts/contract-check exists and is executable. If not, create the symlink as shown in Setup above.
Parse the user's argument:
(none) or full → Run all checks (mechanical + semantic)status → Run all checks but only show the summary tablestale → Run ./scripts/contract-check staleuncommitted → Run ./scripts/contract-check uncommittedsync-gaps → Run ./scripts/contract-check sync-gapsmissing → Run semantic Missing Consumer Tests check (Step 3)docs → Run semantic Documentation Drift check (Step 4)disabled → Run semantic Disabled Tests check (Step 5)<service> → Run all checks scoped to that servicematrix → Run ./scripts/contract-check matrixBefore running the uncommitted check (or all/full), suggest running make normalize-pacts first. Pact libraries regenerate random UUIDs, dates, and strings on every test run, causing noisy git diffs that aren't real contract changes. The normalizer replaces these with deterministic placeholders.
Note: normalize-pacts.py currently only normalizes values referenced by generators.body metadata. UUIDs in providerStates.params, request.path, request.headers, and response.headers are NOT yet normalized — those may still show as noise in uncommitted diffs. Flag these as noise in the report when the diff is UUID-only.
Run the appropriate script subcommand:
./scripts/contract-check all # or stale, uncommitted, sync-gaps, matrix
Parse the script output. Each line starts with a status keyword:
OK — no action neededSTALE — consumer pact is newer than provider copyDIFFERS — same age but content differsMISSING_PROVIDER — provider does not have this pact fileUNCOMMITTED — pact file has uncommitted changesCOVERED — pair is in sync-pacts.shNOT_SYNCED — pair has consumer pact but is missing from sync-pacts.shSTALE_SYNC — pair is in sync-pacts.sh but consumer has no pact file (not built)CLEAN — no issues foundNO_DATA — no consumer pact files foundSUMMARY — counts for the checkFor each consumer service, compare connectors against consumer test files:
Find connectors — Glob for connector files:
<service>/app/connectors/*Connector.scala<service>/src/main/scala/**/connectors/*Connector.scalaFind consumer tests — Glob for consumer test files:
<service>/test/contract/*Consumer*.scala<service>/src/test/scala/**/contract/*Consumer*.scalaExtract provider name from connector filename: strip Connector suffix, lowercase. E.g., AccountConnector.scala → account.
Exclude external connectors that are not internal services:
Cross-reference: For each connector, check if a matching consumer test exists. Report connectors with no consumer test.
Output format:
### Missing Consumer Tests
| Service | Connector | Provider | Has Consumer Test |
|---------|-----------|----------|-------------------|
| reconciler | EventConnector | event | NO |
| reconciler | MessageQueueConnector | messagequeue | NO |
docs/pact-workflow.md./scripts/contract-check matrix to get actual relationshipsSearch for contract test exclusions in build.sbt files:
-l tags.ContractTest or --exclude-tags=ContractTestFor services with active exclusions, check if the Makefile test-contract target overrides it (e.g., with set Test/testOptions := Nil)
Report:
sbt test silently skips contract teststest-contract Makefile target entirelyCombine all findings into a health report:
# Contract Health Report
## Summary
| Check | Status | Details |
|------------------|--------|--------------------------------|
| Staleness | PASS/WARN/FAIL | X stale / Y total |
| Uncommitted | PASS/WARN | X files across Y services |
| Sync coverage | PASS/FAIL | X/Y pairs in sync-pacts.sh |
| Missing tests | PASS/WARN | X connectors without tests |
| Documentation | PASS/FAIL | X items out of date |
| Disabled tests | PASS/INFO | X services exclude by default |
## Staleness
[details from script output]
## Uncommitted Pact Files
[details from script output]
## Sync Coverage Gaps
[details from script output]
## Missing Consumer Tests
[details from LLM analysis]
## Documentation Drift
[details from LLM analysis]
## Disabled Tests
[details from LLM analysis]
## Recommended Actions (priority order)
1. [most impactful fix first]
2. ...
Status thresholds:
After presenting the report, ask the user:
Would you like me to create beads for the issues found? I can triage them as P3 tasks with appropriate service labels.
If the user agrees, use /triage to create beads for actionable findings. Group related findings into single beads where appropriate (e.g., "Add digest, patrol, reconciler to sync-pacts.sh" as one bead rather than three).
When invoked with a service name (/contract-check dispatch):
make test-contract in consumer servicesMost providers use test/resources/pacts/. Exceptions:
src/test/resources/pacts/src/test/resources/pacts/Braintree, Stripe, SES, SpamConfiguration, WebConfiguration, ApiConnector (abstract base), ConnectorConfiguration, ConnectorModule