Agent skill

iterative-runner

Runs Claude in a retry loop until tests pass or task completes. Use for TDD loops, overnight builds, or any task needing repeated iteration until success. Triggers on: loop until done, keep trying, retry until pass, TDD loop, iterate until tests pass.

Stars 232
Forks 15

Install this agent skill to your Project

npx add-skill https://github.com/aiskillstore/marketplace/tree/main/skills/barissozen/iterative-runner

SKILL.md

Iterative Runner

Runs Claude in a persistent loop that keeps retrying until tests pass or the task is complete.

When to Use

  • Running TDD loops that iterate until all tests pass
  • Overnight builds that need to keep trying until successful
  • Any task requiring repeated attempts until completion criteria are met
  • Automated retry for flaky or complex implementations

Core Concept

bash
while :; do cat PROMPT.md | claude ; done

Keep iterating until task is complete.

Workflow

Step 1: Define Completion Criteria

Specify clear success conditions:

  • All tests passing
  • No linter errors
  • Specific output marker (e.g., <promise>DONE</promise>)

Step 2: Set Safety Limits

Always use --max-iterations to prevent infinite loops.

Step 3: Run the Loop

bash
# Basic loop
iterative-runner "Build feature X" --completion-promise "DONE" --max-iterations 30

# TDD loop
iterative-runner "Implement feature using TDD.
1. Write failing test
2. Implement to pass
3. Run tests
4. Fix if failing
5. Repeat

Output <promise>DONE</promise> when all tests green." --max-iterations 50

Prompt Best Practices

  1. Clear completion criteria - Define what "done" means
  2. Incremental goals - Break into phases
  3. Self-correction - Include retry logic
  4. Escape hatch - Always use --max-iterations

Template

Implement [FEATURE].

Requirements:
- [Requirement 1]
- [Requirement 2]

Success criteria:
- All tests passing
- No linter errors

After 15 failed iterations:
- Document blockers
- List attempted approaches

Output <promise>COMPLETE</promise> when done.

Expand your agent's capabilities with these related and highly-rated skills.

aiskillstore/marketplace

perigon-backend

Perigon ASP.NET Core + EF Core + Aspire conventions

232 15
Explore
aiskillstore/marketplace

perigon-agent

Pointers for Copilot/agents to apply Perigon conventions

232 15
Explore
aiskillstore/marketplace

perigon-angular

Angular 21+ standalone/Material/signal conventions for Perigon WebApp

232 15
Explore
aiskillstore/marketplace

fastapi-mastery

Comprehensive FastAPI development skill covering REST API creation, routing, request/response handling, validation, authentication, database integration, middleware, and deployment. Use when working with FastAPI projects, building APIs, implementing CRUD operations, setting up authentication/authorization, integrating databases (SQL/NoSQL), adding middleware, handling WebSockets, or deploying FastAPI applications. Triggered by requests involving .py files with FastAPI code, API endpoint creation, Pydantic models, or FastAPI-specific features.

232 15
Explore
aiskillstore/marketplace

context7-efficient

Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.

232 15
Explore
aiskillstore/marketplace

browser-use

Browser automation using Playwright MCP. Navigate websites, fill forms, click elements, take screenshots, and extract data. Use when tasks require web browsing, form submission, web scraping, UI testing, or any browser interaction.

232 15
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results