Skip to content
Skills Library
AI & agents · Automation

iloop

/iloop

In-session iterative loop — keeps Claude running in the current session until a task is done. Unlike /loop (which spawns background workers), /iloop stays in the current session and re-prompts each iteration via Stop hook. Use for: 'keep fixing until tests pass', 'iterate until this feature works', autonomous debugging. Triggers on: '/iloop', 'in-session loop', 'keep iterating', 'loop until done'.

Repository
clade ↗
Licence
MIT
Last repository change
24.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 24.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

In-session iterative loop — keeps Claude running in the current session until a task is done. Unlike /loop (which spawns background workers), /iloop stays in the current session and re-prompts each iteration via Stop hook. Use for: 'keep fixing until tests pass', 'iterate until this feature works', autonomous debugging. Triggers on: '/iloop', 'in-session loop', 'keep iterating', 'loop until done'.

Triggers from the description

keep fixing until tests passiterate until this feature worksin-session loopkeep iteratingloop until done

Arguments

/iloop task description" [--max-iterations N] [--completion-promise "TEXT"]
Original author description

In-session iterative loop — keeps Claude running in the current session until a task is done. Unlike /loop (which spawns background workers), /iloop stays in the current session and re-prompts each iteration via Stop hook. Use for: 'keep fixing until tests pass', 'iterate until this feature works', autonomous debugging. Triggers on: '/iloop', 'in-session loop', 'keep iterating', 'loop until done'.

How it works

  1. How it works
  2. Usage
  3. Signals (output anywhere in response to control the loop)
  4. Startup
  5. Cancelling
  6. Difference from /loop
Original SKILL.md headings · 87 lines, 463 words
SKILL.md preview
---
name: iloop
description: "In-session iterative loop — keeps Claude running in the current session until a task is done. Unlike /loop (which spawns background workers), /iloop stays in the current session and re-prompts each iteration via Stop hook. Use for: 'keep fixing until tests pass', 'iterate until this feature works', autonomous debugging. Triggers on: '/iloop', 'in-session loop', 'keep iterating', 'loop until done'."
argument-hint: '"task description" [--max-iterations N] [--completion-promise "TEXT"]'
user_invocable: true
---

# iloop — In-Session Iterative Loop

Runs Claude in a self-contained loop within the **current session** — no background processes, no worktrees. Each iteration, Claude reads the last output, checks progress, makes changes, and verifies. The loop continues until the task is done or max iterations is reached.

## How it works

```
User: /iloop "Fix all failing tests"
          ↓
Claude starts → works on task → tries to exit
          ↓
Stop hook detects .claude/iloop.local.md
          ↓
Feeds task prompt back → Claude continues
          ↓
Repeat until: <promise>DONE</promise> | <loop-abort> | max iterations
```

This is different from `/loop` (which uses background workers + worktrees). Use `/iloop` when:
- You want to stay in the current session and watch progress
- The task needs iterative self-correction within one context
- You want Claude to autonomously debug/fix until passing

## Usage

```
/iloop "Fix all failing pytest tests"
/iloop "Implement the auth feature" --max-iterations 25
/iloop "Get CI green" --completion-promise "ALL TESTS PASSING" --max-iterations 30
```

## Signals (output anywhere in response to control the loop)

| Signal | Effect |
|--------|--------|
| `<loop-abort>reason</loop-abort>` | Terminate immediately (e.g. impossible task, needs human decision) |
| `<loop-pause>what needed</loop-pause>` | Pause — state saved, resume by reopening session |
| `<promise>TEXT</promise>` | Signal completion (only when `--completion-promise` set and genuinely true) |

## Startup

When `/iloop` is invoked:

**Step 1:** Run the setup script:
```bash
bash ~/.claude/scripts/setup-iloop.sh "$ARGUMENTS" --max-iterations 20 --completion-promise "LOOP_DONE"
```

Adjust `--max-iterations` and `--completion-promise` based on the task:
- Simple fix: 10-15 iterations
- Feature build: 25-30 iterations
- Open-ended improvement: omit `--completion-promise`, use `--max-iterations`

**Step 2:** Tell the user:
```
▸ iloop started — iterating until done (max 20 iterations)
▸ Cancel: rm .claude/iloop.local.md
▸ Monitor: head -8 .claude/iloop.local.md
```

**Step 3:** Begin working on the task immediately. Per-iteration protocol:
1. Read git log and key files to understand what was done last iteration
2. Run verification (tests / build / lint) to check current state
3. Make focused progress — fix one thing at a time, not multiple things
4. Run verification again after changes — evidence required before marking done
5. Scan for related issues (fix A → check B and C)
6. Only output `<promise>LOOP_DONE</promise>` when ALL criteria are genuinely met

## Cancelling

```bash
rm .claude/iloop.local.md    # Immediate cancel
```

Or output `<loop-abort>reason</loop-abort>` from within the session.

## Difference from /loop

| | `/loop` | `/iloop` |
|--|---------|----------|
| Execution | Background process, parallel workers | Current session, sequential |
| Worktrees | Yes, isolated per worker | No, works on main tree |
| Visibility | Progress via `--status` | Real-time in session |
| Use case | Large parallel improvements | Focused iterative fixing |
| Context | Each worker starts fresh | Same context across iterations |

Versions

The database has no other skills named iloop.

Database snapshot: 13.11.2026 · package version eb2614d8f964 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100super-ralph-wiggum
    Run Claude Code in autonomous iteration loops until task completion — PRD-based feature development, test coverage improvement, lint fixing, documentation generation, dataset creation, or framework migrations. Uses in-session loop mechanism with specialized templates. Triggers…
  • 100write-hook
    Use when Claude Code should do something by itself - at session start (`SessionStart`), on every prompt (`UserPromptSubmit`), or after each response (`Stop`) - or when that automation misbehaves. Symptoms: a hook script that runs but whose output never reaches the model, a…
  • 100iteration-manager
    Iterative testing, verification, and improvement supervisor for code quality assurance. Triggers when: User requests iterative testing and improvement, code quality review and assurance is needed, automated testing and feedback loops are required, or multiple rounds of…
  • 90auto-loop
    Drive a Claude Code session toward a verifiable goal until done or a hard cap fires - autonomous loop, no user intervention. Use for refactor batches, test-suite green-up runs, migration loops where success is a check command (tests, lint, custom predicate) plus a fresh-context…
  • 100oh-my-obsidian-session-save
    Use this skill when the user wants to save the current session or the installed Stop hook requests automatic summary saving.
  • 100iterate-to-done
    Use when running a solve-loop over a task ledger — repeatedly pick the next ready task, dispatch it, verify against acceptance criteria, update the ledger, and repeat until done or blocked. Covers the loop, its stop conditions, and how to drive it recurring or in the background…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.