Agent skill

Interface Contract Verifier

by ArabelaTso in ArabelaTso/Skills-4-SE

Verify that interface and class contracts (preconditions, postconditions, invariants) are preserved across program versions.

Apache-2.0Auto-check passedDevelopment

Install Interface Contract Verifier

skills CLI
$ npx skills add ArabelaTso/Skills-4-SE --skill interface-contract-verifier -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ArabelaTso/Skills-4-SE interface-contract-verifier --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/interface-contract-verifier .claude/skills/interface-contract-verifier && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
interface-contract-verifier
GitHub stars
253
Token cost
~676 tokens
SKILL.md length
167 words
Files
4 (incl. scripts, references)
Skills in repo
151
Repo updated
First seen
Licence
Apache-2.0

At a glance

Verify that interface and class contracts (preconditions, postconditions, invariants) are preserved across program versions.

  • Works in 3 steps: Extract Contracts → Verify Contracts → Review Violations
  • Validating refactorings
  • SKILL.md covers Overview, Core Workflow, Contract Types and Verification Rules, plus 3 more sections
  • Runs Python scripts from its folder; calls python

What it does

Interface Contract Verifier is an agent skill from ArabelaTso/Skills-4-SE. Verify that interface and class contracts (preconditions, postconditions, invariants) are preserved across program versions. Use when validating refactorings, checking API compatibility, verifying design-by-contract implementations, or ensuring behavioral contracts remain intact after code changes. Automatically detects contract violations, identifies affected methods and classes, and provides actionable guidance for resolving violations while maintaining program correctness.

Its SKILL.md is about 680 tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts and reference files (for example `references/design_by_contract.md`, `scripts/contract_extractor.py` and `scripts/contract_verifier.py`).

It sits in Development, covering Refactoring. The repository describes itself as: A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows. The licence is Apache-2.0.

When your agent uses it

  • Validating refactorings
  • Checking API compatibility
  • Verifying design-by-contract implementations
  • Ensuring behavioral contracts remain intact after code changes

Example prompts

  • “/interface-contract-verifier”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Extract Contracts
  2. Verify Contracts
  3. Review Violations

What it can do on your machine

Read from SKILL.md and the folder at commit 4f38503. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Interface Contract Verifier loads about 676 tokens when it runs, and up to ~1.2k if it reads all its reference files. Until then it costs about 127 tokens; SKILL.md has 167 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~127
When it runs · the whole SKILL.md, loaded when a task matches
~676
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ArabelaTso/Skills-4-SE at commit 4f38503, republished under its Apache-2.0 licence (© ArabelaTso). 167 words, ~676 tokens.

Download SKILL.mdSave it as .claude/skills/interface-contract-verifier/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
interface-contract-verifier
description
Verify that interface and class contracts (preconditions, postconditions, invariants) are preserved across program versions. Use when validating refactorings, checking API compatibility, verifying design-by-contract implementations, or ensuring behavioral contracts remain intact after code changes. Automatically detects contract violations, identifies affected methods and classes, and provides actionable guidance for resolving violations while maintaining program correctness.

Interface Contract Verifier

Overview

Verify that formal or structured contracts (preconditions, postconditions, invariants) defined in interfaces and classes are preserved when updating to a new program version.

Core Workflow

1. Extract Contracts

Extract contracts from both versions:

bash
python scripts/contract_extractor.py --program old_version --output old_contracts.json
python scripts/contract_extractor.py --program new_version --output new_contracts.json
2. Verify Contracts

Compare and verify contract preservation:

bash
python scripts/contract_verifier.py --old old_contracts.json --new new_contracts.json --output report.json
3. Review Violations

Examine violations: weakened preconditions, strengthened postconditions, broken invariants.

Contract Types

Preconditions

Requirements before method execution:

python
def withdraw(amount):
    """Precondition: amount > 0 and amount <= balance"""
Postconditions

Guarantees after method execution:

python
def deposit(amount):
    """Postcondition: balance == old(balance) + amount"""
Invariants

Properties always true for a class:

python
class BankAccount:
    """Invariant: balance >= 0"""

Verification Rules

Liskov Substitution Principle:

  • Preconditions can be weakened (accept more)
  • Postconditions can be strengthened (guarantee more)
  • Invariants must be maintained

Violation Types

Strengthened Precondition (Error)

New version rejects previously valid inputs.

Weakened Postcondition (Error)

New version guarantees less.

Broken Invariant (Critical)

Class invariant no longer holds.

Resolution Guidance

Fix Strengthened Precondition

Relax precondition or update callers.

Fix Weakened Postcondition

Strengthen implementation to meet original guarantee.

Fix Broken Invariant

Add checks to maintain invariant in all methods.

Resources

  • references/design_by_contract.md: Design by Contract principles
  • scripts/contract_extractor.py: Extract contracts from code
  • scripts/contract_verifier.py: Verify contract preservation

