/solo-agent-guards:test-and-provefrom solo-agent-guards
Prove that a test actually catches what it claims to guard by breaking the guard and watching the test fail. Use when writing or adding tests, judging coverage or test gaps, or when the user asks "is this tested?", "write tests for this", "add tests", "how's our coverage", "TDD", "why didn't the tests catch this?", or "this test is flaky". Korean triggers "테스트 짜줘", "테스트 붙여", "이거 테스트 있나", "커버리지 어때", "왜 테스트가 못 잡았지", "플레이크". Not for simply running an existing suite once.
Ships in solo-agent-guards. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Do not trust a passing test. Break the guard it protects and prove that the test catches it.
A green suite does not mean "the code is right". It only means "these tests did not fail". A test that guards nothing is green too.
Pairing payment.py with test_payment.py is a hypothesis. Open the actual test files and check.
The most common misdiagnosis: the tests for A live in B's test file. By file name, A looks untested. In fact it is well covered. Report that misdiagnosis and you invent a problem that does not exist.
Do not ask "is there a test file?" Ask these:
except/rescue/catch, else, validation failures, rejected state transitions)?| Priority | Target |
|---|---|
| 1 | Failure branches: an exception ends in the intended response, not a 500 |
| 2 | Permission boundaries: an unauthorized request does not change state |
| 3 | Irreversible transitions: a second call fails cleanly |
| 4 | Happy path: usually already there |
Rules:
After you write a test, always run this:
remove one guard → run only that test → it must fail → restore the guard
git restore <file>, or run the mutation in a throwaway copy of the repo. Leave no backup copies behind, inside the repo or outside it: they outlive the run, and the next person cannot tell which copy is real. Check that git diff is clean afterwards. A mutation left in the code is an incident.Trap: reading "nothing ran" as "passed". If the test filter matches nothing, zero tests run and zero fail. Some runners print a line that looks like a pass, and some exit with code 0. So in a mutation run, always read the run count.
| Runner | Caught | Not caught: rewrite the test | Name filter matched nothing: not a pass |
|---|---|---|---|
| Minitest | 1 runs, 1 assertions, 1 failures | 1 runs, 1 assertions, 0 failures | 0 runs, 0 assertions |
| pytest | 1 failed | 1 passed | 1 deselected (-k), exit code 5 |
| Go | --- FAIL | ok | ok ... [no tests to run] (-run), exit code 0 |
| Jest | Tests: 1 failed | Tests: 1 passed | Tests: 1 skipped (-t), exit code 0 |
Go and Jest exit with 0 here. A script or an agent that checks only the exit code reads it as a pass.
The mutation can show up as an error instead of a failure. That still counts as caught. But find out why it is an error. A second line of defense, such as a datastore constraint, may have caught it instead. That is worth knowing in itself.
Run everything CI runs. Do not run part of it and say "all passed". Many stacks run browser or system tests with a separate command.
If a hook or sandbox blocks the local run, run it in an approved remote environment. Its location belongs in the repo's AGENTS.md, CLAUDE.md, or your notes. A block is not a reason to skip verification.
On a shared runtime you are not the only user. Before you start, check the load and other people's jobs:
uptime # load above the core count means it is already busy
pgrep -fl "pytest|jest|rspec|rails|go test" # are other sessions' tests running?
If someone else's job is running, do not start a load experiment. Your extra load can turn their tests flaky. If you did add load, check for leftover processes afterwards and remove them.
Watch the run count. If it differs from the last run, find out why. The code changed, the datastore state moved, or someone committed.
The suite never executes some files: deploy scripts, service units, CI config. For a guard inside such a file, add a contract test that asserts its text. Otherwise, when someone deletes the guard, the suite stays quiet and the guard is gone.
script = Path("bin/deploy").read_text()
assert "set -euo pipefail" in script
It is cheap and it catches regressions. Know its limit: it does not prove that the file runs.
459 runs, 1875 assertions, 0 failures.Do not cover an intermittent failure by re-running. At minimum, pin down these:
One common cause: an immediate read with no retry right after an assertion that waits (Capybara assert_selector, Playwright expect(locator).toBeVisible()). The first one waits and the second one does not, so they break one tick apart. The fix is to turn the immediate read into an assertion that retries.
| Do not | Instead |
|---|---|
| Judge coverage by file names | Open the test files and check |
| Split interfaces or inject dependencies just for tests | Reach the code with real objects |
| Stop because it passed | Break the guard and check that the test catches it |
| Raise the coverage percentage | Cover failure branches and permission boundaries |
| Force one test file per controller | Join the file where the topic lives |
| Re-run a flaky test until it passes | Record the reproduction rate and where it stops |
| Run part of the suite and say "all passed" | Run everything CI runs |
The idea is mutation testing, done by hand on the test you just wrote. Stryker, mutmut, and PIT automate it across a whole codebase. The rules came from corrections by the person this skill was first built for.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub robfold/solo-agent-guards --plugin solo-agent-guards5 skills in this plugin
/change-integrityCheck that only your own changes went up, that nothing is missing, and that the push actually landed when you commit, push, or open a PR or MR. Use when committing or pushing, especially when the repo is shared with other sessions, agents, or people, or when the working tree holds changes you did not make. Also use when the user says "commit this", "open a PR", "push it", "merge it", "why is this PR empty?", "someone else's changes came along", or "the working tree is dirty". Korean triggers "커밋해", "PR 올려", "MR 만들어", "푸시해", "머지해", "남의 변경이 딸려 왔어". Not for a one-file commit in a repo only you use./claim-auditCheck that every status claim rests on the kind of evidence its verb needs before you report it. Use right before reporting "merged", "deployed", "passed", "running in production", "sent", "fixed", or a result number (conversions, payments, signups); when the user asks "is that real?" or "did you actually check?"; and before you merge, deploy, or pick up work someone else built. Korean triggers "다 됐어?", "진짜 머지됐어?", "실적 몇 건이야", "운영에서 도는 거 맞아?". Not for choosing what "done" means for a task, or for proving a single test./decision-ledgerKeep this project's decisions in a shared ledger file (DECISIONS.md) that people, other agents, and the next session all read. Use when the user decides or reverses something about the work — direction, scope, names, bans, defaults ("let's…", "from now on…", "drop X", "cancel that") — open it before you answer, even for a one-line decision; when the user says "we already decided this" or "like we agreed last time"; and before you start or resume work from a spec, plan, or issue. Decisions about the project go in this ledger, not your own memory; memory holds one person's preferences, the ledger holds what everyone working on the project must follow. Korean triggers "이렇게 하자", "앞으로는", "지난번에 정했잖아", "기획서대로 이어서 해". Not for a user's personal preferences (memory) or for writing up architecture rationale in depth (architecture-decisions)./done-checklistWrite the finish line before starting, turn every correction into a checklist line, and run both before saying "done". Use when the user doubts a result or points out a miss ("did you check?", "is it done?", "did you review it?", "you missed it again") — open it before you fix anything; when the user hands over work and asks for a finish line or a self-check; and right before you report "done" or "complete". Korean triggers "이거 확인했어?", "다 됐어?", "또 빠졌네", "끝났으면 보고해". Not for re-reading the evidence behind a single status verb (claim-audit) or proving one test catches a bug (test-and-prove).