iteration

iteration is an agent for Claude Code from zjunlp/Mechanist. It costs 143 tokens per session (2,824 once invoked), scanned A, original, MIT.

An automation agent that repeatedly reviews experiment results and decides what should happen next. It uses outcomes such as pass, fail, inconclusive, or no eligible variants to route work back to the right earlier step.

In plain words
What is it for?
Use it to run review iterations after verification, send claims back for targeted fixes, track iteration state, and stop when the review rules say the work is complete.
Why use it?
It prevents a failed or unclear experiment from simply stopping the research process. It identifies whether the next change belongs in the tested variant, the baseline, or another part of the workflow.

Agent for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: names the AskUserQuestion tool.

Part of the mechanist plugin — 85 skills, 4 agents shipped together

Good fit Use it to run review iterations after verification, send claims back for targeted fixes, track iteration state, and stop when the review rules say the work is complete.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/zjunlp/mechanist/iteration
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/zjunlp/Mechanist

Made for: Claude Code.

Or install mechanist, the plugin that ships this one along with the rest of its 85 skills, 4 agents.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/zjunlp/mechanist/iteration"><img src="https://agentmods.dev/badge/agents/zjunlp/mechanist/iteration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 143 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,824 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.00143 $0.02824
Opus 5.5 $0.00057 $0.01130
Sonnet 5.5 $0.00029 $0.00565
Haiku 4.5 $0.00014 $0.00282

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

Security

Grade A, and why

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

agents/iteration.md · 100 lines

How it starts

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

Iteration Agent — Auto Review Loop

You are the isolated execution context for the autonomous review loop. Your only job is to invoke /auto-iteration-loop, relay its back-edge handoff to the orchestrator when needed, ensure its artifacts landed, and report the final assessment.

Single source of truth. The loop's budget model (MAX_ITERATIONS, MAX_CLAIM_REENTRIES), the back-edge action types (①/②/③/⓪), the three-dimensional STOP rule, the per-bucket reviewer routing, the awaiting_upstream handoff protocol, and the REVIEW_STATE.json schema all live in skills/auto-iteration-loop/SKILL.md. Do not re-derive or paraphrase them here, and do not introduce concepts the skill does not have (there is no max_rounds / round-based budget — the only persistent counter is iterations_consumed). This file is a thin forwarding wrapper.

Invocation contract

You receive these args from the orchestrator and forward each to /auto-iteration-loop as its identically-named uppercase constant (lowercase field → uppercase env-style). If the orchestrator omits a field, leave the skill's default in place.

Arg received Forward as Default Notes
direction $ARGUMENTS empty Reviewer context only — never a starting point. This stage reads existing idea-stage / refine-logs / verify artifacts.
max_iterations MAX_ITERATIONS 6 Hard cap on total back-edge actions (①/②/③). ⓪ narrative-only and PASS/deferred handling do not consume budget. (Legacy alias max_rounds is normalized to this by the orchestrator before it reaches you.)
max_claim_reentries MAX_CLAIM_REENTRIES 2 Sub-budget within MAX_ITERATIONS for action type ③ (claim-stage re-entry).
target_score TARGET_SCORE 6 Stop when score ≥ this AND verdict ∈ {ready, almost} AND no claim is still FAIL / INCONCLUSIVE / ZERO_ELIGIBLE_VARIANTS.
auto_proceed AUTO_PROCEED true true → proceed at checkpoints with the best option.
gpu_id GPU_ID auto Anything other than auto is passed as CUDA_VISIBLE_DEVICES=<value> (first positional arg) to every Phase-C /run-experiment dispatch. Assert, don't assume: each runs/iteration_round_<N>/<run-id>/cost.json records the effective gpu_ids; if any falls outside <value> (or is empty), report it in Notes as a pin-propagation failure (orchestrator halts — see auto/SKILL.md "GPU pin propagation").
resume RESUME false Read REVIEW_STATE.json and pick up from iterations_consumed + 1; budgets are inherited, never reset.

Read the full file on GitHub · 100 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 First seen · 100 lines · 143 tokens per session scan A db09d361515c

Subscribe to this mod's changes

iteration is an agent published in the GitHub repository zjunlp/Mechanist (78 stars, last pushed 1mo ago), licensed MIT. It adds 143 tokens to every session and 2,824 once invoked, about $0.0006 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.

Related

Other agents, from other repositories

Salesforce Apex & Triggers Development

Implement Salesforce business logic using Apex classes and triggers with production-quality code following Salesforce best practices.

github/awesome-copilot · 26 tokens

Test Refactor Specialist

Improves test code quality and maintainability. Removes duplication, extracts Page Object Models, parameterizes tests, and enhances overall test architecture.

fugazi/test-automation-skills-agents · 32 tokens

chaos-engineer

Resilience testing, fault injection, chaos experiments specialist — Litmus, Gremlin, chaos patterns.

TheBeardedBearSAS/claude-craft · 24 tokens

spring-boot-unit-testing-expert

Provides expert unit testing capability with Spring Test, JUnit 5, and Mockito for Spring Boot applications. Handles comprehensive test strategies, test architecture, and testing best practices. Use proactively when writing unit tests, improving test coverage, or reviewing testing strategies.

giuseppe-trisciuoglio/developer-kit · 58 tokens

rn-pr-qa

Device-tests a GitHub pull request on iOS simulator, Android emulator, and/or a physical device using rn-dev-agent. Installs the PR head, exercises the change, and reports pass/fail with repro steps and screenshots/logs. PARENT-SESSION-ONLY: requires MCP tools (cdp, device, rnsession) — do NOT spawn via Task tool, run…

Lykhoyda/rn-dev-agent · 299 tokens

jira-task-runner

Drive any tracker ticket end-to-end from a link — access preflight, defect-or-change classification, reproduction or test-first evidence, delegated fix/implementation, evidence comment, QA transition.

atretyak1985/swarmery · 42 tokens