test-guard

Determine required tests for changed files and validate coverage.

1|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/jongensutrecht/demo-ai-stack --skill test-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-guard
Source: https://github.com/jongensutrecht/demo-ai-stack/tree/main/.claude/skills/test-guard
Command: npx skills add https://github.com/jongensutrecht/demo-ai-stack --skill test-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill prevents code from being marked complete before the necessary tests are identified, checked, and, when needed, scaffolded.

Core Features & Use Cases

  • Test selection: Classifies changes into unit, integration, playwright, contract, and NEVER tests based on file paths and invariants.
  • Coverage validation: Checks config-driven requirements so you can catch missing tests during PR review or before a commit.
  • Practical workflow: Use it when touching UI, API, database, security, or business logic files to get a clear testing plan and blocking report.

Quick Start

Ask the skill to inspect the changed files and tell you which tests are required, which invariants apply, and what test gaps still need to be fixed.

Frequently Asked Questions about test-guard

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

FAQPage Schema
How do I check for missing test coverage before committing code changes?

Test coverage validation works by classifying code changes into unit, integration, playwright, contract, and NEVER test categories based on file paths, then checking config-driven requirements to identify missing tests.

What types of tests are required when modifying UI, API, or database files?

Required tests are determined by analyzing file paths and invariants, classifying changes into unit, integration, playwright, contract, or NEVER test categories to produce a clear testing plan.

How do I enforce quality gates during code review to ensure tests exist?

Quality gates are enforced by validating config-driven coverage requirements against changed files, producing blocking missing-test reports that prevent code from being marked complete until necessary tests are verified.

Can I automatically generate test stubs for files lacking required coverage?

Yes, optional test stubs can be generated alongside missing-test reports, scaffolding the necessary test structures for identified coverage gaps.

What are test invariants and how do they affect test selection?

Test invariants are rules applied during file-pattern analysis to classify code changes, determining whether unit, integration, playwright, or contract tests are required or excluded.