autoresearch_iterate

autoresearch_iterate is a command for Claude Code, OpenCode from WdBlink/autoresearch-paper. It costs 20 tokens per session (1,637 once invoked), scanned C, a copy of autoresearch:iterate, MIT.

An experiment loop that changes code, runs a command that produces a number, and keeps or discards each change based on that measurement. An optional guard command can check that a required condition still passes.

In plain words
What is it for?
Use it to optimise a measurable goal such as speed, size, or an error count within selected files. It can try several branches during a round and run checkpoint evaluations.
Why use it?
It removes the need to manually repeat small improvement experiments and compare results. It also helps avoid keeping a change that improves one measure while breaking a required safety check.

Command for Claude CodeOpenCode

Written for Claude Code and OpenCode: disable-model-invocation in frontmatter, but also installed under .opencode/.

Good fit Use it to optimise a measurable goal such as speed, size, or an error count within selected files. It can try several branches during a round and run checkpoint evaluations.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/wdblink/autoresearch-paper/autoresearch_iterate
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/WdBlink/autoresearch-paper

Made for: Claude Code, OpenCode.

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 autoresearch_iterate

README.md
[![agentmods](https://agentmods.dev/badge/commands/wdblink/autoresearch-paper/autoresearch_iterate/github.svg)](https://agentmods.dev/commands/wdblink/autoresearch-paper/autoresearch_iterate)
Your own site
<a href="https://agentmods.dev/commands/wdblink/autoresearch-paper/autoresearch_iterate"><img src="https://agentmods.dev/badge/commands/wdblink/autoresearch-paper/autoresearch_iterate/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 autoresearch_iterate

Your own site · 80×15
<a href="https://agentmods.dev/commands/wdblink/autoresearch-paper/autoresearch_iterate"><img src="https://agentmods.dev/badge/commands/wdblink/autoresearch-paper/autoresearch_iterate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,637 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 98% copy Near-identical to another mod 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.00020 $0.01637
Opus 5.5 $0.00008 $0.00655
Sonnet 5.5 $0.00004 $0.00327
Haiku 4.5 $0.00002 $0.00164

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

Security

Grade C, and why

autoresearch_iterate scanned grade C with 2 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 3d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

Before first dry-run, screen Verify command for: rm -rf, fork bombs, curl|sh, embedded credentials, outbound writes. Block dangerous commands.

Makes network callslowCapability

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

Before first dry-run, screen Verify command for: rm -rf, fork bombs, curl|sh, embedded credentials, outbound writes. Block dangerous commands.
Origin

This is a copy

98% identical to autoresearch:iterate — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.opencode/commands/autoresearch_iterate.md · 131 lines

How it starts

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

EXECUTE IMMEDIATELY — do not deliberate before reading this protocol.

Parse Arguments

Extract from $ARGUMENTS:

  • Goal: — what to improve
  • Scope: or --scope — file globs
  • Metric: — what to measure
  • Direction: — higher_is_better (default) or lower_is_better
  • Verify: — shell command that outputs a number
  • Guard: — optional safety command (must always pass)
  • Iterations: or --iterations — integer N for bounded mode (default: 25). "unlimited" for unbounded.
  • --evals — enable mid-loop checkpoints
  • --evals-interval N — checkpoint frequency override
  • --chain <targets> — comma-separated downstream commands
  • --no-fork — disable fork-and-flush rounds
  • Forks: K — branches per fork-and-flush round (default 4)
  • Guided: R — fraction of each round's branches that get an Advisor-assigned experiment (default 0.5); the rest are random

Setup (if required context missing)

If Goal, Scope, Metric, or Verify missing → use question (single batched call): Q1 (Goal): "What do you want to improve?" Q2 (Scope): "Which files?" — suggest globs from project Q3 (Metric+Verify): "How to measure? Provide a shell command that outputs a number" Q4 (Guard): "Safety command that must always pass?" — options: test cmd, build cmd, skip If ALL provided inline → skip setup, proceed directly.

Conditional Performance Reference

If Goal or Metric targets performance, latency, throughput, runtime, CPU, memory, allocations, binary size, power, energy, bandwidth, or compute cost, read references/behavior-preserving-optimization.md in the autoresearch skill directory before establishing the baseline. Apply its exploration/confirmation split: a metric-improving keep is an exploratory incumbent, not proof that behavior is preserved.

Precondition Checks

  1. Verify git repo exists (git rev-parse --git-dir)
  2. Check clean working tree (git status --porcelain) — warn if dirty
  3. Check for stale lock files, detached HEAD
  4. If Guard set → run Guard to establish guard baseline
  5. Fail fast on any critical issue. Warn on non-critical.

Read the full file on GitHub · 131 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. 3d ago First seen · 131 lines · 20 tokens per session scan C 9507aa524967

Subscribe to this mod's changes

autoresearch_iterate is a command published in the GitHub repository WdBlink/autoresearch-paper (2 stars, last pushed 4d ago), licensed MIT. It adds 20 tokens to every session and 1,637 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). It is 98% identical to autoresearch:iterate, differing in 4 lines, and is treated as a copy.

Related

autoresearch_iterate compared with commands from other repositories

autoresearch_iterate next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
autoresearch_iterateWdBlink/autoresearch-paperCommand24d agoMITC20Claude Code, OpenCode
ars-planImbad0202/academic-research-skillsCommand56kyesterdaynoneA19Claude Code
ars-revision-coachImbad0202/academic-research-skills-codexCommand14k5d agononeA27Claude Code
ars-3wImbad0202/academic-research-skills-codexCommand14k5d agononeA24Claude Code
nextProjectDXAI/labratCommand2373mo agoMITA0Claude Code
ja-fallbackZaious/journal-atlasCommand210d agononeA37Claude Code
ai-reviewStill-chowline394/MagicTeX-mcpCommand01mo agoAGPL-3.0A13Claude Code