Agent skill
adinsights-contract-guard
Detect and classify ADinsights API/data/integration contract risk for planning and review. Use when prompts or file changes touch serializers, API schemas, dbt models, Airbyte connector schemas, or contract documentation updates.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/adinsights-contract-guard
SKILL.md
ADinsights Contract Guard
Overview
Classify contract-impact risk for a proposed change and return an advisory contract decision packet with required docs, tests, reviewers, and next actions. This skill owns contract classification; scope gatekeeper only emits contract risk signals.
Context Load Order
- Open
AGENTS.md. - Open
docs/project/api-contract-changelog.md. - Open
docs/project/integration-data-contract-matrix.md. - Open
docs/runbooks/release-checklist.md. - Open
references/contract-rules.yaml. - Open
references/contract-surfaces.mdwhen classification is ambiguous.
Inputs and Evidence Priority
Use evidence in this order:
--changed-files-from-gitoutput if enabled and non-empty.- Explicit paths from
--changed-file. - Path hints from router/scope packets.
- Prompt-extracted path hints.
- Prompt semantic hints (keywords only).
Decision Outcomes
Return exactly one contract status:
PASS_NO_CONTRACT_CHANGEWARN_POSSIBLE_CONTRACT_CHANGEESCALATE_CONTRACT_CHANGE_REQUIRES_DOCSESCALATE_BREAKING_CHANGE
Strictness Model
- Default/local mode is advisory (
exit 0). --ci-strictremains backward-compatible and maps to strict levelbreaking_only.--ci-strict-level breaking_onlyreturns non-zero forESCALATE_BREAKING_CHANGE.--ci-strict-level breaking_or_missing_docsreturns non-zero for bothESCALATE_BREAKING_CHANGEandESCALATE_CONTRACT_CHANGE_REQUIRES_DOCS.
Output Contract
Return a contract decision packet with:
schema_version(1.0.0)contract_statusbreaking_change_detectedcontract_surfaces_touchedrequired_docs_updatesrequired_reviewersrequired_testsrationaleevidenceentries (type,value,strength,source)next_actions
CLI Interface
Use scripts/evaluate_contract.py:
--prompt "<text>" --format json|markdown--changed-file "<path>"(repeatable)--changed-files-from-git--router-packet "<path-to-json>"--scope-packet "<path-to-json>"--ci-strict--ci-strict-level breaking_only|breaking_or_missing_docs
Guardrails
- Contract guard is advisory unless CI strict mode is explicitly enabled.
- Never suppress required contract docs updates for touched contract surfaces.
- Keep PII/secrets guidance aligned with
AGENTS.md.
Maintenance
- Keep
references/contract-rules.yamlaligned with API/data contract docs. - Run
scripts/validate_contract_rules.pyafter rules edits. - Run
scripts/run_contract_golden_tests.pybefore syncing. - Sync with
scripts/sync_to_codex_home.sh.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?