api-pact-generate

Generate Pact consumer/provider contract tests from pinky-promise specs into Go code and JSON.

10|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/superluminar-io/pinky-promise --skill api-pact-generate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-pact-generate
Source: https://github.com/superluminar-io/pinky-promise/tree/main/skills/api-pact-generate
Command: npx skills add https://github.com/superluminar-io/pinky-promise --skill api-pact-generate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates contract tests automatically from pinky-promise specs to ensure consumer and provider services remain in sync.

Core Features & Use Cases

  • Generate Pact consumer tests and provider verification setup from a pinky-promise spec.
  • Read specs from the registry or local draft files and do not read service implementations.
  • Produce Go test code using pact-go and output pacts to a designated directory or broker.

Quick Start

Run the generate command in your project directory to produce Pact consumer tests and provider verifications from the pinky-promise spec.

Frequently Asked Questions about api-pact-generate

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

FAQPage Schema
How do I generate Pact consumer-driven contract tests from pinky-promise specs?

To generate Pact consumer-driven contract tests from pinky-promise specs, run the generate command in your project directory. The tool reads specs from the registry or local draft files and outputs generated interactions as JSON alongside Pact Go test code without reading service implementations.

Can I set up provider verification for Pact contract tests using pinky-promise specs?

Yes, you can set up provider verification for Pact contract tests using pinky-promise specs. The generation process supports both Consumer and Provider roles, producing the necessary Go test code using pact-go to verify that provider services remain in sync with consumer expectations.

Does this Pact test generation tool read my actual service implementations?

No, this Pact test generation tool does not read service implementations. It strictly reads API specifications from the pinky-promise registry or local draft files to automatically generate contract tests, ensuring consumer and provider services remain in sync without coupling to implementation code.

What is the best way to output generated Pact interactions to a broker in a Go project?

The best way to output generated Pact interactions to a broker in a Go project is by using the tool's optional publish feature. It outputs generated interactions as JSON, writes Pact Go test code to a designated directory, and can optionally publish verifications directly to a Pact broker.

Do I need pinky-promise specs to generate consumer-driven contract tests with pact-go?

Yes, you need pinky-promise specs to generate consumer-driven contract tests with pact-go using this tool. The generation process relies on reading these specs from the registry or local draft files to produce the Go test code and JSON interactions required for contract testing.

Why generate Pact contract tests automatically from specs instead of writing them manually?

Generating Pact contract tests automatically from specs ensures consumer and provider services remain in sync without manual coding errors. It reads pinky-promise specs to output JSON interactions and pact-go test code, streamlining the creation of consumer-driven contract tests.