generate-contract-tests

Generate tier-A contract tests asserting HTTP request/response shapes from YAML behavior-specs.

3|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/kapilvirenahuja/garura --skill generate-contract-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-contract-tests
Source: https://github.com/kapilvirenahuja/garura/tree/main/core/components/skills/generate-contract-tests
Command: npx skills add https://github.com/kapilvirenahuja/garura --skill generate-contract-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It eliminates brittle, implementation-coupled test suites by generating tier-A contract tests that validate API wire contracts and outbound integration request/response shapes.

Core Features & Use Cases

  • Portable contract coverage: Produces HTTP request/response assertions per exposed endpoint and per outbound integration boundary to survive backend stack changes.
  • Deterministic, spec-driven generation: Uses behavior-spec inputs to derive method/path schemas, scenario expectations, edge-case triggers, and error envelope shapes.
  • Harness-aligned output: Detects the target test framework from the test harness evidence and emits idiomatic tests for it, including harness discovery extensions when needed.
  • Baseline-green gate: Ensures generated tests pass against the current codebase before capturing proposals to prevent incorrect extraction.
  • Cited traceability: Writes a companion cited-specs YAML mapping generated tests back to scenario IDs for downstream aggregation.

Quick Start

Ask the test-engineer agent to run generate-contract-tests for a feature whose behavior-spec contains exposed inbound endpoints or outbound integration behaviors, using the provided test harness and evidence paths.

Frequently Asked Questions about generate-contract-tests

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

FAQPage Schema
How do I generate contract tests for API boundary request and response shapes?

To generate contract tests, you provide a YAML-parsed behavior-spec containing integration behaviors and a test harness. This skill outputs tier-A HTTP boundary assertions for exposed endpoints and outbound integration boundaries.

What are tier-A contract tests and when do I need them for API testing?

Tier-A contract tests are portable HTTP assertions validating API wire contracts and outbound integration request/response shapes. You need them to eliminate brittle, implementation-coupled test suites that break during backend stack migrations.

How do I ensure generated contract tests pass against my current codebase baseline?

Generated contract tests enforce a baseline-green gate that ensures all assertions pass against the current codebase before capturing proposals. This prevents incorrect extraction and validates expected HTTP request and response schemas.

Can I use my existing test harness and framework to generate API contract tests?

Yes, the skill detects the target test framework from the provided test harness evidence and emits idiomatic tests for it. It generates one test file per endpoint and includes harness discovery extensions when needed.

How do contract tests trace back to behavior specification scenarios?

Contract tests trace back to behavior specification scenarios through a companion cited-specs YAML file. This mapping links generated tests directly to scenario IDs and edge cases for downstream aggregation and traceability.

What limitations exist when generating contract tests for integration boundaries?

Contract test generation requires a YAML-parsed behavior-spec enumerating integration behaviors, scenarios, and error envelope aspects. Without suitable test harness evidence to detect the framework, the skill cannot emit idiomatic tests or framework-tagged results.