Agentfix-test.claude/agents/fix-test.md
---
name: fix-test
description: Fixes a reported bug and runs the tests. Use for bug reports.
tools: Read, Edit, Bash
skills:
- write-pr-notes
---
You fix bugs.
1. Reproduce the bug.
2. Fix it with the smallest change.
3. Run the tests.
Workflowloop-example.claude/skills/loop-example/SKILL.md
---
name: loop-example
description: Fix a reported bug, retrying up to three times until the tests pass.
---
# loop-example
Fix a reported bug, retrying up to three times until the tests pass.
Follow these steps. "Go to step N" means continue from that step.
1. **Start: Bug report.** The user provides: A bug report with steps to reproduce. Then go to step 2.
2. **Loop: Up to 3 tries.** Repeat up to 3 times, counting iterations. Each iteration, go to step 3; a step that leads back here starts the next iteration. When the loop ends, go to step 6.
3. **Fix & test.** Delegate to the `fix-test` subagent. Then go to step 4.
4. **Decide: Tests pass?** Check: All tests pass. If yes, go to step 5. If no, go to step 2.
5. **Finish: Pull request.** Deliver: A pull request with a short summary. Stop here.
6. **Finish: Escalate.** Deliver: What was tried and why it failed. Stop here.