agentsop-test-fix-loop

Community

Iterate code edits until tests go green.

Authoragentsope
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps code-editing LLM agents reliably converge on “green” lint and test results by turning verifier output into the next prompt and enforcing loop termination.

Core Features & Use Cases

  • Verify-then-fix loop for coder agents: Runs a combined verifier command (lint/type/test) and feeds structured results back to the agent to drive the next edit.
  • Feedback distillation: Converts stdout/stderr/exit code into a concise, last-edit-anchored message (first failing signal, last traceback frame, ≤2k token target) to prevent context bloat.
  • Guardrails that prevent common failure modes: Caps iterations, detects stalls (same error repeating), commits each iteration for auditability, and escalates on environment/tooling failures instead of wasting agent turns.
  • Anti-cheat success detection: Verifies that “exit code 0” also means tests truly ran and were not weakened via skips/xfails/disabled tests.
  • Use cases: SWE-Bench-style patch loops, CI guardrails, and any “fix until tests pass” workflow where the success criterion is machine-verifiable.

Quick Start

Tell your AI agent to use the Test-Fix Loop policy so it edits, runs the verifier command, summarizes the first actionable failure as feedback, and keeps iterating until the verifier is truly green or the cap is reached.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: agentsop-test-fix-loop
Download link: https://github.com/agentsope/SkillAlchemy/archive/main.zip#agentsop-test-fix-loop

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.