test-fixing
Skill0 starsChanged 37 days agoApache-2.0View on GitHub
Trigger: failing tests, test suite failures, make tests pass. Run the project's test command and systematically fix ALL failing tests using smart error grouping - red test, diagnosis, patch, re-run - until the whole suite is green.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- xfstudio/skillstheir own version, first seen Oct 13, 2026
- TheArchitectit/awesome-cline-skillstheir own version, first seen Oct 13, 2026
- ai4brands-design/claude-skillstheir own version, first seen Mar 22, 2026
- rm2thaddeus/Aitor_Skillstheir own version, first seen Jan 22, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- xfstudio/skills★ 9same name
- TheArchitectit/awesome-cline-skills★ 8same name
- rm2thaddeus/Aitor_Skills★ 4same name
- ai4brands-design/claude-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository31 other files it gives its agents.
- architecture-lintSkill
- architecture-questSkill
- autofixSkill
- branch-prSkill
- chained-prSkill
- cognitive-doc-designSkill
- comment-writerSkill
- design-patternsSkill
- gentle-uiSkill
- gh-address-commentsSkill
- gh-fix-ciSkill
- github-automationSkill
- github-prSkill
- go-testingSkill
- grillingSkill
- issue-creationSkill
- judgment-daySkill
- playwright-interactiveSkill
- playwrightSkill
- product-questSkill
- skill-creatorSkill
- skill-improverSkill
- systemic-issue-triageSkill
- tailwind-4Skill
- typescriptSkill
- ui-designSkill
- ui-ux-principlesSkill
- using-git-worktreesSkill
- web-searchSkill
- work-unit-commitsSkill
- zod-4Skill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Run the project's test command — make test, npm test, go test ./..., uv run pytest, or whatever the project declares — and capture the …
- Distinctive: line 32
Don't fix tests one by one.
- Distinctive: line 45
Diagnose before patching: Read the test AND the code under test.
- Distinctive: line 46
Patch the smallest thing that fixes the group: Prefer the root cause over a test-local workaround.
- Distinctive: line 52
Run the FULL suite — not just the previously failing subset — so the final state proves the whole suite green:
- Distinctive: line 73
Run the full suite → green.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fixing Failing Tests
When to Use
Use this skill when tests are failing and need to be systematically fixed. It is for FIXING existing failures — not for writing new tests and not for setting coverage policy. If the suite is green and you need new coverage, use the project's testing conventions instead.
Workflow
1. Run the Tests
Run the project's test command — make test, npm test, go test ./..., uv run pytest, or whatever the project declares — and capture the failures:
# Example with a common entry point
make test 2>&1 | tee /tmp/test-output.logLoop invariant: a red test → diagnosis → patch → re-run loop. Keep the loop tight: small batches, verify after each patch, never "fix everything then hope."
2. Smart Error Grouping
Don't fix tests one by one. Group errors by root cause first:
- Same error message, different tests → one shared cause (fixture, helper, shared state).
- Same module/file implicated → likely one broken unit.
- One failing test in a tightly coupled area → often a symptom, not the root cause.
Fixing by root-cause group fixes N tests with one patch. Fixing one-by-one fixes N tests with N patches and usually misses the shared cause.
3. Systematic Fixing Process
For each error group:
- Read the failure. The assertion message and stack trace say what is expected vs. what the code produced.
- Diagnose before patching. Read the test AND the code under test. Decide: is the TEST wrong (stale expectation, bad fixture) or the CODE wrong (regression, missing branch)? Fixing the code to satisfy a wrong test bakes the wrong behavior in.
- Patch the smallest thing that fixes the group. Prefer the root cause over a test-local workaround.
- Re-run the group. In tight loops, re-running just the affected subset is fine; the full suite must run before you declare done.
- Fix order strategy: fix cheap, certain, root-cause groups first (fast green feedback, confidence), leave slow or ambiguous ones for last — unless one group blocks everything else (then it goes first).
4. Final Verification
Run the FULL suite — not just the previously failing subset — so the final state proves the whole suite green:
make test # or the project's commandThe fix is only done when the full suite passes.
Best Practices
- One failure at a time is a trap — always read the full failure list before touching anything.
- Never silence tests. Deleting a test, skipping it with
@pytest.mark.skip, or wrapping it in//nolintis only acceptable when you and your human partner explicitly agree it's obsolete — with a reason — never as a shortcut to green. - Keep fixes minimal and aligned with the codebase's existing style. No drive-by refactors inside a fix.
- Fixture/state pollution is the most common hidden cause — mutated shared state, leftover files, seeded DB rows. Check test isolation before blaming the assertion.
- Flaky tests (pass locally, fail in CI, fail intermittently) get their own investigation: timing, ordering, and shared state are the usual suspects.
Example Workflow
- Run
make test→ 5 failures. - Group: 3 share
fixtures/user_builder.pyerrors, 2 share a# timeoutin the same module. - Fix
fixtures/user_builder.py+ the timeout root cause → 5 patches collapse into 2. - Run the full suite → green. Report the grouped summary.
Provenance
Adapted from mhattingpete/claude-skills-marketplace — engineering-workflow-plugin/skills/test-fixing/SKILL.md (Apache-2.0). Adaptation makes it stack-neutral: concrete make test/uv run pytest invocations became "the project's test command," and scope is explicitly limited to fixing existing failures (not authoring tests, not coverage policy).
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.

