Automated Test Repair
Diagnoses failing tests, applies intelligent fixes to test or source code, and verifies results through iterative re-runs.
The fix-test skill is a specialized diagnostic utility for Claude Code designed to automate the tedious cycle of debugging broken test suites. It intelligently parses pytest output to identify the root cause of failures—ranging from assertion drift and mock mismatches to actual source code bugs—and implements the necessary corrections. By utilizing a safety-first approach that requires user confirmation for source changes and a limit of three retry attempts per test, it ensures your codebase remains stable while significantly reducing the manual effort required to maintain a healthy test suite.
Key Features
01Automatic diagnosis of assertion errors, import issues, and mock mismatches
02Detailed summary reporting of fixed, failing, and skipped tests
035 GitHub stars
04Iterative fix-and-verify loop with up to three retry attempts per test
05Smart differentiation between stale tests and actual production bugs
06Safety-first design requiring mandatory diff reviews for source changes
Use Cases
01Automating the repair of broken mocks and fixtures in complex pytest suites
02Quickly fixing regressions identified by the 'last failed' flag in CI/CD pipelines
03Resolving a batch of failing tests after a major internal refactoring project