skill-iterative-loop

skill-iterative-loop is a skill for Claude Code, Codex from nyldn/claude-octopus. It costs 25 tokens per session (4,958 once invoked), scanned A, original, MIT.

A bounded repeat-and-check workflow for tasks that need several refinement rounds. It defines a goal, success conditions, a maximum number of attempts, and actions for each round.

In plain words
What is it for?
Use it for iterative improvements, polling, retries with changes, and other tasks where each round is evaluated before continuing.
Why use it?
It prevents open-ended repetition while allowing a task to continue until its stated result is reached.

Skill for Claude CodeCodex

Part of the octo plugin — 56 skills, 77 commands, 10 agents, 2 hooks shipped together

About the project

Claude Octopus is an orchestration project that sends research, design, and coding tasks to Claude Code and other AI model providers so their results can be compared. Developers use it for multi-model work, disagreement detection, reviews, persistent context, and an optional workflow that moves from discovery through delivery. The catalogue entries are its commands, skills, agents, instructions, hooks, plugins, and settings.

nyldn/claude-octopus · 4,045 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nyldn/claude-octopus/skill-iterative-loop
Any agent
npx skills add nyldn/claude-octopus --skill skill-iterative-loop
Clone the repo
git clone --depth 1 https://github.com/nyldn/claude-octopus

Made for: Claude Code, Codex.

Or install octo, the plugin that ships this one along with the rest of its 56 skills, 77 commands, 10 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for skill-iterative-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/nyldn/claude-octopus/skill-iterative-loop.svg)](https://agentmods.dev/skills/nyldn/claude-octopus/skill-iterative-loop)
Your own site
<a href="https://agentmods.dev/skills/nyldn/claude-octopus/skill-iterative-loop"><img src="https://agentmods.dev/badge/skills/nyldn/claude-octopus/skill-iterative-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,958 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00025 $0.04958
Opus 5 $0.00013 $0.02479
Sonnet 5 $0.00005 $0.00992
Haiku 4.5 $0.00003 $0.00496

Measured 5d ago against content hash 2c84e5d9d445, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

skill-iterative-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/skill-iterative-loop/SKILL.md · 726 lines

How it starts

The opening of the file, as written. The whole thing — 726 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Iterative Loop Execution

Overview

Systematic iterative execution with clear goals, exit conditions, and progress tracking.

Core principle: Define goal → Set max iterations → Execute → Evaluate → Loop or complete.


When to Use

Use this skill when user wants to:

  • Execute a task multiple times with refinements
  • Loop until a condition is met
  • Iteratively improve something (code, tests, performance)
  • Retry operations with modifications
  • Progressive enhancement in rounds

Do NOT use for:

  • Single execution ("run tests once")
  • Manual step-by-step work
  • Infinite loops without bounds
  • Simple retry logic (use skill-debug)

The Process

Phase 1: Loop Setup

Step 1: Understand the Intent
**Loop Intent:**

Goal: [what should be achieved]
Success criteria: [how do we know we're done]
Max iterations: [safety limit]
Per-iteration tasks: [what to do each loop]
Step 2: Clarify Parameters

Use AskUserQuestion if unclear:

  • Max iterations: How many times maximum?
  • Success condition: What indicates we can stop early?
  • Per-iteration actions: What exactly to do each round?
  • Failure handling: What if it never succeeds?
Step 3: Safety Checks
**Safety Validation:**

- [ ] Max iterations defined (no infinite loops)
- [ ] Success condition is measurable
- [ ] Each iteration makes progress
- [ ] Failure exit strategy exists
- [ ] User aware of potential duration

Never proceed without max iterations defined.


Phase 2: Loop Execution

Step 1: Initialize Loop
**Starting Iterative Loop**

Goal: [description]
Max iterations: [N]
Success criteria: [condition]

---

### Iteration 1 / [N]
Step 2: Execute Iteration

For each iteration:

**Iteration [current] / [max]**

**Actions:**
1. [Action 1]
   → [result/output]
2. [Action 2]
   → [result/output]
3. [Action 3]
   → [result/output]

**Evaluation:**
- Success criteria met? [Yes/No]
- Progress made? [Yes/No]
- Issues found: [list any issues]

**Status:** [Continue/Success/Need intervention]

---

Read the full file on GitHub · 726 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 726 lines · 25 tokens per session scan A 2c84e5d9d445

Subscribe to this mod's changes

skill-iterative-loop is a skill published in the GitHub repository nyldn/claude-octopus (4,045 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 4,958 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

profile

Show the Skill Autopilot dashboard — what it did for you, before/after comparison, learned rules with evidence, mastered commands. Also drafts a feedback issue. Use when the user asks "what has the autopilot done", "show my profile", "驾驶舱", "autopilot 报告", "学到了什么", or wants to give feedback about suggestions.

WinterDDo/claude-code-skill-autopilot · 79 tokens

learnings-researcher

Use this agent when you need to search institutional learnings in knowledge-base/project/learnings/ for relevant past solutions before implementing a new feature or fixing a problem. Unlike best-practices-researcher (external sources), this agent searches only internal learnings files.

jikig-ai/soleur · 59 tokens

ops-provisioner

Use this agent when you need to set up a new SaaS tool account, purchase a plan, configure the tool, and verify it works. Use ops-research for evaluating alternatives; use ops-advisor for the expense ledger; use coo for cross-cutting operations strategy.

jikig-ai/soleur · 61 tokens

discord-content

This skill should be used when creating and posting community content to Discord. Generates brand-consistent posts and posts via webhook after approval.

jikig-ai/soleur · 29 tokens

cron-delete

This skill should be used to delete a scheduled cron workflow by name — the first-class Delete verb that runs the delete step of soleur:schedule, with a confirm gate.

jikig-ai/soleur · 38 tokens

cron-list

This skill should be used to list scheduled cron workflows (recurring vs one-time, --json supported) — the first-class Read verb that runs the list step of soleur:schedule.

jikig-ai/soleur · 41 tokens