autoresearch

autoresearch is a skill for Claude Code from gettalon/talon-plugins. It costs 43 tokens per session (1,019 once invoked), scanned A, original, MIT.

An automated loop for improving a file against a measurable goal. It edits the file, runs an experiment, checks the result, and keeps improvements or discards failures.

In plain words
What is it for?
Use it to optimize code, model training, response time, bundle size, compile time, or test coverage on a selected file.
Why use it?
It removes the need to repeat the same edit-and-test process by hand. A time limit or maximum number of experiments can control how long it runs.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths.

Part of the talon-autoresearch plugin — 1 skill 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/gettalon/talon-plugins/autoresearch
Any agent
npx skills add gettalon/talon-plugins --skill autoresearch
Clone the repo
git clone --depth 1 https://github.com/gettalon/talon-plugins

Made for: Claude Code.

Or install talon-autoresearch, the plugin that ships this one along with the rest of its 1 skill.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/gettalon/talon-plugins/autoresearch.svg)](https://agentmods.dev/skills/gettalon/talon-plugins/autoresearch)
Your own site
<a href="https://agentmods.dev/skills/gettalon/talon-plugins/autoresearch"><img src="https://agentmods.dev/badge/skills/gettalon/talon-plugins/autoresearch.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,019 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.1 $0.00043 $0.01019
Opus 5 $0.00022 $0.00509
Sonnet 5 $0.00009 $0.00204
Haiku 4.5 $0.00004 $0.00102

Measured 5d ago against content hash 22eaafe2411c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

autoresearch 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 5d 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.

plugins/autoresearch/skills/autoresearch/SKILL.md · 106 lines

How it starts

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

Autoresearch — Autonomous Experiment Loop

Inspired by Karpathy's autoresearch. Iteratively modify a target file, run an experiment, measure a metric, and keep improvements or discard failures. Runs forever until stopped.

Arguments

Parse $ARGUMENTS for:

  • <file> — The file to modify (e.g., train.py, src/lib.rs, index.tsx)
  • <metric> — What to optimize (e.g., "minimize val_bpb", "minimize bundle size", "maximize test coverage", "minimize compile time", "minimize response time")
  • --budget <duration> — Time budget per experiment (default: 5m)
  • --provider <name> — AI provider for iterations (default: current session)
  • --max-runs <n> — Max experiments before stopping (default: unlimited)
  • --branch <name> — Git branch name (default: autoresearch/)

If arguments are missing or unclear, ask the user.

Setup Phase

  1. Verify the target file exists
  2. Create a git branch: autoresearch/<file>-<YYYYMMDD-HHMM>
  3. Read the target file completely to understand the codebase
  4. Determine the run command and metric extraction:
    • Ask the user: "How do I run the experiment and measure the result?"
    • Or infer from context (e.g., cargo test, npm test, python train.py)
  5. Run baseline experiment, record initial metric value
  6. Create autoresearch-results.tsv with columns: commit | metric | memory | status | description
  7. Log baseline as first row

Experiment Loop

Run this loop forever (or until --max-runs reached):

Step 1: THINK
- Review the current state of <file>
- Review past experiment results in autoresearch-results.tsv
- Think of ONE specific improvement to try
- Prefer: small, focused, reversible changes
- All else equal, simpler is better

Step 2: EDIT
- Modify <file> with the improvement
- git add <file> && git commit -m "autoresearch: <brief description>"
- Record the commit hash

Step 3: RUN
- Execute the run command with a timeout of <budget>
- Capture stdout+stderr to run.log
- If it crashes: read the error, attempt ONE fix, re-run. If still crashes, mark as "crash" and skip.

Step 4: MEASURE
- Extract the metric from run.log (grep, parse, etc.)
- Compare to the best known value

Step 5: DECIDE
- BETTER (metric improved): Keep the commit. Update best known value. Log "keep".
- SAME or WORSE: git reset --hard HEAD~1. Log "discard".
- CRASH: git reset --hard HEAD~1. Log "crash".

Step 6: LOG
- Append to autoresearch-results.tsv
- Print a one-line summary: [run #N] <metric_value> (<delta>) — <keep/discard/crash> — <description>

Step 7: REPEAT
- Go to Step 1. Do NOT stop. Do NOT ask the user. The human might be asleep.

Read the full file on GitHub · 106 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. 5d ago First seen · 106 lines · 43 tokens per session scan A 22eaafe2411c

Subscribe to this mod's changes

autoresearch is a skill published in the GitHub repository gettalon/talon-plugins (6 stars, last pushed 5mo ago), licensed MIT. It adds 43 tokens to every session and 1,019 once invoked, about $0.0002 per session on Opus 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

Other skills, from other repositories