Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
mhattingpete avatar

Test Fixing

  • 347 installs
  • 656 repo stars
  • Updated July 25, 2026
  • mhattingpete/claude-skills-marketplace

test-fixing is a testing agent skill that runs test suites and systematically repairs failing unit, integration, and e2e tests for developers who need green CI after code changes.

About

test-fixing is a testing agent skill from mhattingpete/claude-skills-marketplace for developers recovering from broken test suites after refactors, dependency upgrades, or flaky CI runs. The skill starts with an initial test run such as `make test`, identifies all failures, and applies smart error grouping to tackle related breakages together instead of one-off fixes. Developers reach for test-fixing when they explicitly need failing tests repaired, CI is red due to test regressions, or implementation work finished but the suite no longer passes. The systematic workflow preserves coverage while restoring green builds across unit, integration, and e2e layers. Invoke it after large merges or library bumps that cascade failures across many specs. Skip it when writing new tests from scratch, designing test strategy, or when failures require product logic changes rather than test repair.

  • Triages failing tests by root cause not symptom
  • Updates mocks, snapshots, and async timing safely
  • Avoids weakening assertions just to pass CI
  • Works across unit, integration, and e2e suites

Test Fixing by the numbers

  • 347 all-time installs (skills.sh)
  • +7 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #668 of 2,153 Testing & QA skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mhattingpete/claude-skills-marketplace --skill test-fixing

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs347
repo stars656
Last updatedJuly 25, 2026
Repositorymhattingpete/claude-skills-marketplace

How do you fix failing tests after a refactor?

Repair failing unit, integration, or e2e tests after refactors, dependency bumps, or flaky CI so releases stay green without deleting coverage.

Who is it for?

Developers with red CI or local test failures after refactors, dependency bumps, or flaky suites who need systematic repair without deleting tests.

Skip if: Teams needing new test authoring, test architecture design, or fixes that require changing production business logic instead of test code.

When should I use this skill?

A developer reports test failures, asks to make tests pass, or CI fails due to broken unit, integration, or e2e specs.

What you get

A green test suite with repaired unit, integration, and e2e specs and preserved coverage.

Files

SKILL.mdMarkdownGitHub ↗

Test Fixing

Systematically identify and fix all failing tests using smart grouping strategies.

When to Use

  • Explicitly asks to fix tests ("fix these tests", "make tests pass")
  • Reports test failures ("tests are failing", "test suite is broken")
  • Completes implementation and wants tests passing
  • Mentions CI/CD failures due to tests

Systematic Approach

1. Initial Test Run

Run make test to identify all failing tests.

Analyze output for:

  • Total number of failures
  • Error types and patterns
  • Affected modules/files

2. Smart Error Grouping

Group similar failures by:

  • Error type: ImportError, AttributeError, AssertionError, etc.
  • Module/file: Same file causing multiple test failures
  • Root cause: Missing dependencies, API changes, refactoring impacts

Prioritize groups by:

  • Number of affected tests (highest impact first)
  • Dependency order (fix infrastructure before functionality)

3. Systematic Fixing Process

For each group (starting with highest impact):

1. Identify root cause

  • Read relevant code
  • Check recent changes with git diff
  • Understand the error pattern

2. Implement fix

  • Use Edit tool for code changes
  • Follow project conventions (see CLAUDE.md)
  • Make minimal, focused changes

3. Verify fix

  • Run subset of tests for this group
  • Use pytest markers or file patterns:
     uv run pytest tests/path/to/test_file.py -v
     uv run pytest -k "pattern" -v
  • Ensure group passes before moving on

4. Move to next group

4. Fix Order Strategy

Infrastructure first:

  • Import errors
  • Missing dependencies
  • Configuration issues

Then API changes:

  • Function signature changes
  • Module reorganization
  • Renamed variables/functions

Finally, logic issues:

  • Assertion failures
  • Business logic bugs
  • Edge case handling

5. Final Verification

After all groups fixed:

  • Run complete test suite: make test
  • Verify no regressions
  • Check test coverage remains intact

Best Practices

  • Fix one group at a time
  • Run focused tests after each fix
  • Use git diff to understand recent changes
  • Look for patterns in failures
  • Don't move to next group until current passes
  • Keep changes minimal and focused

Example Workflow

User: "The tests are failing after my refactor"

1. Run make test → 15 failures identified 2. Group errors:

  • 8 ImportErrors (module renamed)
  • 5 AttributeErrors (function signature changed)
  • 2 AssertionErrors (logic bugs)

3. Fix ImportErrors first → Run subset → Verify 4. Fix AttributeErrors → Run subset → Verify 5. Fix AssertionErrors → Run subset → Verify 6. Run full suite → All pass ✓

Related skills

How it compares

Pick test-fixing over test-generation skills when an existing suite is failing and needs grouped repair, not net-new spec authoring.

FAQ

What command does test-fixing start with?

test-fixing starts by running `make test` to identify all failing tests, then applies smart error grouping before systematically repairing failures across the suite.

Does test-fixing delete failing tests?

test-fixing repairs failing unit, integration, and e2e tests to restore a green suite while preserving coverage, rather than removing specs to force CI green.

When should test-fixing be invoked?

Invoke test-fixing when a developer asks to fix failing tests, reports a broken test suite, or CI fails after refactors, dependency bumps, or implementation changes.

Testing & QAtestingbackendfrontend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.