mock-contract-advisor

Generate mock contract checklists and rules from test_suites.md to prevent over-mocking and recursive mocks.

5|1|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/tikazyq/agentic-spec-forge --skill mock-contract-advisor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mock-contract-advisor
Source: https://github.com/tikazyq/agentic-spec-forge/tree/main/AGENTIC_SPEC_FORGE/spec_stage_skill/implementation_planning/mock-contract-advisor
Command: npx skills add https://github.com/tikazyq/agentic-spec-forge --skill mock-contract-advisor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents common anti-patterns in mock and stub design, ensuring your tests are reliable and accurately reflect system interactions without over-mocking or creating recursive dependencies.

Core Features & Use Cases

  • Mock Strategy Generation: Creates a checklist and rules based on test_suites.md to guide mock design.
  • Contract Definition: Helps define clear input/output contracts for mocked services.
  • Anti-Pattern Detection: Identifies and advises against recursive mocking, global mocks, and excessive mocking.
  • Use Case: When defining the mock strategy for a payment gateway integration, this Skill ensures that the mock contract clearly specifies request parameters, expected responses, and error conditions, while also verifying that the mock itself is not overly complex or dependent on other mocks.

Quick Start

Generate a mock contract design report for the payment service based on the provided test_suites.md and design documents.

Frequently Asked Questions about mock-contract-advisor

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

FAQPage Schema
How do I prevent over-mocking and recursive mocks in software testing?

To prevent over-mocking and recursive mocks, you should generate mock contract checklists and rules that explicitly define input/output contracts for mocked services. This ensures tests accurately reflect system interactions without creating recursive dependencies or excessive mocking anti-patterns.

What is a mock contract and how does it improve test design?

A mock contract defines clear input/output parameters, expected responses, and error conditions for mocked services like external APIs or databases. It improves test design by ensuring mocks are not overly complex and reliably reflect actual system interactions during test execution.

How do I define mock strategies for external APIs and databases?

You can define mock strategies for external APIs and databases by generating a mock contract design report based on your test suites and design documents. This process assesses complexity and identifies risks specifically for third-party service integrations.

Can I use this mock contract advisor for L2 and L3 project levels?

Yes, this mock contract advisor explicitly supports L2 and L3 project levels. It generates mock contracts, assesses integration complexity, and identifies risks for external APIs, databases, and third-party services tailored to these specific project tiers.

When should I create mock contracts for payment gateway integration?

You should create mock contracts for payment gateway integration when defining your mock strategy. This ensures the contract clearly specifies request parameters, expected responses, and error conditions while verifying the mock itself is not overly complex or dependent on other mocks.

What are the limitations of using stub contracts for third-party services?

Stub contracts for third-party services can lead to anti-patterns like global mocks and excessive mocking if not properly constrained. They may also fail to reflect system interactions accurately if the mock itself becomes overly complex or dependent on other recursive mocks.