adapter-contract-testing — adapter-contract-testing install adapter-contract-testing, checkin-automation, community, adapter-contract-testing install, ide skills, adapter-contract-testing python, adapter-contract-testing simulator validation, adapter-contract-testing API testing, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for API Testing Agents needing to ensure simulator honesty and API consistency through abstract contract testing. adapter-contract-testing is a software testing technique that validates the behavior of adapters and simulators by running the same abstract test class against both.

Features

Runs abstract test classes against both real adapters and simulators
Ensures identical behavior between adapters and simulators
Uses Python abstract base classes (ABC) for contract definition
Supports testing of API changes and simulator drift
Provides a canonical structure for contract testing
Utilizes GitHub-hosted papers for technique documentation

# Core Topics

martinsson martinsson
[0]
[0]
Updated: 3/1/2026

Agent Capability Analysis

The adapter-contract-testing skill by martinsson is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for adapter-contract-testing install, adapter-contract-testing python, adapter-contract-testing simulator validation.

Ideal Agent Persona

Perfect for API Testing Agents needing to ensure simulator honesty and API consistency through abstract contract testing.

Core Value

Empowers agents to run abstract tests against both real adapters and simulators, ensuring identical behavior and detecting API changes or simulator drifts through Python's abstract base classes (ABC) and contract testing libraries.

Capabilities Granted for adapter-contract-testing

Automating contract testing for API adapters
Debugging simulator inconsistencies
Validating API behavior against contracts

! Prerequisites & Limits

  • Requires Python environment
  • Limited to adapters and simulators with compatible abstract test classes
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

adapter-contract-testing

Install adapter-contract-testing, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command...

SKILL.md
Readonly

Adapter Contract Testing

What it is

A technique to keep simulators honest. The same abstract test class is run against both the real adapter and the simulator, proving they behave identically. If the real API changes or a simulator drifts, a test fails.

See: https://github.com/adapter-contract-testing/adapter-contract-testing-papers

The pattern (canonical structure)

python
1# contracts/foo_contract.py — the shared spec 2class FooContract(ABC): 3 @abstractmethod 4 def create_foo(self) -> Foo: ... # only one abstract method 5 6 def test_something(self): 7 foo = self.create_foo() 8 ... 9 10# test_foo.py — one class per implementation, nothing else 11class TestRealFoo(FooContract): 12 def create_foo(self): return RealFoo(...) 13 14class TestSimulatorFoo(FooContract): 15 def create_foo(self): return SimulatorFoo(...)

Rules

  1. One abstract methodcreate_foo() (or create_gateway() etc.). No other setup plumbing.

  2. Two concrete subclasses — real adapter + simulator. One file per port, not spread across multiple files.

  3. No pytest.skip in subclasses — if a test needs pre-existing data, create_foo() must return a pre-seeded instance. A skip means the subclass doesn't honour the contract.

  4. No simulator-only test classes — simulator-specific behaviour (internal state, edge cases unique to the fake) goes in standalone test_ functions in the same file, not in a third contract subclass.

  5. The contract IS the port spec — every behaviour the pipeline relies on must have a test here. If you can't write a contract test for it, question whether it belongs on the port at all.

Example from this codebase

python
1# tests/contracts/smoobu_gateway_contract.py 2class SmoobuGatewayContract(ABC): 3 @abstractmethod 4 def create_gateway(self) -> SmoobuGateway: ... 5 6 def test_get_threads_non_empty(self): 7 page = self.create_gateway().get_threads(1) 8 assert len(page.threads) > 0 9 10# tests/test_smoobu_contract.py 11class TestSimulatorSmoobuContract(SmoobuGatewayContract): 12 def create_gateway(self): 13 gw = SimulatorSmoobuGateway() 14 # Pre-seed so ALL contract tests pass without skips 15 gw.inject_active_reservation(...) 16 gw.inject_guest_message(...) 17 return gw 18 19class TestSmoobuClientContract(SmoobuGatewayContract): 20 @pytest.mark.skipif(not API_KEY, reason="no credentials") 21 def create_gateway(self): return SmoobuClient(API_KEY)

What goes where

LocationContent
tests/contracts/<port>_contract.pyAbstract contract class, all tests
tests/test_<port>.pyTwo concrete subclasses (real + simulator); standalone simulator-specific tests as plain functions

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is adapter-contract-testing?

Perfect for API Testing Agents needing to ensure simulator honesty and API consistency through abstract contract testing. adapter-contract-testing is a software testing technique that validates the behavior of adapters and simulators by running the same abstract test class against both.

How do I install adapter-contract-testing?

Run the command: npx killer-skills add martinsson/checkin-automation/adapter-contract-testing. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for adapter-contract-testing?

Key use cases include: Automating contract testing for API adapters, Debugging simulator inconsistencies, Validating API behavior against contracts.

Which IDEs are compatible with adapter-contract-testing?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for adapter-contract-testing?

Requires Python environment. Limited to adapters and simulators with compatible abstract test classes.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add martinsson/checkin-automation/adapter-contract-testing. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use adapter-contract-testing immediately in the current project.

Related Skills

Looking for an alternative to adapter-contract-testing or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI