fail-first-testing
/fail-first-testing
Prove a change with a test that was seen failing before the fix and passing after. Use for every bug fix, and for the test discipline around features and performance claims. Produces the failing-then-passing evidence the pr-description skill pastes into the PR body.
- Author
- Epsilon0xCell ↗
- Repository
- pr-shepherd-skills ↗
- Licence
- MIT
- Last repository change
- 12.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 12.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Prove a change with a test that was seen failing before the fix and passing after. Use for every bug fix, and for the test discipline around features and performance claims. Produces the failing-then-passing evidence the pr-description skill pastes into the PR body.
Original author description
Prove a change with a test that was seen failing before the fix and passing after. Use for every bug fix, and for the test discipline around features and performance claims. Produces the failing-then-passing evidence the pr-description skill pastes into the PR body.
How it works
- For a bug fix
- For a feature
- For a performance claim
- Anti-patterns
- Close-out
SKILL.md preview
--- name: fail-first-testing description: Prove a change with a test that was seen failing before the fix and passing after. Use for every bug fix, and for the test discipline around features and performance claims. Produces the failing-then-passing evidence the pr-description skill pastes into the PR body. --- # Fail-First Testing "Tests pass" is a claim. A regression test that you watched fail, for the right reason, before the fix and pass after it is evidence. Maintainers can tell the difference, and a test that has never been seen failing may test nothing at all: it might pass against the bug, against a mock of the bug, or against nothing. Run this while implementing, after small-diff has set the scope. Its outputs are inputs to pr-description. ## For a bug fix 1. **Reproduce first.** Write the smallest test, or the smallest script, that demonstrates the bug against the current code. For a test that will stay in the suite, write it as a regression test in the project's own test style, in the file a maintainer would expect. 2. **Run it. Watch it fail.** The failure must be the bug: the wrong value, the exception, the missing behavior. A failure caused by a typo in your test proves nothing. Fix the test until it fails for the right reason. 3. **Save the failing output verbatim.** Command, and the relevant lines of output. You will paste this into the PR body. 4. **Write the smallest fix** that addresses the root cause inside the agreed scope. Not the widest fix, the smallest correct one. 5. **Run the test again. Watch it pass.** Save that output too. 6. **Run the surrounding suite**, at minimum the affected module's tests, and note the result honestly, including any pre-existing failures you did not cause and can demonstrate pre-date your change (run them on the base if challenged). ## For a feature Tests for the new behavior ship in the same PR, written against the agreed behavior from the issue. There is no failing-before state for behavior that did not exist; the equivalent discipline is a test that would fail if the feature were removed, and a manual walkthrough in the PR body for anything that cannot be automated, saying plainly why it cannot. ## For a performance claim No benchmark, no claim. Measure before and after with the same commands, on the same machine, and paste both numbers and the exact commands into the PR body so a reviewer can reproduce them. Performance changes are, in measured samples of real pull requests, among the hardest to get merged; an unmeasured one is asking for trust you have not earned. ## Anti-patterns - Writing the test after the fix and never seeing it fail. - Adjusting the test until it passes against the buggy behavior. - A screenshot of green and no commands. Reviewers rerun things; give them what they need to rerun yours. - Expanding the fix because a neighboring test failed for an unrelated reason. Report it, do not absorb it; that is scope growth, and small-diff forbids it. ## Close-out Hand pr-description three things: the test command, the failing-before output, and the passing-after output (or, for a feature, the new-behavior tests and the walkthrough note; for performance, the before and after numbers with commands). If you cannot produce them, the change is not ready to describe.
Versions
The database has no other skills named fail-first-testing.
Database snapshot: 13.11.2026 · package version 52ace8e395c8 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100test-driven-development
Use when implementing any feature, bug fix, refactor or behavior change, before writing implementation code. Write the failing test first, watch it fail, then write the minimal code to pass. - 100tdd
Make a bug in a TypeScript resource executable before fixing it, with a regression test that fails before the fix and passes after. Use only when the user asks for TDD, a failing test, or a regression test, or when the resource already has a test runner and the bug has an… - 100test-driven-development
Write a failing test first, watch it fail for the right reason, make it pass with the smallest change, then refactor with the suite green. Use whenever a card adds or changes behavior (feature, bug fix, refactor, endpoint, component), before writing any implementation code, or… - 100test-driven-development
Build features and fix bugs test-first with red-green-refactor: write one failing test, watch it fail for the right reason, write the least code that makes it pass, then refactor while green. Use this skill whenever you implement a feature, add a function or endpoint, change… - 95fix
Fix one bug from the board without an iteration - failing test first, smallest fix, one PR. "all" fixes every Ready bug, several at once while slots and room allow. Use when asked to fix a bug issue. - 100regression-tests
Pin every fixed bug with a test that fails before the fix and passes after, kept beside the code it guards. Use when closing a bug so the same defect cannot return silently through a later refactor or merge.