fix-tests

Diagnose failing tests and apply minimal code fixes to match specifications.

25|5|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/Hedgehogues/awesome-claude --skill fix-tests-hedgehogues
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fix-tests
Source: https://github.com/Hedgehogues/awesome-claude/tree/main/skills/fix-tests
Command: npx skills add https://github.com/Hedgehogues/awesome-claude --skill fix-tests-hedgehogues

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Fix failing tests by modifying code logic to match test specifications. Tests are the contract — the implementation must conform. The skill runs the test suite, classifies each failure as fixable, ambiguous, or unfixable, applies minimal logic fixes when possible, and reports unfixable cases via /describe. Use when tests fail and you need to fix the code, not the tests.

Core Features & Use Cases

  • Test-driven fixes: runs tests to identify failing contracts and categorize them.
  • Minimal changes: applies small, explainable fixes to domain entities, use cases, infrastructure, or presentation.
  • Result reporting: summarizes fixes and unresolved ambiguities for review via a final report and /describe command.

Quick Start

Run the fix-tests workflow against your project to diagnose and repair failing tests.

Frequently Asked Questions about fix-tests

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

FAQPage Schema
How do I fix failing tests by correcting code instead of modifying test specifications?

Fix failing tests by running the test suite to identify broken contracts, classifying failures, and applying minimal logic fixes to domain, application, infrastructure, or presentation code to conform implementations to test specifications.

What is the best way to diagnose pytest failures and align implementation with test contracts?

Diagnose pytest failures by categorizing each as fixable, ambiguous, or unfixable, then applying small explainable code corrections across domain entities and use cases to satisfy test specifications while reporting unresolved ambiguities.

Why does my test suite fail and how do I categorize which broken tests I can automatically fix?

Test suites fail when implementation diverges from test contracts; categorize failures by running tests to identify fixable cases for minimal code corrections, ambiguous cases for review, and unfixable cases reported via structured output.

Can I use automated test-driven fixes on frontend components and infrastructure code?

Yes, automated test-driven fixes apply to frontend components and infrastructure code by running tests to detect failing contracts and applying minimal changes across all application layers to match test specifications.

What should I do when a failing test is ambiguous and cannot be automatically fixed?

When a failing test is ambiguous or unfixable, the workflow reports the unresolved case via a final report and the /describe command, guiding you through the outcome for manual review instead of forcing a test modification.

Does the fix-tests workflow modify test files to make a failing test suite pass?

No, the fix-tests workflow treats tests as the contract and never modifies test files; it runs the suite, diagnoses failures, and applies minimal changes only to implementation code to align with the existing test specifications.