iteration-loop

iteration-loop is a command for Claude Code from btspoony/mstar-harness. It costs 65 tokens per session (658 once invoked), scanned A, original, MIT.

An automated workflow command that takes a software task from choosing a direction through execution, closure, opening a pull request, and preparing it for merging. A pull request is a proposed set of code changes for review before it is merged.

In plain words
What is it for?
Use it for end-to-end coding iterations with an optional direction and size from S to XL. The selected size limits the number of business plans included in the iteration.
Why use it?
It removes much of the manual coordination between planning, implementation, review, quality checks, and preparing the change for merge. It can also resume an iteration that has already had its direction set.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: agent in frontmatter.

Part of the morning-star-harness plugin — 26 skills, 8 commands, 14 agents, 2 hooks shipped together

Good fit Use it for end-to-end coding iterations with an optional direction and size from S to XL. The selected size limits the number of business plans included in the iteration.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/btspoony/mstar-harness/iteration-loop
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.

Clone the repo
git clone --depth 1 https://github.com/btspoony/mstar-harness

Made for: Claude Code.

Or install morning-star-harness, the plugin that ships this one along with the rest of its 26 skills, 8 commands, 14 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 iteration-loop

README.md
[![agentmods](https://agentmods.dev/badge/commands/btspoony/mstar-harness/iteration-loop/github.svg)](https://agentmods.dev/commands/btspoony/mstar-harness/iteration-loop)
Your own site
<a href="https://agentmods.dev/commands/btspoony/mstar-harness/iteration-loop"><img src="https://agentmods.dev/badge/commands/btspoony/mstar-harness/iteration-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 iteration-loop

Your own site · 80×15
<a href="https://agentmods.dev/commands/btspoony/mstar-harness/iteration-loop"><img src="https://agentmods.dev/badge/commands/btspoony/mstar-harness/iteration-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 658 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.
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.00065 $0.00658
Opus 5.5 $0.00026 $0.00263
Sonnet 5.5 $0.00013 $0.00132
Haiku 4.5 $0.00006 $0.00066

Measured 2d ago against content hash a8aa4cf4f05f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

iteration-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 2d 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.

commands/iteration-loop.md · 30 lines

How it starts

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

Iteration Loop

The whole lifecycle with an autonomous direction lock: this command's explicit autonomous opt-in replaces the interactive direction dialogue. Sibling entries: /iteration-start locks interactively and /iteration-drive resumes a locked iteration. Done = Phase 6 post-merge close.

Args

/iteration-loop [direction] [scale] — a trailing token exactly S / M / L / XL (case-insensitive) is scale, default M; the remaining text is direction (a lone scale token means an empty direction). Scale budgets the iteration's business plans only (S 1 / M 2–3 / L 3–4 / XL >4) — budget rules and what stays outside it → mstar-iteration/references/autonomous-direction-lock.md § Scale budget.

Boot

mstar-harness-core → mstar-roles → references/project-manager.md → mstar-iteration (route map: start → references/phase-1-prepare.md) → mstar-iteration/references/command-shared-invariants.md.

Execute

  1. Phase 1 — autonomous start → execute mstar-iteration/references/phase-1-prepare.md §1.1–§1.6 with Direction lock mode: autonomous (ranking, branch resolve, prototype disposition → references/autonomous-direction-lock.md). Retain a prototype (HTML, Markdown or JSON) with format rationale and autonomous disposition; never fabricate user approval. Do not read skills/grill-me/SKILL.md for this entry. Host Plan-mode permissions still apply — use the active host bridge's supported resume. Print the §1.6 Phase 1 completion checklist: clear the pre-integration items before the §2.3 integration step and mark the integration item after the branch push; loop session todo phase-1-autonomous-start closes when the compass is locked and the integration branch is pushed.
  2. No credible candidate and no direction → STOP and escalate; never invent a direction or default the branch policy.
  3. Phase 2→6 → continue through iteration-drive exactly (same route map, gates, phase headers and report). Continuous execution and STOP rules → mstar-iteration §2.6 plus command-shared-invariants.md.

Read the full file on GitHub · 30 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. 2d ago Changed · -74 lines · -32 tokens per session a8aa4cf4f05f
  2. 13d ago Changed fd83e3f949e4
  3. 17d ago Changed 053e0d7c675c
  4. 19d ago Changed · +3 lines · +6 tokens per session d853e9f830c3
  5. 25d ago Changed 9fb40a323303
  6. 1mo ago Changed · +1 lines 2df62b9a6cd1
  7. 1mo ago Changed · +8 tokens per session 17dde25c9bda
  8. 1mo ago Changed 452c5607c034
  9. 1mo ago First seen · 100 lines · 83 tokens per session scan A 6b580c6f53c1

Subscribe to this mod's changes

iteration-loop is a command published in the GitHub repository btspoony/mstar-harness (64 stars, last pushed today), licensed MIT. It adds 65 tokens to every session and 658 once invoked, about $0.0003 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.