skill-iterative-loop

skill-iterative-loop is a skill for Claude Code from nyldn/claude-octopus. It costs 25 tokens per session (4,959 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 Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; names the AskUserQuestion tool.

Part of the octo plugin — 70 skills, 108 commands, 10 agents, 18 hooks shipped together

Good fit Use it for iterative improvements, polling, retries with changes, and other tasks where each round is evaluated before continuing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nyldn/claude-octopus/skill-iterative-loop
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,268 stars · on GitHub · reddit.com

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.

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.

Or install octo, the plugin that ships this one along with the rest of its 70 skills, 108 commands, 10 agents, 18 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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for skill-iterative-loop

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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,959 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 421
    Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.
    Fix: Set explicit rate limits, timeouts, and resource quotas for API calls, file operations, and compute. Implement circuit breakers for runaway loops.
How audits are shown
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.1 $0.00025 $0.04959
Opus 5.5 $0.00010 $0.01984
Sonnet 5.5 $0.00005 $0.00992
Haiku 4.5 $0.00003 $0.00496

Measured 21d ago against content hash b2852c9a3691, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 21d 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. 21d ago Changed b2852c9a3691
  2. 1mo 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,268 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 4,959 once invoked, about $0.0001 per session on Opus 5.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.