auto-iteration-loop

auto-iteration-loop is a skill for Claude Code, Codex from zjunlp/Mechanist. It costs 114 tokens per session (19,489 once invoked), scanned B, original, MIT.

An automated review-and-fix loop for research claims. It uses results such as pass, fail, inconclusive, or no eligible variants to decide what should be checked or changed next.

In plain words
What is it for?
Use it after claim verification to repair experiment variants, main experiment scripts, or claim wording, then run the relevant checks again.
Why use it?
It prevents unresolved experiment problems from being ignored and limits repeated fixes to a defined number of iterations.

Skill for Claude CodeCodex

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

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/zjunlp/mechanist/auto-iteration-loop
Any agent
npx skills add zjunlp/Mechanist --skill auto-iteration-loop
Clone the repo
git clone --depth 1 https://github.com/zjunlp/Mechanist

Made for: Claude Code, Codex.

Or install mechanist, the plugin that ships this one along with the rest of its 54 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 auto-iteration-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/zjunlp/mechanist/auto-iteration-loop.svg)](https://agentmods.dev/skills/zjunlp/mechanist/auto-iteration-loop)
Your own site
<a href="https://agentmods.dev/skills/zjunlp/mechanist/auto-iteration-loop"><img src="https://agentmods.dev/badge/skills/zjunlp/mechanist/auto-iteration-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 19,489 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 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.00114 $0.19489
Opus 5 $0.00057 $0.09745
Sonnet 5 $0.00023 $0.03898
Haiku 4.5 $0.00011 $0.01949

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

Security

Grade B, and why

auto-iteration-loop scanned grade B with 3 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 4d 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.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

2. **User MCP config** — `~/.claude/settings.json`, same field.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Reads MCP configurationlowAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

1. **Project MCP config** — `${PROJECT_ROOT}/.mcp.json`, field `mcpServers["llm-chat"].env.{LLM_MODEL,LLM_BASE_URL,LLM_API_KEY}`.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

**Fallback: curl**
skills/auto-iteration-loop/SKILL.md · 849 lines

How it starts

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

Auto Iteration Loop: Adversarial Review with Bounded Back-Edges

Autonomously iterate over /auto-verify's per-claim verdicts: review → implement fixes (variant-integrity, main-experiment-script, or claim-stage rewrite) → re-review, until the external reviewer gives a positive assessment with all FAIL / INCONCLUSIVE / ZERO_ELIGIBLE_VARIANTS claims resolved, or the iteration budget is exhausted.

Context: $ARGUMENTS

Constants

  • MAX_ITERATIONS = 6 — Hard upper bound on total back-edge actions across the whole loop. Each of the following consumes 1 iteration, regardless of which Phase A→E cycle they fall in:

    • ① variant-only fix → re-run /auto-verify <claim-id> — resume: true
    • ② main-experiment-script / EXPERIMENT_PLAN.md fix → re-run /auto-experiment (optionally followed by /auto-verify chain)
    • ③ claim-stage re-entry → rewrite claim (full /auto-claim invocation OR lightweight in-loop rewrite) → re-run downstream stages

    Pure reviewer cycles that change nothing on disk (no new experiments, no claim changes) do not consume iterations. PASS-claim consistency checks and deferred-claim recording do not consume iterations. New claims produced by ③ inherit the same budget — they do not get a fresh MAX_ITERATIONS of their own. Override via MAX_ITERATIONS: arg from agents/iteration.md.

    Resource-Fidelity invariant (all back-edges). If refine-logs/FINAL_PROPOSAL.md / refine-logs/EXPERIMENT_PLAN.md carry a resource_fidelity: strict marker (the reproduction combination — behavior-source:given + mechanism:given), every back-edge MUST preserve it: when editing EXPERIMENT_PLAN.md (type ②) or any claim rewrite (type ③), keep the top-of-file resource_fidelity: line verbatim — never drop, comment out, or change it. Dropping the marker silently disables the harness, re-opening the door to smaller-model swaps and data subsetting the harness exists to prevent. For type-③ full re-entry, detect the original run's axes from idea-stage/IDEA_REPORT.md's **Behavior-source**: / **Mechanism**: headers (or directly from the resource_fidelity: strict marker) and pass both behavior_source and mechanism into the queued auto-claim call so a reproduction-combo re-entry stays given+given (the new run re-stamps the resource_fidelity: strict marker automatically — it is marker-driven, not a flag).

Read the full file on GitHub · 849 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. 4d ago First seen · 849 lines · 114 tokens per session scan B cee822a43389

Subscribe to this mod's changes

auto-iteration-loop is a skill published in the GitHub repository zjunlp/Mechanist (51 stars, last pushed 8d ago), licensed MIT. It adds 114 tokens to every session and 19,489 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 3 findings (reads agent configuration directories, reads mcp configuration, makes network calls). 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

create-atomic-tool

Build a BaseTool[InSchema, OutSchema] subclass — input/output schemas, BaseToolConfig, run() (and optional runasync()), env-driven secrets, typed failure outputs. Use when the user asks to "add a tool", "create a tool", "wrap an API as a tool", "build a BaseTool", "make a calculator/search/weather tool", or runs…

Eigenwise/atomic-agents · 99 tokens

framework

Guide for the Atomic Agents Python framework — schemas, agents, tools, context providers, prompts, orchestration, and provider configuration. Use when code imports from atomicagents, defines an AtomicAgent, BaseTool, or BaseIOSchema, or the user asks about multi-agent orchestration or LLM-provider wiring in an…

Eigenwise/atomic-agents · 74 tokens

create-atomic-agent

Build and wire an AtomicAgent[InSchema, OutSchema] — schemas, AgentConfig, SystemPromptGenerator, provider client, history, hooks, optional context providers. Use when the user asks to "create an agent", "add another agent", "build an AtomicAgent", "wire up an agent", "make a planner/router/extractor agent", or runs…

Eigenwise/atomic-agents · 93 tokens

create-atomic-context-provider

Build a BaseDynamicContextProvider that injects a named, titled block into an agent's system prompt at every run() — current time, user identity, retrieved RAG docs, session state, cached DB schema. Use when the user asks to "add a context provider", "inject X into the prompt", "give the agent dynamic context", "wire…

Eigenwise/atomic-agents · 106 tokens

create-atomic-schema

Design and write a BaseIOSchema input/output pair for an Atomic Agents agent or tool — docstrings, field descriptions, validators, error variants. Use when the user asks to "create a schema", "design the input/output schema", "define an IOSchema", "write a BaseIOSchema", "model the agent's output", or runs…

Eigenwise/atomic-agents · 89 tokens

new-app

Scaffold a new Atomic Agents project from scratch — create the directory, pyproject.toml, env file, first agent, and a runnable entry point. Use when the user asks to start a new atomic-agents project from scratch, says "scaffold" / "new project" / "start from zero", or runs /atomic-agents:new-app.

Eigenwise/atomic-agents · 76 tokens