fix-tests
Skill4 starsChanged 18 days agoMITView on GitHub
Run tests, diagnose failures, fix and re-run until green
7 other projects use a version of this.
Adopted by
Most recently taken up by
- renzrollon/interlocktheir own version, first seen Nov 5, 2026
- renzrollon/shippable-skillstheir own version, first seen Nov 1, 2026
- greglas75/zuvotheir own version, first seen Oct 16, 2026
- glowingkitty/OpenMatestheir own version, first seen Oct 8, 2026
- ChromeDevTools/devtools-frontendtheir own version, first seen Oct 8, 2026
- Igor-C-Assuncao/aiops-starter-kittheir own version, first seen Aug 20, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- ChromeDevTools/devtools-frontend★ 4.1ksame name
- renzrollon/interlock★ 61same name
- glowingkitty/OpenMates★ 53same name
- greglas75/zuvo★ 7same name
- renzrollon/shippable-skills★ 7same name
- danpo-intergral/Claude-Skills★ 0same name
- Igor-C-Assuncao/aiops-starter-kit★ 0same 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.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Run the test suite for the given scope, diagnose failures, fix them, and re-run.
- Very specific: line 39
Import path issues (use @/shared/, @/features/)
- Distinctive: line 42
If still failing after 3 attempts on the same test, stop and report — do not keep iterating
- Distinctive: line 46
If any TypeScript files were modified:
- Very specific: line 60
If --loop flag was provided and Step 5 still has failures:
- Distinctive: line 63
If failures persist after 3 full loops, stop and report
“Common” is measured: kept by at least 6 in 10 of the 7 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
Fix Tests Workflow
Run the test suite for the given scope, diagnose failures, fix them, and re-run. The fixed parts are the 3-attempt limit per failure, the final re-run of the original scope, and the summary; how you diagnose each failure is your call (the Step 3 checklist lists common causes in this codebase).
Step 1: Determine Scope & Mode
Parse the argument to determine what to run:
backendor no argument →cd server && bundle exec rspec --format progressfrontend→cd frontend && CI=true npm teste2e→cd frontend && npx playwright test- A specific file path → run that file directly
Loop mode (--loop): Run the full fix cycle autonomously without asking for input. Make best-judgment fixes. Suitable for headless/unattended runs via claude -p "/fix-tests backend --loop".
Step 2: Run Tests
Execute the test command and capture output. Note all failures.
Step 3: Fix Loop (max 3 attempts per failure)
For each failing test:
- Read the failing spec file and the source file it tests
- Diagnose the root cause — check for:
- Missing factory traits (check
spec/factories/andspec/factories/ai/) - Wrong test helpers (use
user_with_permissions,auth_headers_for,json_response) - Missing shared examples (
spec/support/shared_examples/) - Missing mocks or stubs for external services
- Stale selectors in E2E tests (prefer
data-testid) - Import path issues (use
@/shared/,@/features/)
- Missing factory traits (check
- Fix the issue using Edit
- Re-run just the failing file to verify the fix
- If still failing after 3 attempts on the same test, stop and report — do not keep iterating
Step 4: TypeScript Check (frontend/e2e only)
If any TypeScript files were modified:
cd frontend && npx tsc --noEmitFix any type errors found (same 3-attempt limit).
Step 5: Final Run
Re-run the full suite for the original scope to confirm everything passes.
Step 6: Loop Mode Continuation (--loop only)
If --loop flag was provided and Step 5 still has failures:
- Return to Step 3 with the NEW set of failures (not the originals)
- Repeat the full cycle up to 3 total loop iterations
- If failures persist after 3 full loops, stop and report
This enables autonomous fix pipelines: claude -p "/fix-tests backend --loop" --allowedTools "Bash,Read,Edit,Grep,Glob"
Step 7: Summary
Report:
- Total tests: pass / fail / pending
- Failures fixed (list each with one-line description of what was wrong)
- Failures remaining (if any, with diagnosis of why they couldn't be auto-fixed)
- Loop iterations completed (if --loop mode)
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.

