pact-invariants

Define Pact schema invariants and behavioral properties for smart-contract verification.

1|1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/Pact-Community-Organization/github-marketplace --skill pact-invariants
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pact-invariants
Source: https://github.com/Pact-Community-Organization/github-marketplace/tree/main/skills/pact-invariants
Command: npx skills add https://github.com/Pact-Community-Organization/github-marketplace --skill pact-invariants

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pact invariants help teams decide which invariants and properties a module needs, guiding formal verification planning and ensuring contract correctness.

Core Features & Use Cases

  • Define data shape invariants with (invariant ...) tied to schemas.
  • Specify behavioral properties with (property ...) on defun and @model to enforce correctness.
  • Provide a reusable predicate (defproperty ...) for modular checks and ADR-style documentation.

Quick Start

Define a Pact module with a schema and attach an invariant and a property to enforce correctness.

Frequently Asked Questions about pact-invariants

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

FAQPage Schema
How do I verify Pact invariants for smart contracts?

To verify Pact invariants, you define data shape invariants tied to schemas and specify behavioral properties on defun using @model to enforce smart contract correctness.

What is the best way to attach properties to defun in a Pact module?

The best way to attach properties to defun in a Pact module is using the @model metadata to specify behavioral properties that enforce function correctness during verification.

How does property-based testing work with Pact schemas?

Property-based testing with Pact schemas works by attaching invariant checks directly to the schema definition, ensuring data shape correctness before function execution.

Can I create reusable predicates for modular checks across Pact modules?

Yes, you can create reusable predicates for modular checks across Pact modules by using defproperty, which also supports ADR-style documentation for formal verification planning.

When do I need formal verification planning for Pact smart contracts?

You need formal verification planning for Pact smart contracts when you must decide which data invariants and function behavior properties are required to guarantee contract correctness.

Does Pact property-based testing require external dependencies?

No, Pact property-based testing does not require external dependencies, utilizing built-in schema invariants, defun properties, and defproperty predicates for modular verification.