test-gate
Skill4 starsChanged 4 months agoMITView on GitHub
Run the full verification battery and block on red before any commit/PR. Use before committing, before claiming a task done, or when the user says "run the tests", "is it green?", "verify before commit", or mentions "/test-gate". Discovers the commands from CLAUDE.md and docs/TESTING.md, brings up hermetic Docker infra if a compose file exists, runs lint → typecheck → unit → property → contract → integration (→ e2e) fail-fast, reads the real output, and refuses to proceed on any failure. Reports what it ran and what it printed; never prints secrets from env or logs.
- Reads credentials
7 other projects use a version of this.
Adopted by
Most recently taken up by
- stigmer/stigmertheir own version, first seen Nov 8, 2026
- Alex5350/arsenaltheir own version, first seen Nov 1, 2026
- Jaxsbr/sabstheir own version, first seen Oct 20, 2026
- Giamme/kent-testtheir own version, first seen Oct 15, 2026
- BrentRector/claude-skillstheir own version, first seen Oct 3, 2026
- Kohulan/orthonym-skillstheir own version, first seen Sep 29, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- stigmer/stigmer★ 9same name
- BrentRector/claude-skills★ 6same name
- Kohulan/orthonym-skills★ 2same name
- Docat0209/SoloForge★ 1same name
- Giamme/kent-test★ 1same name
- Alex5350/arsenal★ 0same name
- Jaxsbr/sabs★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- axiomatic-inductionSkill
- generate-prSkill
- genesisSkill
- git-commitSkill
- parallel-workSkill
- repo-hardeningSkill
- security-auditSkill
- sourcesSkill
- todoSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Run the project's full Tier-B battery, read the real output, and
- Distinctive: line 28
Read the source of truth; do not invent commands:
- Distinctive: line 64
Run each present stage with the discovered command.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test Gate — verify before commit, block on red
Overview
Run the project's full Tier-B battery, read the real output, and
stop the moment anything is red — never commit a red tree, never claim "passing" you did not watch pass.
The strategy this enforces is the project's docs/TESTING.md. Invocation is the
authorization — run end-to-end without a confirm prompt.
This is the project's concrete runner, built from its own commands and infra. Closing ritual:
test-gate green, then commit, then /generate-pr.
Arguments & modes
$1=full(default) — the Tier-B PR-gated battery (what blocks a commit/merge).$1=fast— Tier-A local loop (unit + property + lint), skips Docker/integration for a tight feedback cycle.fastgreen is not sufficient to commit — runfullbefore committing.
Step 0 — Discover the commands (deterministic — never guess them)
Read the source of truth; do not invent commands:
sed -n '/## Commands/,/^## /p' CLAUDE.md # the canonical command list
cat docs/TESTING.md # tiers, kinds, the Docker infra block, the gate order
ls docker-compose*.y*ml 2>/dev/null # is there hermetic infra to bring up?Map what you find to the gate stages and set a shell var per stage from the real discovered command —
$LINT, $TYPECHECK, $TEST (the Tier-B suite), $E2E, and $MIGRATE / $SEED for infra. If a stage
has no command in this project, leave its var empty, skip it, and say so in the report (an honest "no
e2e configured" — never a silent pass). Never read or print .env or secrets: to check a needed
var, test presence only ([ -n "$VAR" ] && echo set).
Step 1 — Bring up hermetic infra (only if a compose file exists)
COMPOSE=$(ls docker-compose.test.y*ml docker-compose.y*ml 2>/dev/null | head -1)
if [ -n "$COMPOSE" ]; then
docker compose -f "$COMPOSE" up -d --wait # wait for healthchecks; don't race startup
trap 'docker compose -f "$COMPOSE" down -v' EXIT # ALWAYS tear down + drop volumes, even on failure
[ -n "$MIGRATE" ] && eval "$MIGRATE"; [ -n "$SEED" ] && eval "$SEED" # deterministic schema + fixtures
fiInfra is ephemeral, seeded, isolated — never point integration tests at a shared or staging database. If Docker is unavailable, run unit+property, and report integration as not-run (do not pretend it passed).
Step 2 — Run the battery, fail-fast, reading every output
Order (a red stage stops the rest — fix the earliest failure first):
lint → typecheck → unit → property → contract/schema → integration → e2e (if wired)Run each present stage with the discovered command; capture and read its output and exit code:
run () { [ -z "$2" ] && { echo "── $1: skipped (no command) ──"; return; }; echo "── $1 ──"; eval "$2"; rc=$?; echo "exit=$rc"; [ $rc -eq 0 ] || { echo "RED at: $1"; exit $rc; }; }
run lint "$LINT"
run typecheck "$TYPECHECK"
run tests "$TEST" # unit + property + contract + integration per TESTING.md Tier B
run e2e "$E2E" # only if configured- Property tests are what makes the suite total rather than partial — they generate empty, boundary, malformed and adversarial inputs. If the suite has none for a function with a stateable law, flag it as a gap.
- Generative paths (if any): confirm the critic/fallback path is exercised (e.g.
FORCE_DEGRADE=1) — ground, generate, verify, degrade — with the fallback actually run.
Step 3 — Report the verdict (honest, evidence-based)
- All green: report each stage with its real result (
exit=0), state Tier-B is green, and that it is safe to commit. Only now may atodoitem's→ verify:be marked passed. - Any red: report the earliest failing stage with its real output — the failing assertion, the error — and stop there. Do not continue the battery and do not commit. Fix the earliest failure first; a later stage failing because an earlier one did is noise, not a second problem.
- Skipped stages: name them explicitly (
integration: skipped — no Docker) — a skipped check is never a passed check.
Hard rules (stop if you catch yourself doing these)
- Claiming "tests pass" / "it's green" without having run the command and read
exit=0. → run it; read it. - Committing, or telling the user to commit, on a red or partially-run gate. → block.
- Reading,
cat-ing, echoing, or pasting.envor any secret or log value. → presence-test only. - Pointing integration tests at a real/shared database instead of ephemeral Docker infra. → compose up/down.
- Leaving infra running after a failure. → the
trap … down -vtears it down on every exit. - Marking a
todoitem verified off afastrun. → only a greenfullTier-B run justifies it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

