Tooluck logoTooluck
SKILL.md

skill-iterative-loop

Agent skill fromnyldn/claude-octopus

Run tasks in a loop until goals are met — use for iterative refinement, polling, or convergence

How to install skill-iterative-loop

install skill-iterative-loop
# install the claude-octopus pack with the skills CLI
npx skills add nyldn/claude-octopus

# or add only this skill to Claude Code: copy the folder

skills/skill-iterative-loop/

# into

~/.claude/skills/skill-iterative-loop/ (all projects)

.claude/skills/skill-iterative-loop/ (one project)

skills/skill-iterative-loop/SKILL.md

MITFull file
1> **Host: Codex CLI** — This skill was designed for Claude Code and adapted for Codex.
2> Cross-reference commands use installed skill names in Codex rather than `/octo:*` slash commands.
3> Use the active Codex shell and subagent tools. Do not claim a provider, model, or host subagent is available until the current session exposes it.
4> For host tool equivalents, see `skills/blocks/codex-host-adapter.md`.
5
6
7# Iterative Loop Execution
8
9## Overview
10
11Systematic iterative execution with clear goals, exit conditions, and progress tracking.
12
13**Core principle:** Define goal → Set max iterations → Execute → Evaluate → Loop or complete.
14
15
16## When to Use
17
18**Use this skill when user wants to:**
19- Execute a task multiple times with refinements
20- Loop until a condition is met
21- Iteratively improve something (code, tests, performance)
22- Retry operations with modifications
23- Progressive enhancement in rounds
24
25**Do NOT use for:**
26- Single execution ("run tests once")
27- Manual step-by-step work
28- Infinite loops without bounds
29- Simple retry logic (use skill-debug)
30
31
32## The Process
33
34### Phase 1: Loop Setup
35
36#### Step 1: Understand the Intent
37
38```markdown
39**Loop Intent:**
40
41Goal: [what should be achieved]
42Success criteria: [how do we know we're done]
43Max iterations: [safety limit]
44Per-iteration tasks: [what to do each loop]
45```
46
47#### Step 2: Clarify Parameters
48
49Use AskUserQuestion if unclear:
50
51- **Max iterations:** How many times maximum?
52…

Excerpt shown under the repository's MIT license.

More skills in claude-octopus

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates