agentleFS
AhmedMerzaAhmedMerza/claude-skills/skills/prove-the-test/SKILL.md

prove-the-test

Skill2 starsChanged 53 days agoMITView on GitHub

Before trusting a test you just wrote, break the thing it guards and confirm it actually fails. Catches tests that pass no matter what — a wrong assertion API, an assertion that cannot observe the thing, a path the test never reaches. Invoke with /prove-the-test after writing or changing a regression test, or when the user asks \"is that test actually testing anything / would it catch it / does it fail without the fix\". Runs on tests you or someone else just wrote; it does NOT audit a whole suite. Restraint-gated: one targeted revert per test, not a mutation-testing campaign.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    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
  1. Distinctive:

    If it passes at step 2, the test is decorative.

    line 24
  2. Distinctive:

    Every test written to pin a bug fix or a behavioral guarantee.

    line 28
  3. Distinctive:

    If a test is expensive or impossible to falsify this way, say so and move on rather than contorting the code to force red.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

A passing test proves nothing on its own. It passes when the code is right, and it also passes when the assertion is pointed at the wrong thing, when the framework read your failure message as an expected value, when the branch under test is never reached, or when the value would have been there regardless. Every one of those looks exactly like success.

So don't trust a new test until you've watched it fail.

The move

For each test that guards a specific change:

  1. Revert the production code it guards — just that, in place. The one line, the one condition, the one flag. Not a stash of everything.
  2. Run only that test. It must fail.
  3. Read the failure. It must fail for the stated reason, at the assertion you care about. A test that fails with a fatal, a missing key, or a setup error is not proving what you think.
  4. Restore the code, and confirm the test passes again.

If it passes at step 2, the test is decorative. Fix the test — that is the finding.

When to apply it

Every test written to pin a bug fix or a behavioral guarantee. That is the case where "it passes" is most likely to be an illusion, because the code is already correct when the test first runs — you never see red unless you make it.

Skip it for tests whose failure you have already seen naturally (you wrote the test first, or it caught something on the way in). Skip it for pure scaffolding.

What it typically catches

  • Assertion-API misuse. A helper whose second argument is an expected value, not a message. A null assertion that resolves through a getter answering null for absent keys just as readily as for present-and-null ones. Both pass against nothing at all.
  • Boundary tests decided by something other than the code — an unfrozen clock, ordering, a random seed. These pass, then flake later. If a test needs a revert to fail sometimes, it is already flaky; find the hidden input and pin it.
  • Unreachable branches. The fallback you are testing cannot be triggered through the path the test uses, so the test exercises the happy path and reports green.
  • Tests that assert a value the setup guarantees regardless of the code under test.

Restraint

This is one targeted revert per test, taking seconds. It is not mutation testing, and it is not an audit of an existing suite — do not go reverting production code across a repo to score old tests. If a test is expensive or impossible to falsify this way, say so and move on rather than contorting the code to force red.

Reporting

State it plainly and briefly: which test, what you reverted, that it failed, that it passed on restore. One line each. If a test failed to fail, that is the headline — lead with it, say what made it vacuous, and show the fixed assertion.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.