Tooluck logoTooluck
SKILL.md

test-guard

Agent skill fromamElnagdy/guard-skills

Review generated or changed test code against universal testing rules before it ships. Best used reactively after an agent writes, edits, generates, or refactors tests, before presenting, committing, or merging them. Use for pytest (test_*.py, *_test.py), PHPUnit/Pest (*Test.php), Jest/Vitest (*.test.ts, *.spec.js), Go (*_test.go), files under tests/, __tests__/, or spec/, and review requests like 'write tests for X', 'add tests', 'test this', 'review these tests', or PR diffs containing tests. Can also guide test writing when explicitly invoked before the work. This skill is the quality gate that prevents AI-generated test bloat. DO NOT USE for production or implementation code review (use clean-code-guard), CI or test-runner configuration, running or debugging tests, or general architecture discussion.

How to install test-guard

install test-guard
# install the guard-skills pack with the skills CLI
npx skills add amElnagdy/guard-skills

# or add only this skill to Claude Code: copy the folder

skills/test-guard/

# into

~/.claude/skills/test-guard/ (all projects)

.claude/skills/test-guard/ (one project)

skills/test-guard/SKILL.md

MITFull file
1# Test Guard
2
3You are reviewing generated or changed test code before it ships. Enforce the rules below after the first test-writing pass and before the tests are presented, committed, or merged. Be a sharp reviewer, not a pedantic one: flag what wastes maintenance effort or hides real bugs, ignore cosmetic preferences.
4
5These rules exist because coding agents over-generate tests. The common failure modes: mock-heavy unit tests that assert implementation details, near-duplicate test bodies that differ by one value, and tests that re-verify the framework instead of the project's logic. Each looks productive in a diff and costs maintenance forever.
6
7## When this skill activates
8
9- A coding agent has just written new test functions or test files, in any language
10- You are editing existing tests
11- You are reviewing a diff that contains test changes
12- The user asks you to write, add, or review tests
13
14## Adapt to the project first
15
16These rules are universal, but their application is not. Before reviewing:
17
181. Check the project's own agent instructions (CLAUDE.md, AGENTS.md) and testing docs. Project-specific testing rules win over this skill when they conflict.
192. Identify the test stack, then read the matching reference for concrete patterns:
20 - Python / pytest → [references/pytest.md](references/pytest.md)
21 - PHP / PHPUnit / Pest / WordPress → [references/phpunit.md](references/phpunit.md)
22…

Excerpt shown under the repository's MIT license.

More skills in guard-skills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates