Skip to content
Back to skills

Iterative Runner

ASecurity

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.

  • 416 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 8, 2026
testinggobash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add aiskillstore/marketplace --skill iterative-runner --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Iterative Runner?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Iterative Runner
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aiskillstore-iterative-runner/badge)](https://www.skillsdirectory.com/skills/aiskillstore-iterative-runner)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: iterative-runner
description: "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."
---

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

Files in this skill

  • SKILL.md1.9 KB
  • skill-report.json9.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…