interface-contract-verifier

Compare interface and class contracts across software versions to detect violations.

142|14|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill interface-contract-verifier
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: interface-contract-verifier
Source: https://github.com/ArabelaTso/Skills-4-SE/tree/main/skills/interface-contract-verifier
Command: npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill interface-contract-verifier

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill prevents regressions by verifying that interface and class contracts (preconditions, postconditions, invariants) remain intact across different versions of your software.

Core Features & Use Cases

  • Contract Verification: Compares contracts between old and new code versions.
  • Violation Detection: Identifies weakened preconditions, strengthened postconditions, and broken invariants.
  • Use Case: After refactoring a critical API, use this Skill to ensure that the new version still adheres to the original behavioral guarantees, preventing unexpected client-side errors.

Quick Start

Verify that contracts in the new version of the program are preserved compared to the old version.

Frequently Asked Questions about interface-contract-verifier

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

FAQPage Schema
How do I check if API compatibility is preserved after refactoring code?

To check API compatibility after refactoring, you verify that interface contracts—preconditions, postconditions, and invariants—remain intact between the old and new software versions. This process detects strengthened preconditions or weakened postconditions to prevent behavioral regressions.

What is design by contract and how does it prevent software regressions?

Design by contract prevents software regressions by defining strict behavioral guarantees through preconditions, postconditions, and invariants. Verifying these contracts across software versions ensures that new code adheres to original behavioral expectations and maintains program correctness.

How do I detect Liskov substitution principle violations in my codebase?

You detect Liskov substitution principle violations by analyzing extracted contract definitions to identify strengthened preconditions, weakened postconditions, or broken invariants between parent and child class versions. This analysis confirms behavioral compatibility across your software.

Can I use contract verification to ensure behavioral compatibility between two program versions?

Yes, you can use contract verification to ensure behavioral compatibility between two program versions. It compares extracted contract definitions to identify violations like broken invariants, confirming that the new version preserves the original program correctness guarantees.

What are the limitations of automated contract verification for code quality?

Automated contract verification for code quality is limited by its reliance on explicitly extracted contract definitions. It detects violations like strengthened preconditions and broken invariants, but cannot verify implicit or undocumented behavioral guarantees not formally defined in the code.

When should I run interface contract checks in my software development workflow?

You should run interface contract checks after refactoring a critical API to ensure the new version still adheres to original behavioral guarantees. This prevents unexpected client-side errors by confirming preconditions, postconditions, and invariants are preserved across versions.