Test fixing

From sickn33/agentic-awesome-skills · View interactive version

Test fixing is an AI agent skill from the GitHub repository sickn33/agentic-awesome-skills. Systematically identify and fix all failing tests using smart grouping strategies. Use when explicitly asks to fix tests ("fix these tests", "make tests pass"), reports test failures ("tests are failing", "test suite is broken"), or completes implementation and wants tests passing.

How to use this skill

Skill file

Test Fixing

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

When to Use

Systematic Approach

1. Initial Test Run

Read project instructions, dependency manifests and CI configuration to identify the existing test command. Use make test only if that target exists and is the project contract. Inspect fixture/service requirements before running it; do not invoke production operations to obtain a baseline. Preserve pre-existing changes.

Analyze output for:

2. Smart Error Grouping

Group similar failures by:

Prioritize groups by:

3. Systematic Fixing Process

For each group (starting with highest impact):

  1. Identify root cause
  1. Implement fix
  1. Verify fix

```bash

uv run pytest tests/path/to/test_file.py -v

uv run pytest -k "pattern" -v

```

  1. Move to next group

4. Fix Order Strategy

Infrastructure first:

Then API changes:

Finally, logic issues:

5. Final Verification

After all groups fixed:

Best Practices

Example Workflow

User: "The tests are failing after my refactor"

  1. In a repository with a verified make test target, run it → 15 failures identified
  2. Group errors:
  1. Fix ImportErrors first → Run subset → Verify
  2. Fix AttributeErrors → Run subset → Verify
  3. Fix AssertionErrors → Run subset → Verify
  4. Run full suite → All pass ✓

Limitations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.