# Run Iterative Coding Loops

Long coding tasks often fail because each attempt stops before tests pass. This skill helps Claude, Codex, and Claude Code repeat work against clear completion criteria and bounded iteration limits.

## Install

```bash
npx skillstore add barissozen/iterative-runner
```

## Metadata

- - Slug: barissozen-iterative-runner
- - Version: 1.0.0
- - Author: BarisSozen
- - GitHub username: BarisSozen
- - License: MIT
- - Repository: https://github.com/BarisSozen/claude/tree/main/.claude/skills/iterative-runner
- - Ref: main
- - Supported tools: Claude, Codex, Claude Code
- - Risk level: medium
- - Risk factors: external\_commands
- - Quality score: 73
- - Public page: https://skillstore.pages.dev/skills/barissozen-iterative-runner
- - Manifest: https://skillstore.pages.dev/api/skills/barissozen-iterative-runner/manifest

## Capabilities

- Defines when to use repeated agent runs for TDD and complex implementation work.
- Shows how to set completion criteria before starting an iterative task.
- Recommends max iteration limits to reduce runaway execution risk.
- Provides example prompts for test-first implementation loops.
- Includes a reusable task template with success criteria and blocker reporting.

## Use Cases

- Test-Driven Feature Work: Use bounded iterations to write failing tests, implement the feature, and repeat until the test suite passes.
- Overnight Build Repair: Run a limited retry cycle that fixes build failures and reports blockers when the task cannot finish.
- Complex Refactor Completion: Break a refactor into clear phases and keep the agent focused on defined success criteria.

## Prompt Templates

### Basic Retry Task

```
Use iterative-runner to complete this task: [task]. Stop when [success condition] is true. Use at most 10 iterations and report any blocker.
```

### TDD Implementation Loop

```
Implement [feature] with test-driven development. First add a failing test, then implement the smallest passing change. Repeat until all related tests pass.
```

### Build Failure Recovery

```
Fix the current build failure. After each attempt, run the agreed build check. Stop after 15 iterations or when the build succeeds.
```

### Bounded Refactor Plan

```
Refactor [component] in phases. Define success criteria for each phase, run checks after each change, and document blockers after repeated failures.
```

## Limitations

- Does not provide the iterative-runner executable or installation steps.
- Requires users to supply clear tests, lint commands, or completion markers.
- Can increase token use and runtime when tasks are broad or underspecified.
- Does not verify that generated changes are correct beyond user-defined criteria.

## Best Practices

- Set a maximum iteration count before starting any loop.
- Define objective success criteria, such as passing tests or a clear completion marker.
- Keep each iterative task narrow enough for the agent to verify progress.

## Anti Patterns

- Do not run unbounded loops on vague goals.
- Do not use this skill when no automated check or review criterion exists.
- Do not let repeated attempts make unrelated changes across the repository.

## Security Audit

- - Safe to publish: true
- - Audited at: 2026-06-28T12:53:17.091\+00:00
- - Summary: The external command findings are partially true positives because the skill recommends repeated Claude CLI execution, including a persistent shell loop. The weak cryptography and network reconnaissance findings are false positives at the cited lines; no cryptographic algorithm, network scan, or exfiltration behavior is present. Publication is acceptable with a warning about cost, resource use, and controlled iteration limits.

## Stats

- - Views: 219
- - Downloads: 4
- - Favorites: 0
- - Popularity score: 0
