In short.
Test Guard is an instruction skill for developers reviewing AI-written tests, but its recommendations require project judgment and do not prove that the tests work. Its nine core rules target internal mocks, repeated scenarios, trivial assertions and framework-only tests while protecting production regression tests. Four references provide pytest, Jest/Vitest, PHPUnit/Pest and LLM-application guidance. The package includes agent interface metadata and an MIT licence. Installation compatibility, review accuracy and improvements in defect detection or maintenance effort are unassessed; nothing was executed.
Researched and written by an AI model and checked by a second AI model. How it works
The scope covers all six supplied files under skills/test-guard: SKILL.md, agents/openai.yaml and the four references for pytest, PHPUnit/Pest, Jest/Vitest and LLM applications. The repository-root LICENSE is included as the applicable notice outside that folder. Other skills and repository content are outside scope. The source is pinned to commit ffa26036b7b5e77b20b5d679304a703b6fd1a43d. Installation, assistant activation, review behavior, test execution, compatibility, effectiveness and operating costs remain unassessed.
The overview
Identity
Test Guard is the test-review skill in the amElnagdy/guard-skills repository, at [https://github.com/amElnagdy/guard-skills/tree/master/skills/test-guard]. Its main instruction file defines the name test-guard, activation conditions, review rules, severity levels and reporting format.
The folder contains SKILL.md, agents/openai.yaml and four reference documents. The interface metadata supplies the display name Test Guard and a default prompt to use $test-guard after tests are written or changed. These are instructions and supporting examples for an assistant, rather than an executable test runner.
Assessment
The clearest fit is a team whose coding assistant produces tests dominated by internal mocks, repeated input cases or assertions about implementation details. Test Guard provides concrete review criteria and exceptions: different scenarios can remain separate, database mocks are allowed when persistence is incidental, and tests tied to production incidents are protected.
Its usefulness depends on how well the assistant understands the project and applies those exceptions. No measured evidence establishes review accuracy, fewer escaped bugs or reduced maintenance. Treat its output as review advice requiring judgment before tests are removed or rewritten.
Users
The intended users are developers and reviewers working with newly generated or changed tests. Beginners get explanations of system boundaries and examples of fragile tests; experienced developers get stack-specific patterns, severity guidance and explicit exceptions.
Dedicated references cover Python with pytest, JavaScript or TypeScript with Jest/Vitest, and PHP with PHPUnit/Pest, including WordPress and WooCommerce. The activation description also names Go test files, but no Go-specific reference is included. Teams building LLM applications receive additional guidance for prompts, telemetry and agent-state transitions.
Capabilities
The nine core rules direct an assistant to assess observable behavior, justify mocks at system boundaries, combine equivalent input variants into data-driven tests, question redundant or trivial tests, use scenario-based names, preserve production regression tests, avoid testing framework guarantees, construct real state objects and use real infrastructure when persistence itself is under test.
The references translate those principles into concrete patterns: pytest parametrization and real Pydantic instances; Jest/Vitest test.each, network-boundary mocks and targeted UI assertions; PHP data providers and WordPress/WooCommerce factories. The JavaScript guide also distinguishes useful public-contract snapshots from broad snapshots of component internals.
For LLM applications, three additional rules favor prompt-template contracts over exact wording, discourage assertions about telemetry wiring and recommend controlled LLM responses with state-in/state-out assertions for agent flows.
Using it
Requirements
Use as intended requires a coding assistant that can load the instructions and read the relevant test changes, project instructions and supporting references. The skill asks the assistant to identify the testing stack and map boundaries such as network calls, databases, files, time, randomness and external SDKs. Project-specific testing rules take precedence.
The evidence does not establish supported assistant versions, installation directories, minimum runtime versions or a compatibility matrix. Examples mention optional testing tools; they are not bundled dependencies. Following the real-persistence guidance may require the project's test database, migrations and fixtures.
Mechanism
The intended sequence is to read local testing guidance, select the relevant references, inspect the changed tests and report rule violations grouped by file. Each finding should identify a rule, test location, explanation and suggested fix. Files without violations are omitted.
The core severity guide treats behavior, mocking and real-state-object violations as must-fix issues; duplication, justification, naming and framework-only tests as should-fix issues; and infrastructure concerns as worth noting without blocking small changes. Production regression tests are protected. The LLM reference separately prioritizes brittle prompt or call-count assertions in agent-flow tests.
These priorities are expressed in natural-language instructions. The captured files do not provide an automated enforcement mechanism or evidence that an assistant consistently follows them.
Setup
Obtain the complete skill folder so the relative references remain available. The captured main file is at [https://raw.githubusercontent.com/amElnagdy/guard-skills/ffa26036b7b5e77b20b5d679304a703b6fd1a43d/skills/test-guard/SKILL.md]. Preserve the accompanying reference documents, agents/openai.yaml and repository licence notice.
Configure the assistant through its supported skill-loading mechanism, then use the supplied $test-guard invocation after test changes. Explicit invocation before writing tests is also described. No host-specific installation command or verified setup procedure is supplied, so automatic discovery and activation remain unassessed.
Example
Illustrative use, not an executed result: a changed pytest file uses MagicMock in place of an application state object and contains three tests with identical setup that differ only in input and expected output. Rule 8 calls for constructing a real state object, with a fixture or factory if needed. Rule 3 calls for merging those equivalent variants into one parametrized test.
Assertions should still check the caller-visible result or state change. Separate tests remain appropriate when setup, assertions or mock configurations represent different scenarios. A test reproducing a production incident should be retained and linked to that incident.
Assessment & evidence
Limitations
Test Guard explicitly excludes running or debugging tests, test-runner and CI configuration, production-code review and general architecture discussion. It normally reviews changed tests rather than auditing untouched files. No execution or evaluation evidence establishes its detection accuracy or the safety of suggested test deletions.
Its advice is deliberately categorical in places. The LLM guide discourages assertions about telemetry wiring, call counts and internal retries. Teams for which those behaviors are explicit requirements should document the relevant contracts before applying those exclusions; the skill itself gives project-specific rules precedence.
Although the skill describes its focus as how to test, its rules also recommend removing tests considered trivial or redundant. That makes human review of proposed coverage reductions particularly important.
Reasoning
The practical rationale is to keep tests tied to observable requirements rather than internal structure. Real domain objects can expose construction and validation mistakes, while boundary mocks can control external responses without replacing the application's own logic. Data-driven cases can reduce repeated test bodies without removing distinct inputs.
These mechanisms make the skill a plausible fit for reviewing overgenerated tests, but they do not establish measured benefits. Its strongest safeguard against excessive pruning is the explicit protection for production regression tests; its main dependency is correctly identifying what the project treats as a public behavior contract.
Alternatives
A team can apply its existing testing documentation and a human review checklist directly. Test Guard packages a particular set of principles for assistant use; no comparative evidence establishes that it outperforms those approaches or another review tool.
A test runner addresses execution, and a linter addresses code style, both of which the skill explicitly leaves outside its scope. For production-code review, the main file points to clean-code-guard, but that companion's contents and suitability are not established by the supplied files.
Evidence
The source material consists of the complete supplied skill folder: SKILL.md, agents/openai.yaml, references/pytest.md, references/phpunit.md, references/jest.md and references/llm-app-testing.md, plus the repository-root LICENSE. The main file establishes intended behavior; the references provide concrete examples; the YAML establishes interface labels and a default invocation.
These files support conclusions about documented rules and permissions. They do not demonstrate successful installation, automatic activation, actual review findings, test execution or performance improvements. Nothing was executed.
Access & freshness
Costs
The MIT licence grants permission to use and redistribute the covered material free of charge. The evidence provides no hosted-service pricing, model pricing, token usage, latency or total operating-cost measurements.
Any coding-assistant charges and infrastructure costs for running the project's tests depend on the chosen environment and remain unknown. The skill does not specify a required paid service.
Rights
The captured repository-root LICENSE is the MIT License and names Ahmed Nagdy as the 2026 copyright holder. It permits use, copying, modification, distribution, sublicensing and sale, provided the copyright and permission notices accompany copies or substantial portions.
The licence also disclaims warranties and liability. Redistribution of the skill should retain that notice alongside the covered files.
Freshness
The supplied snapshot identifies commit ffa26036b7b5e77b20b5d679304a703b6fd1a43d and capture time 2026-11-16T00:32:22.592Z. The raw source addresses are pinned to that commit, while the repository folder address names the movable master branch.
The capture time does not establish a release or modification date. The supplied material does not establish subsequent upstream changes or compatibility with particular assistant and testing-framework releases.
Actions
Start with a small test diff and provide the assistant with project testing rules, relevant fixtures and the matching reference. Compare its findings with a human review before accepting deletions or changing assertions. Preserve incident regressions and confirm which behaviors are contractual.
Run the project's normal tests separately after any edits. For database behavior under test, provide real schema and migration fixtures as the skill recommends. Confirm that the assistant actually loads the skill before relying on its invocation or file-pattern activation.
