Test and Fix Loop
Sets up a coding agent to run tests, read failures and fix them until green, with a safe point to stop.
Claude's review
8/10 Concrete verify then fix loop design: verifier cascade, capture rules, feedback formatting recipe, iteration cap plus stall detector, per iteration commits and false green checks like skipped tests.
We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.
In detail
Decision protocol for wiring a verify-then-fix loop around a code-editing LLM agent. The agent edits → runs lint/test → reads the output → fixes → re-runs, bounded by an iteration cap and an escalation rule. Activates whenever a coder agent has a verifiable success criterion (exit code, type-checker output, failing assertion) and the user wants the agent to converge to "green" on its own. Framework-agnostic — wraps Aider's `--auto-lint`/`--auto-test`, an OpenHands SWE-Bench loop, a manual LangGraph cycle, or Claude Code's bash tool just the same.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: agentsop-test-fix-loop
version: 0.1.0
description: |
Decision protocol for wiring a verify-then-fix loop around a code-editing LLM
agent. The agent edits → runs lint/test → reads the output → fixes → re-runs,
bounded by an iteration cap and an escalation rule. Activates whenever a coder
agent has a verifiable success criterion (exit code, type-checker output,
failing assertion) and the user wants the agent to converge to "green" on its
own. Framework-agnostic — wraps Aider's `--auto-lint`/`--auto-test`, an
OpenHands SWE-Bench loop, a manual LangGraph cycle, or Claude Code's bash
tool just the same.
domain: coder-agent / tool-result-feedback
audience: engineers wiring LLM agents that must converge on a verifiable spec
trigger_keywords:
- "auto-lint"
- "auto-test"
- "test-fix loop"
- "fix until tests pass"
- "verify-then-fix"
- "iterate until green"
- "agent feedback loop"
- "iteration cap"
when_to_use:
- "any code-edit flow with a verifiable success command (pytest, ruff, mypy, eslint, tsc, go test, cargo check)"
- "wrapping a coding agent so it doesn't return until lint+tests are clean"
- "SWE-Bench-style runs (one issue → patch → tests → fix → submit)"
- "CI guardrail where a PR must be green before the agent declares done"
when_not_to_use:
- "the success criterion is subjective ('looks good') — there's no signal to feed back"
- "the verifier takes >5 min and you need the agent interactive — async the loop"
- "human review is the gate (use HITL skill instead)"
- "edits are exploratory / WIP — the loop will fight the user's incomplete code"
---
# Test-Fix Loop · SOP
> One-liner: **The test result IS the next prompt.** Wiring the verifier is
> 20% of the work; framing its output as a useful feedback message is 80%.
...From agentsope's repository, MIT licence.
Related skills
-
Checked
Council of AI models
Asks several AI models the same question separately, compares their answers and gives you the best one.
7/101 credit -
Checked
RAG evaluation
Measures how well a RAG system retrieves and answers, with test questions, metrics and chunking advice.
8/101 credit -
Checked
AI automation planner
Works out which manual work in your business to automate first, then designs the system, tools and safeguards.
7/101 credit -
Checked
LangGraph agent design
Guides LangGraph builds through topology, checkpoint and human review choices so agents survive failures.
7/101 credit -
Checked
Agent system design
Asks staged questions to design agent pipelines and sub agents, so you only add agents where they help.
7/101 credit -
Checked
Subagent model routing
Chooses the model, effort level and cascade for each subagent by cost per finished task, keeping loops safe.
7/101 credit