Imported from tenaz3/breakthevibe (
.claude/skills/fix/SKILL.md). Install upstream withnpx skills add tenaz3/breakthevibe --skill fix. Copyright stays with the author.
Autonomous Fix Workflow
Given a bug report or failing tests, enter an autonomous red-green-refactor loop and commit when green.
Phase 1: Reproduce
- If a bug is described, write a failing test that reproduces the exact bug
- Run the project's test command to confirm it fails for the right reason
- If tests are already failing (no bug description), skip to Phase 2
Phase 2: Red-Green Loop (max 5 iterations)
For each iteration:
- Hypothesize — Form a root cause hypothesis based on the failure output
- Fix — Implement the minimal fix in source code (prefer fixing source over changing tests unless the test is wrong)
- Verify — Run the failing test. If it passes, run the full test suite
- Track — Log each hypothesis and result in TodoWrite
- Iterate — If tests still fail, diagnose whether it's a regression from the fix or pre-existing, and try the next approach
Autonomy rule: Do NOT ask for user input until either all tests pass green, or 5 different approaches have been tried and need direction.
Phase 3: Quality Gate
After all tests pass, run the project's quality checks. Auto-detect the stack:
- Elixir:
mix format --check-formatted+mix credo --strict+mix compile --warnings-as-errors - TypeScript/JavaScript:
npm run lint(or equivalent from package.json) +npx tsc --noEmit(if TypeScript) - Python:
ruff checkorflake8+mypy(if configured)
Fix any issues found.
Phase 4: Commit
- Run
git statusandgit diffto review changes - Stage ONLY files related to this fix (never
git add .) - Unstage any unrelated changes
- Write a conventional commit message explaining:
- What the bug was (root cause)
- How it was fixed
- Verify clean state with
git status