test-and-fix

Run failing test suites and apply targeted source-code fixes across JavaScript, Python, Go, and Rust.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/escotilha/claude-public --skill test-and-fix-escotilha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-and-fix
Source: https://github.com/escotilha/claude-public/tree/main/skills/test-and-fix
Command: npx skills add https://github.com/escotilha/claude-public --skill test-and-fix-escotilha

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It resolves failing test suites quickly by locating the root cause in the codebase and applying targeted fixes until the project passes all tests.

Core Features & Use Cases

  • Test runner detection: Automatically determines whether the project uses package.json, pyproject.toml, go.mod, or Cargo.toml.
  • Auto-fix loop: Runs tests, parses failures, fixes source code (not tests) when possible, and repeats up to 3 iterations.
  • Change visibility: Reports what was changed after each iteration so you can review progress confidently.

Use Case: after merging or making code changes, run this to automatically repair multiple test failures without manually debugging each one.

Quick Start

Run /test-and-fix to detect your test runner, execute the suite, apply up to three source-code fixes for failures, and stop when all tests pass.

Frequently Asked Questions about test-and-fix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix failing tests automatically after code changes?

To fix failing tests automatically, run the test-and-fix process which detects your test runner, executes the suite, and applies targeted source-code corrections up to three times. It prioritizes root-cause changes over modifying test assertions to ensure rapid recovery.

Does automatic test fixing work with Python and Go projects?

Yes, automatic test fixing works with Python and Go projects by detecting configuration files like pyproject.toml or go.mod. It also supports JavaScript/Node and Rust environments using package.json or Cargo.toml to determine the correct test runner.

How does an auto-fix loop handle multiple test failures?

An auto-fix loop handles multiple failures by running tests, parsing failure output, and applying targeted fixes to the source code. It repeats this cycle up to three iterations, stopping when all tests pass or the maximum attempts are reached.

What is the best way to debug failing CI test suites without modifying tests?

The best way to debug failing CI test suites without modifying tests is using an auto-fix loop that prioritizes root-cause changes in the source code. It parses failure output and applies corrections directly to the codebase, leaving test assertions intact.

What happens if automated test fixes exceed three iterations?

If automated test fixes exceed three iterations, the auto-fix loop stops running. The tool reports what was changed after each iteration so you can review progress and manually resolve any remaining failing tests.

Why does the auto-fix tool modify source code instead of test files?

The auto-fix tool modifies source code instead of test files to address the root cause of failures directly. By prioritizing source-code corrections over altering test assertions, it maintains test integrity and ensures the application logic functions correctly.