java/src/main/resources/targets/claude/skills/conditional/test/x-test-contract-lint/SKILL.md
Validates API contracts (OpenAPI 3.1, AsyncAPI 2.6, Protobuf 3) against their specifications. Reports structural errors, missing fields, and spec violations.
npx skillsauth add edercnj/claude-environment x-test-contract-lintInstall 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.
Validate API contracts before approval. Check OpenAPI 3.1, AsyncAPI 2.6, or Protobuf 3 specs for structural errors, missing fields, and specification violations.
Include this skill when the project uses API contracts (OpenAPI, AsyncAPI, or Protobuf).
/x-test-contract-lint path/to/contract-openapi.yaml -- validate an OpenAPI contract/x-test-contract-lint path/to/service.proto -- validate a Protobuf contract/x-test-contract-lint path/to/events-asyncapi.yaml -- validate an AsyncAPI contract| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| contract-file-path | String | Yes | (none) | Path to the contract file to validate |
Detect the contract format from the file extension and content:
| File Pattern | Format | Spec Version |
|-------------|--------|-------------|
| *-openapi.yaml | OpenAPI | 3.1 |
| *.proto | Protobuf | 3 |
| *-asyncapi.yaml | AsyncAPI | 2.6 |
openapi, info, paths, components sections presenttitle, version fields populatedsummary, operationId, responsesdescription and content schema$ref references resolve to components/schemasurl and descriptionasyncapi, info, channels sections presenttitle, version fields populatedsubscribe or publish operationmessage with payload schematype, properties, required fieldsprotocol (kafka, amqp, etc.)components/schemassyntax = "proto3" declaration presentpackage declaration presentservice with rpc methodsrpc has request and response message typesjava_package or language-specific options presentCONTRACT LINT REPORT
====================
File: {contract-path}
Format: {format} {version}
Status: VALID | INVALID
Errors ({count}):
- [E001] {description} at {location}
- [E002] {description} at {location}
Warnings ({count}):
- [W001] {description} at {location}
Summary: {count} errors, {count} warnings
| Scenario | Action | |----------|--------| | Contract file not found | Report error with provided path | | Unrecognized file format | Report unsupported format with list of supported formats | | Validation errors found | Report INVALID status with all errors listed; errors block contract approval |
| Skill | Relationship | Context | |-------|-------------|---------| | x-story-implement | called-by | Invoked by Phase 0.5 (Step 0.5.3) for contract validation before approval |
tools
Documentation automation v2: stack-aware generation from documentation.targets.
development
Generates or updates CI/CD pipelines per project stack with actionlint validation.
tools
Generates ADRs from architecture-plan mini-ADRs with sequential numbering and index update.
development
Formats source code; first step of the pre-commit chain (format -> lint -> compile).