test-gate

test-gate is a skill for Claude Code from emaballarin/ccplugins. It costs 128 tokens per session (1,021 once invoked), scanned A, original, MIT.

A checklist for deciding whether a new or changed test is worth keeping. It asks what behavior the test protects, what failure would break it, why existing tests are insufficient, and whether the test needs an unnecessary production change.

In plain words
What is it for?
Use it when adding tests for new behavior, bug fixes, or experimental conditions, and when reviewing whether existing tests should be extended rather than reorganized.
Why use it?
It helps prevent duplicate, weak, or hard-to-maintain tests from entering a codebase. For regression tests, it requires the test to fail before the fix and then pass after it, a practice known as test-driven development or TDD.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ws plugin — 5 skills shipped together

Good fit Use it when adding tests for new behavior, bug fixes, or experimental conditions, and when reviewing whether existing tests should be extended rather than reorganized.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add emaballarin/ccplugins
Claude Code
/plugin install ws

Made for: Claude Code.

Or install ws, the plugin that ships this one along with the rest of its 5 skills.

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-gate

README.md
[![agentmods](https://agentmods.dev/badge/skills/emaballarin/ccplugins/test-gate/github.svg)](https://agentmods.dev/skills/emaballarin/ccplugins/test-gate)
Your own site
<a href="https://agentmods.dev/skills/emaballarin/ccplugins/test-gate"><img src="https://agentmods.dev/badge/skills/emaballarin/ccplugins/test-gate/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-gate

Your own site · 80×15
<a href="https://agentmods.dev/skills/emaballarin/ccplugins/test-gate"><img src="https://agentmods.dev/badge/skills/emaballarin/ccplugins/test-gate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,021 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.
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.00128 $0.01021
Opus 5.5 $0.00051 $0.00408
Sonnet 5.5 $0.00026 $0.00204
Haiku 4.5 $0.00013 $0.00102

Measured 12d ago against content hash cb635cf8a7ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-gate 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 12d 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.

plugins/whetstone/skills/test-gate/SKILL.md · 91 lines

How it starts

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

/ws:test-gate — a test lands only if it earns its place

Applies while tests are being written. The bar itself — the value bar, the junk patterns, the retention bar, and where concerns are noted — lives in ${CLAUDE_PLUGIN_ROOT}/references/test-value.md; read it before the first test of the session.

The gate is silent. A test that passes it gets nothing beyond the task's normal summary. Speak only when a test fails the gate, or when the survey in step 5 finds a concern.

1. Four questions

Before adding a test, answer four. A missing answer means the test is not added yet:

  1. What observable behaviour, invariant, or independent contract does it protect?
  2. What credible regression makes it fail?
  3. Why does existing coverage not already catch that failure? Each contract has one primary test owner at the strongest boundary; another layer needs its own distinct risk, such as a transport or lifecycle failure the owner cannot reach. Prefer a new row in an existing parametrised table, or an existing fixture reused as it is, over a near-duplicate test.
  4. Does it need a production seam — export, flag, wrapper, injection hook — that no production caller needs? If yes, move the test to the real boundary instead.

2. Junk check

Check the test against every junk pattern. A match fails the gate unless the retention bar names the contract it independently guards. A test that would break under behaviour-preserving refactoring asserts implementation; rewrite it at the owning boundary before landing it.

3. Regressions go red first

A bug regression test must fail on the pre-fix code for the intended reason, and pass after the repair at the owner boundary. See it red: write the test before the fix, or revert only the fix's production hunk, run the test, and restore the hunk byte for byte — the file must end identical to how it was before the revert. A regression test that never demonstrably failed proves the mock, not the fix.

One regression at the owner boundary covers the bug; one scenario gets one test, not one per layer it crosses.

Read the full file on GitHub · 91 lines

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. 12d ago Changed cb635cf8a7ff
  2. 19d ago First seen · 91 lines · 128 tokens per session scan A 8f50c67099a5

Subscribe to this mod's changes

test-gate is a skill published in the GitHub repository emaballarin/ccplugins (4 stars, last pushed 7d ago), licensed MIT. It adds 128 tokens to every session and 1,021 once invoked, about $0.0005 per session on Opus 5.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-09-27.

Related

Other skills, from other repositories

laravel-testing

Use when testing controllers, services, or models, or implementing TDD on Laravel 13 with Pest 5 / PHPUnit 13 (or Pest 4 / PHPUnit 12 on PHP 8.3).

fusengine/agents · 46 tokens

tdd

Use when writing production code that needs tests -- new features, bug fixes, refactoring. Enforces RED-GREEN-REFACTOR before implementation.

fusengine/agents · 33 tokens

feature-dev

Take one new feature slice from idea to reviewed, committed code in a single guided pass — scope it into the smallest shippable slice, build it test-first with strict TDD, review and fix the diff, then commit it. Chains slice → test-driven-development → the built-in /code-review → git-commit. Not for reviewing an…

thoughtbot/rails-consultant · 83 tokens

test-driven-development

Strict red-green-refactor TDD workflow for implementing features, fixing bugs, or changing behavior in Rails applications. Enforces the discipline of writing a failing test before any production code. Use whenever you want to implement with TDD — whether a new feature, a bugfix, a refactor, or any behavior change.

thoughtbot/rails-consultant · 68 tokens

symfony-testing

Testing Symfony hexagonal architecture with PHPUnit 10-13 and PHPStan 2: test organization mirroring src/, pure domain unit tests, handler tests with in-memory adapters and stubs, functional API tests, Messenger in-memory transport, Foundry 2 factories, TDD workflow. Use when: test, PHPUnit, TDD, unit test…

aligundogdu/symfony-hexagonal-skill · 100 tokens

tdd

Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.

saitarrun/Sdlc-ai-workflow · 45 tokens