false-positive-hunter
Skill1 starsChanged 2 months agoMITView on GitHub
Audit an existing test suite for tests that pass whether or not the code works — vacuous assertions, name/assertion mismatch, swallowed errors, disabled specs, mocked-away subjects. Use when asked to review tests, judge suite quality, or before trusting a suite you did not write.
In this repository34 other files it gives its agents.
- a11y-auditSkill
- api-contract-testingSkill
- autonomous-explorationSkill
- bug-reproSkill
- chaos-resilienceSkill
- ci-wiringSkill
- contract-testing-pactSkill
- coverage-ratchetSkill
- database-testingSkill
- e2e-authoringSkill
- environment-paritySkill
- exploratory-chartersSkill
- flake-forensicsSkill
- i18n-l10n-testingSkill
- load-and-stressSkill
- mutation-proofSkill
- never-break-prodSkill
- payment-testingSkill
- perf-budgetSkill
- qa-triageSkill
- regression-curationSkill
- release-gateSkill
- responsive-mobile-testingSkill
- risk-mapSkill
- root-cause-protocolSkill
- security-regressionSkill
- smoke-and-sanitySkill
- state-machine-testingSkill
- test-data-managementSkill
- test-strategySkill
- tracking-testingSkill
- transactional-email-testingSkill
- unit-test-authoringSkill
- visual-regressionSkill
The file
Files
False-Positive Hunter
A flaky test lies sometimes and you notice. A false-positive test lies always and nobody notices. This skill finds the second kind. It is the highest-value QA activity on any inherited codebase.
Method: adversarial, not stylistic
You are not a linter. For every test, answer one question:
Name a change to production code that would make this test fail. If you cannot, it is a false positive.
Report only tests that fail that question. Never comment on style, naming taste, or structure unless it causes the vacuity.
Catalogue
Full definitions with examples: ../../docs/anti-patterns.md. Severity summary:
P0 — the test cannot fail
FP-01No assertion at all (a render/call with noexpect)FP-02Assertion on the locator/query object, not its state (expect(page.locator(x))truthy)FP-03Assertion inside atrywhosecatchis empty or only logsFP-04expect(true).toBe(true)/ tautologies / asserting a literal against itselfFP-05Name says one behavior, assertion checks anotherFP-06The subject under test is itself mockedFP-07.skip/.todo/ commented-out spec silently counted as suite healthFP-08.onlyleaked — the rest of the file never ran in CIFP-09Conditional assertion (if (x) expect(...)) where the branch is never takenFP-10Promise not awaited — assertion resolves after the test endedFP-11Error path asserted with a bareexpect(fn).toThrow()on a function that throws for the wrong reason
P1 — the test can fail, but not for the reason claimed
FP-12Assertion only that a mock was called (wiring, not behavior)FP-13Snapshot committed without ever being reviewed; regenerated on every failureFP-14toBeTruthy/toBeDefinedwhere a value comparison was possibleFP-15Hardcoded sleep replacing a state assertionFP-16Shared mutable state making the test order-dependentFP-17Test data that satisfies the assertion by accident (e.g. filter test where all rows match)FP-18expect.softchains that never fail the testFP-19Credentials/URLs hardcoded so the test silently targets the wrong environmentFP-20Retry masking a deterministic failure
P2 — decay
FP-21Zombie spec: covers a removed feature, still greenFP-22Duplicate coverage: n tests, one behavior, all break togetherFP-23Test depends on a manual step documented in a commentFP-24Fixture bypasses the guard the test claims to verify (seeds an admin to test authz)
Procedure
- Scope: the diff, a directory, or the whole suite (largest first —
wc -lper spec file). - For each test, run the vacuity question. Collect only failures.
- Verify the P0 findings empirically where cheap: break the production line the test claims to cover, run only that test, and record whether it stayed green. A P0 confirmed this way is not an opinion — it is evidence.
- Rank by (severity, risk tier of the code it claims to cover).
- Recommend one of three actions per finding: fix the assertion, delete the test, or replace with a real one at the right level. Deleting a false positive is a net gain — say so plainly, it raises trust in the suite.
Output
FP-05 P0 tests/checkout.spec.ts:42
Claims: "rejects an expired card" Asserts: response is 200
Proof: reverted the expiry guard in charge.ts:88 -> test still green
Action: assert status 402 and that no charge row was writtenClose with: Scanned <n> tests. P0 <n>, P1 <n>, P2 <n>. Suite trust: <low|medium|high> because <clause>.
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.

