# 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.

- Page: https://youraiskill.com/skill/agentsope-agentsop-test-fix-loop
- What it does: 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.
- Niches: ai-agents, testing, coding
- Licence: MIT
- Status: Checked: open licence, author credited, passed the YourAISkill safety scan. Can be added to a paid pack.
- Contents: instructions and reference files only (5 files)

To add it, see https://youraiskill.com/guides/how-to-add-a-skill-to-claude
