test-guard

test-guard is a skill for Codex from amElnagdy/guard-skills. It costs 182 tokens per session (1,848 once invoked), scanned A, original, MIT.

A review checklist for newly written or changed tests. It applies to common testing tools such as pytest, PHPUnit, Jest, Vitest, and Go tests.

In plain words
What is it for?
It is for reviewing test changes before they are shown, committed, or merged, and for checking whether the tests cover useful behavior without unnecessary maintenance.
Why use it?
It helps catch tests that are repetitive, tied too closely to implementation details, or test the testing framework instead of the application's behavior.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Good fit It is for reviewing test changes before they are shown, committed, or merged, and for checking whether the tests cover useful behavior without unnecessary maintenance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/amelnagdy/guard-skills/test-guard
About the project

guard-skills is a collection of review skills for coding agents that inspect code, tests, and documentation for common AI-generated problems. Developers run the relevant guard after an agent changes a project, before presenting, committing, or merging the work. The catalogue entries are individual guard skills from this collection.

amElnagdy/guard-skills · 1,231 stars · on GitHub · skills.sh

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add amElnagdy/guard-skills --skill test-guard
Clone the repo
git clone --depth 1 https://github.com/amElnagdy/guard-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/amelnagdy/guard-skills/test-guard/github.svg)](https://agentmods.dev/skills/amelnagdy/guard-skills/test-guard)
Your own site
<a href="https://agentmods.dev/skills/amelnagdy/guard-skills/test-guard"><img src="https://agentmods.dev/badge/skills/amelnagdy/guard-skills/test-guard/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/amelnagdy/guard-skills/test-guard"><img src="https://agentmods.dev/badge/skills/amelnagdy/guard-skills/test-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 182 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,848 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 5 Jul 2026
  • Snyk pass 5 Jul 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00182 $0.01848
Opus 5 $0.00091 $0.00924
Sonnet 5 $0.00036 $0.00370
Haiku 4.5 $0.00018 $0.00185

Measured 11d ago against content hash 77aeeb60d5cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

test-guard scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/test-guard/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test Guard

You 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.

These 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.

When this skill activates

  • A coding agent has just written new test functions or test files, in any language
  • You are editing existing tests
  • You are reviewing a diff that contains test changes
  • The user asks you to write, add, or review tests

Adapt to the project first

These rules are universal, but their application is not. Before reviewing:

  1. 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.
  2. Identify the test stack, then read the matching reference for concrete patterns:
  3. If the project calls LLM APIs, uses agent frameworks, or wires up observability/telemetry, also read references/llm-app-testing.md — it adds three rules specific to LLM applications.
  4. Map the project's system boundaries: network calls, databases, filesystem, clock and randomness, third-party SDKs, LLM APIs. Existing fixtures and test helpers usually reveal where the project already draws these lines.

What to do

  1. Read the test code: the diff, the new file, or the section being modified.
  2. Check each test against the rules below.
  3. Report violations concisely: rule number, location, why it violates, suggested fix.
  4. If the user explicitly invokes this skill before test writing, apply the rules as you write — don't write violations and then flag them.

Read the full file on GitHub · 120 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 120 lines · 182 tokens per session scan A 77aeeb60d5cd

Subscribe to this mod's changes

test-guard is a skill published in the GitHub repository amElnagdy/guard-skills (1,231 stars, last pushed 2mo ago), licensed MIT. It adds 182 tokens to every session and 1,848 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories