iterator

iterator is an agent for Claude Code from queelius/claude-anvil. It costs 219 tokens per session (2,360 once invoked), scanned A, original, MIT.

An orchestrator for repeatedly reviewing and revising technical non-fiction textbook content. It alternates review and rewrite rounds until the findings fall below a chosen threshold, progress levels off, or the iteration limit is reached.

In plain words
What is it for?
Use it to improve a section, chapter, part, or whole book through bounded review-fix-review iterations, with configurable thresholds and iteration limits.
Why use it?
It reduces the need to coordinate repeated review-and-fix passes by hand. It also highlights unresolved editorial decisions that still need the author.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter; mentions CLAUDE.md; mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the bookwright plugin — 3 skills, 11 commands, 11 agents, 1 hook shipped together

Good fit Use it to improve a section, chapter, part, or whole book through bounded review-fix-review iterations, with configurable thresholds and iteration limits.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add queelius/claude-anvil
Claude Code
/plugin install bookwright

Made for: Claude Code.

Or install bookwright, the plugin that ships this one along with the rest of its 3 skills, 11 commands, 11 agents, 1 hook.

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 iterator

README.md
[![agentmods](https://agentmods.dev/badge/agents/queelius/claude-anvil/iterator/github.svg)](https://agentmods.dev/agents/queelius/claude-anvil/iterator)
Your own site
<a href="https://agentmods.dev/agents/queelius/claude-anvil/iterator"><img src="https://agentmods.dev/badge/agents/queelius/claude-anvil/iterator/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 iterator

Your own site · 80×15
<a href="https://agentmods.dev/agents/queelius/claude-anvil/iterator"><img src="https://agentmods.dev/badge/agents/queelius/claude-anvil/iterator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 219 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,360 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.00219 $0.02360
Opus 5.5 $0.00088 $0.00944
Sonnet 5.5 $0.00044 $0.00472
Haiku 4.5 $0.00022 $0.00236

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

Security

Grade A, and why

iterator 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 1mo 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.

bookwright/agents/iterator.md · 126 lines

How it starts

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

You orchestrate an autonomous review-fix-review loop on a textbook. You are the closer: you take drafted content with known issues and drive it toward clean by alternating the reviewer and rewriter orchestrators, detecting convergence, and surfacing only the judgment calls that genuinely need the author. You never dispatch the four auditors or the drafting specialists directly; you always go through the two orchestrators.

You cannot ask the user anything: Claude Code removes AskUserQuestion from every subagent. So the end-of-loop checkpoint is a handoff. In loop entry you return the deferred judgments to /bookwright:iterate, which asks the author in the main session and launches you again in finalize entry with the answers.

Entry Modes

The launch prompt sets <entry>:

  • loop (default): Phases 1 and 2, then Phase 3 (handoff or fall-through), then Phases 4 and 5 only when nothing is awaiting the author.
  • finalize: given <session> (the session directory) and <decisions> (a list of {id, finding, choice}, possibly empty), restore state from <session>/state.md and run Phase 3b, then Phases 4 and 5. Never re-run the loop.

Configuration (from arguments)

Flag Default Effect
<scope> required section <path>, chapter <N>, part <N>, or book
--max-iterations N 5 Hard cap on rounds
--threshold substantive|blocking|zero substantive Converged when no findings at this severity or worse remain (substantive = no BLOCKING and no SUBSTANTIVE)
--pause-on high|all|none high Which deferred judgments go to the end-of-loop checkpoint
--closing-review on|off on Delta-scoped recount after post-review fixes so final counts are real

Validate flags before starting; error out on a non-positive cap or an invalid threshold.

Workflow

Phase 1: Setup

  1. Read book/CLAUDE.md and resolve the scope to a concrete file set (same scope rules as the reviewer). If the scope is ambiguous, stop before creating the session and return a Decisions Needed block (scope-question format in ${CLAUDE_PLUGIN_ROOT}/skills/textbook-methodology/references/decision-handoff.md) listing the candidate scopes as options; the command asks and relaunches you.
  2. Create the session directory: docs/superpowers/reviews/iterate/<UTC-timestamp>-<scope-slug>/.
  3. Write state.md there with the configuration and an empty Round Log.
  4. Initialize: deferred_judgments=[], deferred_keys=[] (each {file, title}: the finding's location file without the line number, and its title), prior_findings=null, prior_files_touched=null, files_touched_since_last_review=[], total_fixed=0.

Read the full file on GitHub · 126 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. 1mo ago Changed · -8 lines · -124 tokens per session d1406778f074
  2. 1mo ago Changed · +22 lines · +21 tokens per session 0a340159b9ba
  3. 3mo ago First seen · 112 lines · 322 tokens per session scan A 171e509e313b

Subscribe to this mod's changes

iterator is an agent published in the GitHub repository queelius/claude-anvil (3 stars, last pushed 1mo ago), licensed MIT. It adds 219 tokens to every session and 2,360 once invoked, about $0.0009 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-31.

Related

iterator compared with agents from other repositories

iterator next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
iteratorqueelius/claude-anvilAgent31mo agoMITA219Claude Code
ia-database-guardianiliaal/whetstoneAgent37yesterdayMITA69Claude Code
ia-best-practices-researcheriliaal/whetstoneAgent37yesterdayMITA34Claude Code
ia-architecture-strategistiliaal/whetstoneAgent37yesterdayMITA47Claude Code
code-explorerharnessprotocol/harness-kitAgent13yesterdayApache-2.0A34Claude Code
reviewer-opusJoncik91/ucaiAgent283mo agoMITA32Claude Code
wiki-writerOshayr/LLM-WikiAgent517mo agoMITA28Claude Code