© ArabelaTso, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in skills/interface-contract-verifier of ArabelaTso/Skills-4-SE.

  • SKILL.md
  • references/design_by_contract.md
  • scripts/contract_extractor.py
  • scripts/contract_verifier.py

Open the folder on GitHubat commit 4f38503

Compare with similar skills

Interface Contract Verifier next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Interface Contract Verifier compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Interface Contract Verifier this skillArabelaTso/Skills-4-SE253—~676Automated safety check: PassApache-2.0
Guidelinesakash-network/node1.1k22 repos~577Automated safety check: PassMIT
Component Refactoringlangflow-ai/langflow156k—~3.5kAutomated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman41k—~2.6kAutomated safety check: PassGPL-3.0
ast-grep Structural Searchcode-yeongyu/oh-my-openagent70k—~3.3kAutomated safety check: PassMIT
Systematic Code Refactoringluongnv89/claude-howto42k—~3kAutomated safety check: PassMIT

Similar skills

  • Guidelines

    akash-network/node

    Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.

    1.1k GitHub starsUsed in 22 repos~577 tokens
    DevelopmentAuto-check passed
  • Component Refactoring

    langflow-ai/langflow

    Refactor high-complexity React components in Langflow frontend.

    156k GitHub stars~3.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    41k GitHub stars~2.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • ast-grep Structural Search

    code-yeongyu/oh-my-openagent

    Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.

    70k GitHub stars~3.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Codex

    skills-directory/skill-codex

    A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

    1.5k GitHub starsUsed in 3 repos~1.8k tokens
    DevelopmentAuto-check passed

More from ArabelaTso/Skills-4-SE

All 151 skills in this repo
  • Framework Migration Assistant

    ArabelaTso/Skills-4-SE

    Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).

    253 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Metamorphic Test Generator

    ArabelaTso/Skills-4-SE

    Generate test cases using metamorphic testing by applying transformations based on metamorphic properties.

    253 GitHub stars~798 tokensUpdated 1 mo ago
    Auto-check passed
  • Reproduction Trace Instrumenter

    ArabelaTso/Skills-4-SE

    Instruments programs to capture execution traces specifically for reproducing reported bugs, enabling consistent replay and diagnosis of failures.

    253 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Spring Mvc To Boot Migrator

    ArabelaTso/Skills-4-SE

    Automatically migrate Spring MVC applications to Spring Boot.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • State Snapshot Instrumenter

    ArabelaTso/Skills-4-SE

    Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Interface Contract Verifier

What does Interface Contract Verifier do?

Verify that interface and class contracts (preconditions, postconditions, invariants) are preserved across program versions. Interface Contract Verifier is an agent skill from ArabelaTso/Skills-4-SE. Verify that interface and class contracts (preconditions, postconditions, invariants) are preserved across program versions.

When should I use Interface Contract Verifier?

Interface Contract Verifier fits situations like: validating refactorings; checking API compatibility; verifying design-by-contract implementations; ensuring behavioral contracts remain intact after code changes.

How do I install Interface Contract Verifier in Claude Code?

Run `npx skills add ArabelaTso/Skills-4-SE --skill interface-contract-verifier -a claude-code`. Or copy the skill folder (skills/interface-contract-verifier in ArabelaTso/Skills-4-SE) into .claude/skills/interface-contract-verifier in your project. Claude Code loads it when a task matches its description.

How do I install Interface Contract Verifier in Codex?

Run `npx skills add ArabelaTso/Skills-4-SE --skill interface-contract-verifier -a codex`. Or copy the skill folder (skills/interface-contract-verifier in ArabelaTso/Skills-4-SE) into .agents/skills/interface-contract-verifier in your project. Codex loads it when a task matches its description.

Can I use Interface Contract Verifier in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ArabelaTso/Skills-4-SE --skill interface-contract-verifier -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/interface-contract-verifier, .gemini/skills/interface-contract-verifier, .github/skills/interface-contract-verifier and .opencode/skills/interface-contract-verifier in your project.

What does Interface Contract Verifier need to run?

Going by SKILL.md and its folder, Interface Contract Verifier needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Interface Contract Verifier access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Interface Contract Verifier safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Interface Contract Verifier use?

Interface Contract Verifier is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Interface Contract Verifier use?

About 676 tokens (SKILL.md is roughly 2.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 544 tokens, read only when the agent opens those files.

What are the alternatives to Interface Contract Verifier?

Skills that share tags, products or a category with Interface Contract Verifier: Guidelines (akash-network/node, 1.1k stars), Component Refactoring (langflow-ai/langflow, 156k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 41k stars) and ast-grep Structural Search (code-yeongyu/oh-my-openagent, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Interface Contract Verifier?

ArabelaTso (a GitHub user) maintains it in ArabelaTso/Skills-4-SE, which has 253 GitHub stars. The repository holds 151 skills in this directory. The repository was last updated on August 21, 2026.

Source: ArabelaTso/Skills-4-SE on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.