agentsclimarketplace

Test and fix

Skill yu-iskw/sqlfluff-complexity/.claude/skills/test-and-fix

Run unit tests and automatically fix code failures, regression bugs, or test mismatches. Use when tests are failing, after implementing new features, or to repair "broken" tests.From its SKILL.md

Install
npx -y skills add yu-iskw/sqlfluff-complexity --skill test-and-fix

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.8 KB, as published. Nobody here has run it

Test and Fix Loop

Purpose

An autonomous loop for the agent to identify, analyze, and fix failing unit tests using pytest.

Loop Logic

  1. Identify: Run make test to identify failing tests (pytest with pytest-cov; terminal shows coverage summary).
  2. Analyze: Examine the pytest output to determine:
    • The failing test file and line number.
    • The expected vs actual values (assertion errors).
    • Tracebacks for runtime errors.
  3. Fix: Apply the minimum necessary change to either the source code (if it's a bug) or the test code (if the test is outdated).
  4. Verify: Re-run make test (or uv run pytest path/to/failing_test.py for speed).
    • If passed: Move to the next failing test or finish if all are resolved.
    • If failed: Analyze the new failure and repeat the loop.

Termination Criteria

  • All tests pass (as reported by make test).
  • Reached max iteration limit (default: 5).
  • The error persists after multiple distinct fix attempts, indicating a need for human intervention.

Examples

Scenario: Fixing a logic error

  1. make test fails in src/your_package/tests/test_dummy.py due to an assertion or import error.
  2. Agent inspects the failing test and the implementation under src/your_package/.
  3. Agent applies the minimum fix in source or test so behavior matches the intended contract.
  4. make test passes.

Resources

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.