test-guard

Review generated test code against behavioral testing and boundary-mocking rules.

Updated Jun 9, 2026
One-click install
npx skills add https://github.com/Asharf30/Brainwave --skill test-guard-asharf30
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-guard
Source: https://github.com/Asharf30/Brainwave/tree/main/.agents/skills/test-guard
Command: npx skills add https://github.com/Asharf30/Brainwave --skill test-guard-asharf30

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents the accumulation of brittle, redundant, or low-value tests generated by AI, ensuring that your test suite remains a reliable asset rather than a maintenance burden.

Core Features & Use Cases

  • Pragmatic Quality Gate: Evaluates test code against nine universal rules to ensure tests verify behavior rather than implementation details.
  • Language-Specific Guidance: Provides deep-dive references for Python (pytest), PHP (PHPUnit/Pest), and JavaScript (Jest/Vitest) to ensure idiomatic and effective testing patterns.
  • Use Case: When an agent generates a suite of mock-heavy unit tests, use this Skill to identify violations of boundary-testing principles and refactor them into meaningful integration or behavior-driven tests.

Quick Start

Use the test-guard skill to review the newly generated test file in the current diff for adherence to testing best practices.

Frequently Asked Questions about test-guard

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

FAQPage Schema
How do I enforce quality standards on AI-generated unit tests to prevent maintenance bloat?

You can enforce quality standards on AI-generated unit tests by validating them against behavioral testing principles, ensuring they verify behavior rather than implementation details and adhere to boundary-mocking rules.

Does test quality validation work with pytest, PHPUnit, and Jest?

Yes, test quality validation works across Python with pytest, PHP with PHPUnit and Pest, and JavaScript with Jest and Vitest, providing language-specific guidance to ensure idiomatic and effective testing patterns.

What are the best practices for refactoring mock-heavy unit tests into behavior-driven tests?

The best practice for refactoring mock-heavy unit tests is applying universal quality rules to identify boundary-testing violations, ensuring tests respect system boundaries for network, database, and LLM interactions.

Why does my AI test suite include brittle and redundant tests?

AI test suites often include brittle and redundant tests because they lack pragmatic quality gates, which are needed to evaluate code against universal rules and prevent the accumulation of low-value tests.

When do I need to validate generated test code against project-specific testing documentation?

You need to validate generated test code against project-specific testing documentation whenever your agent generates new tests, ensuring meaningful coverage and adherence to established system boundaries.

Can I review newly generated test files in the current diff for adherence to testing best practices?

Yes, you can review newly generated test files in the current diff by evaluating them against nine universal rules, confirming they verify behavior and follow established system boundaries.