write-contract-tests

Generate strict contract tests from constellation-map.md and code-generation-plan files.

1|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/constellize/marketplace --skill write-contract-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-contract-tests
Source: https://github.com/constellize/marketplace/tree/main/plugins/constellize-quality/skills/write-contract-tests
Command: npx skills add https://github.com/constellize/marketplace --skill write-contract-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Contracts between components and external integrations change over time and breaking changes can reach production. This Skill provides deterministic contract tests to enforce exact API contracts from the constellation map and to detect regressions early.

Core Features & Use Cases

  • Generate strict contract tests that validate request/response schemas against constellation contracts.
  • Implement breaking-change detection via version comparison and enforce appropriate version bumps.
  • Verify backward compatibility with legacy clients and handle deprecated fields gracefully.

Quick Start

Run the contract-test generator against a component to produce strict tests ready for CI.

Frequently Asked Questions about write-contract-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect API breaking changes automatically in CI pipelines?

Detect API breaking changes by generating strict contract tests that compare version differences against the constellation map. This enforces backward compatibility by validating request and response schemas, catching regressions early in CI pipelines.

What is API contract testing for backward compatibility?

API contract testing for backward compatibility is the process of validating component interfaces against defined schemas to ensure legacy clients continue working. It verifies deprecated fields are handled gracefully across versions without breaking existing integrations.

How do I enforce schema validation for API contracts?

Enforce schema validation by generating deterministic tests derived from the constellation map and code-generation plans. These strict tests validate exact request and response schemas, ensuring component interfaces match the defined API contracts across versions.

Does contract testing work with code-generation plans for API versioning?

Yes, contract testing works by reading code-generation plan files to derive tests that enforce appropriate version bumps. It validates component interfaces across versions, applying schema validation and breaking-change detection directly against the constellation map.

What is the best way to handle deprecated fields in API contracts without breaking changes?

The best way to handle deprecated fields is by implementing backward-compatibility checks that verify legacy client interactions. Contract tests validate that deprecated fields are handled gracefully, enforcing appropriate version bumps when breaking changes are detected.