| name | v1-fix-tests |
| description | Use when a failing test suite needs systematic repair. Triggers on "fix tests", "tests failing", or "make tests pass". |
| allowed-tools | ["Bash","Read","Edit","Grep"] |
Fix Failing Tests
Use this when you have failing test output. The goal is to fix ALL failing tests, re-run tests, and iterate until everything passes.
Usage
Typical invocations:
- Claude Code:
/v1-fix-tests
- Codex: invoke
v1-fix-tests from the skills menu or use $v1-fix-tests
Use this after you've pasted test failure output into the conversation.
What It Does
-
Understands ALL Failures
- Reads entire test log (pytest / Jest / parallel tests)
- Checks "Test Results" summary for ALL failing tests (looks for
✗ or FAILED markers)
- Checks "Failed Test Details" for MULTIPLE failing test groups
- Notes ALL test groups that failed (backend, frontend, linting, etc.)
- Creates list of all failures before starting fixes
- Confirms the failing command is a reliable feedback loop for the user-visible problem; if not, first narrow or rebuild the loop using the
v1-debug skill
-
Fixes EACH Failure
- For EACH failing service/group:
- Opens failing test files and implementation files
- Makes smallest, clearest change
- Prefers fixing implementation over changing tests
- Fixes ALL failures before proceeding
-
Re-runs Tests for EACH Fix
- Backend:
pytest (or with -k for specific tests)
- Frontend:
npm run lint or npm run test
- Verifies each group passes before moving to next
- Repeats if tests still fail
-
Re-runs Full Test Suite
- CRITICAL: Always re-runs original command used to run tests
- Catches hidden failures or new failures from fixes
- Only stops when full suite passes with zero failures
Important Notes
- Don't stop after fixing one failure - check for multiple failing groups
- Always re-run full test suite after fixes
- Parse entire error output - summary AND detailed sections
- Prefer fixing code over weakening assertions; only change tests when the test is wrong or the intended behavior changed. When a test itself must change, follow the mock-discipline and assertion rules in
v1-write-tests rather than restating them here.
- If the failure is flaky rather than a real regression, hand off to
v1-debug to stabilize the reproduction (measure the failure rate; isolate time, randomness, filesystem, and network) before patching.
Testing Commands
Backend (pytest):
pytest
pytest -k "pattern"
pytest tests/integration/
Frontend:
npm run lint
npm run test