auto-test-guard

Enforce behavior-contract-focused assertions in software test suites.

34|12|Updated Aug 1, 2021
One-click install
npx skills add https://github.com/pear-studio/nonebot-dicepp --skill auto-test-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auto-test-guard
Source: https://github.com/pear-studio/nonebot-dicepp/tree/main/docs/agent/skills/auto-test-guard
Command: npx skills add https://github.com/pear-studio/nonebot-dicepp --skill auto-test-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It reduces test quality drift by preventing weak assertions, redundant cases, excessive mocking, and low-value coverage that increase maintenance cost and hide real regressions.

Core Features & Use Cases

  • Behavior-focused test design: Write tests that express contracts and user-visible outcomes instead of implementation steps.
  • High-signal regression coverage: Add minimal regression tests when fixing bugs to directly protect the previously broken behavior.
  • Stability-aware isolation: Avoid unstable dependencies (random, time, network, filesystem, database, LLM) unless explicitly handled with isolation markers or clear scope.

Quick Start

When adding or modifying a test, follow the guard’s checklist to ensure the test protects a specific behavior contract with meaningful assertions and appropriate isolation.

Frequently Asked Questions about auto-test-guard

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

FAQPage Schema
How do I write behavior-focused assertions instead of testing implementation steps?

Behavior-focused assertions validate user-visible contracts and outcomes rather than internal implementation steps. They enforce high-signal test design by ensuring each test protects a specific behavior contract, reducing maintenance cost and preventing low-value coverage.

What is the best way to add regression tests when fixing bugs?

The best way to add regression tests is by writing minimal cases that directly protect the previously broken behavior. High-signal regression coverage ensures the test specifically guards the fixed contract without introducing redundant or low-value cases.

How do I isolate nondeterministic dependencies like random, time, and network in unit tests?

Isolate nondeterministic dependencies like random, time, network, filesystem, database, and LLM using isolation markers or clear scope boundaries. Stability-aware isolation prevents unstable dependencies from causing test quality drift and hiding real regressions.

Why does excessive mocking increase test maintenance cost?

Excessive mocking increases test maintenance cost because it couples tests to internal implementation rather than behavior contracts. Discouraging low-signal coverage and redundant mocks keeps suites focused on meaningful assertions that catch real regressions.

Can I use this test quality guardrail during TDD iterations and refactoring?

Yes, the test quality guardrail applies directly to TDD iterations and refactoring workflows. It enforces constraints on assertion meaning, fixture usage, and dependency isolation to prevent test quality drift during unit, integration, and regression test development.

When should I avoid snapshot testing in my test suite?

Avoid snapshot testing when it produces low-signal coverage that hides real regressions. The guardrail discourages excessive snapshots and redundant cases, requiring meaningful behavior-contract-focused assertions that validate specific outcomes instead of brittle implementation snapshots.