fix-flaky-tests-dont-deferlisted
Install: claude install-skill tstapler/stapler-squad
# Fix Flaky Tests When You Find Them — Don't Just Defer Them
When a test fails intermittently and you recognize it as "a known pre-existing flake," root-cause and fix it in the same session, or file it as a tracked bug immediately — don't just note it as unrelated and move past it again.
## When to Use This Skill
- A test fails intermittently in local runs or CI and re-running it passes
- You're about to write "known pre-existing flake, unrelated to this diff" in a PR
description or commit message
- You recognize a test name that has been cited as a flake in a previous PR
**Wrong:**
```
FAIL github.com/tstapler/stapler-squad/server/services 84.844s
--- FAIL: TestRemoveHooksConfig_should_StripOnlyTheNamedHook_When_MultipleHooksPresent (0.00s)
```
> "Known pre-existing flake, unrelated to this diff — re-ran the job, it passed, moving on."
**Right:**
```
FAIL github.com/tstapler/stapler-squad/server/services 84.844s
--- FAIL: TestRemoveHooksConfig_should_StripOnlyTheNamedHook_When_MultipleHooksPresent (0.00s)
```
> Confirmed unrelated to the current diff (re-run passed), but still root-caused and fixed
> before moving on — filed as its own fix if it can't be resolved in the same sitting, not
> silently re-excused the next time it appears.
## Why
This repo's own audit history (`docs/tasks/backlog-feature-improvement.md`) has repeatedly
named "known pre-existing flake, confirmed unrelated" as an acceptable reason to route around
a failure rather than fix it. `session/tmux