no-mocking-validation-gates

Block mock and test file creation during write and edit operations.

2|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/krzemienski/validationforge --skill no-mocking-validation-gates
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: no-mocking-validation-gates
Source: https://github.com/krzemienski/validationforge/tree/main/skill-audit-workspace/no-mocking-validation-gates/skill-snapshot
Command: npx skills add https://github.com/krzemienski/validationforge --skill no-mocking-validation-gates

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents the creation of mock files and mock/stub code patterns that produce false-positive test results and hidden production bugs, ensuring validation is performed against real systems and real user interfaces.

Core Features & Use Cases

  • Pre-tool-use Blocking: Rejects write/edit operations that would add test files, mock directories, or known mocking API usage.
  • Mock Pattern Detection: Scans for language-specific mock APIs and test patterns to prevent accidental introduction of stubs and spies.
  • Developer Workflow Correction: Guides developers through diagnose, fix, and verify steps to make real dependencies available and capture evidence.
  • Use Case: Prevents a developer from committing a Jest mock that would hide an API contract regression and redirects them to run the real backend, seed data, and capture evidence.

Quick Start

Run the pre-tool-use hook to block any new mock or test artifacts and follow the three-step correction: diagnose the missing dependency, fix it so it runs, and verify using the real system.

Frequently Asked Questions about no-mocking-validation-gates

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

FAQPage Schema
How do I block mock files and prevent false validation in test code?

To block mock files and prevent false validation, apply a pre-tool-use hook to intercept write and edit operations, rejecting artifacts like *.test.ts files and mock directories before they enter the repository.

Why does mocking code patterns cause hidden production bugs?

Mocking code patterns cause hidden production bugs by generating false-positive test results that mask real API contract regressions, bypassing actual dependencies instead of validating real system behavior.

Can I use pre-tool-use hooks to scan for language-specific mock APIs?

Yes, you can use pre-tool-use hooks to scan and block language-specific mock APIs during developer workflows, detecting stubs and spies to prevent accidental introduction of mock code patterns.

What is the best way to enforce real-system validation instead of stubs?

The best way to enforce real-system validation is implementing a non-destructive policy that blocks stubs and redirects developers through a three-step workflow: diagnose missing dependencies, fix them, and verify using the real system.

What happens when a developer tries to commit a Jest mock that hides an API regression?

When a developer attempts to commit a Jest mock, the pre-tool-use hook rejects the write operation and redirects them to run the real backend, seed data, and capture evidence to validate the actual API contract.