Set up, resume, inspect, or pause a measured experiment loop in Claude Code or Codex.

MITAuto-check passedAgent Workflows

Install Autoresearch

skills CLI
$ npx skills add drivelineresearch/autoresearch-claude-code --skill autoresearch -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install drivelineresearch/autoresearch-claude-code autoresearch --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/drivelineresearch/autoresearch-claude-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/autoresearch .claude/skills/autoresearch && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
autoresearch
GitHub stars
346
Token cost
~2.8k tokens
SKILL.md length
1,405 words
Files
6 (incl. scripts, references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Set up, resume, inspect, or pause a measured experiment loop in Claude Code or Codex.

  • Works in 7 steps: Establish the goal, benchmark command,… → Inspect git status, including untracked… → Read the workload. Write autoresearch.md… → …
  • Asked to run autoresearch
  • SKILL.md covers Host and mode, Setup, Run one experiment and State, logging, and reporting
  • Runs Python and Shell scripts from its folder; calls git and python3

What it does

Autoresearch is an agent skill from drivelineresearch/autoresearch-claude-code. Set up, resume, inspect, or pause a measured experiment loop in Claude Code or Codex. Use when asked to run autoresearch or iteratively optimize a named benchmark. Reviewing this plugin alone does not start an experiment loop.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `references/codex.md`, `references/state.md` and `scripts/ar-log.sh`).

It sits in Agent Workflows, covering Autonomous loops. The repository describes itself as: Autonomous experiment loop skill for Claude Code — port of pi-autoresearch. The licence is MIT.

When your agent uses it

  • Asked to run autoresearch
  • Iteratively optimize a named benchmark

Example prompts

  • “/autoresearch”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Establish the goal, benchmark command, primary metric and direction, exact files
  2. Inspect git status, including untracked files and the index. Use an experiment
  3. Read the workload. Write autoresearch.md using the outline below and create
  4. Lock the evaluation definition before optimization. Record scorer hashes,
  5. Validate the harness with an appropriate trivial/input-independent control.
  6. Initialize the state with the measured floor, then log the baseline as the first
  7. Continue until a budget, target, user pause, or a real execution failure prevents

What it can do on your machine

Read from SKILL.md and the folder at commit e05758f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python and Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Autoresearch loads about 2.8k tokens when it runs, and up to ~5.6k if it reads all its reference files. Until then it costs about 60 tokens; SKILL.md has 1,405 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from drivelineresearch/autoresearch-claude-code at commit e05758f, republished under its MIT licence (© drivelineresearch). 1,405 words, ~2,849 tokens.

Download SKILL.mdSave it as .claude/skills/autoresearch/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
autoresearch
description
Set up, resume, inspect, or pause a measured experiment loop in Claude Code or Codex. Use when asked to run autoresearch or iteratively optimize a named benchmark. Reviewing this plugin alone does not start an experiment loop.

Autoresearch

Try a scoped change, measure it against a fixed benchmark, keep a supported improvement, and record what happened. Continue within the user's authorization and a finite budget. User interruptions and scope changes take precedence over continuation instructions.

Host and mode

Resolve AR_SCRIPTS to the scripts directory alongside this skill's actual file. The helpers require Python 3.10+; Bash wrappers and locking support Linux/macOS.

  • Claude Code: invoke /autoresearch for manual installation, or /autoresearch:autoresearch when loaded as a plugin. The four registered Claude hooks handle continuation and compaction. Complete one experiment per turn.
  • Codex: invoke $autoresearch in CLI/IDE, or select this skill in the app. Use the same protocol with Codex's available read/edit/exec tools. This package's Claude hook registration does not install Codex hooks. For unattended continuation, use scripts/codex_loop.py as described in references/codex.md. A supervisor turn must complete exactly one experiment and then end. Never nest a supervisor inside a supervised turn.
  • Status: read state/dashboard/worklog and report; run no experiments and do not unpause. python3 "$AR_SCRIPTS/ar_state.py" status is a read-only status command.
  • Report: write autoresearch-report.md with objective, baseline, best, winning changes, evidence limitations, failures, and remaining ideas; run no experiments.
  • Off/pause: create .autoresearch-off and stop. During a running benchmark, cancel safely if possible; preserve partial work and report any unfinished process.

For Claude status/report turns in an active experiment, first create .autoresearch-inspect in the experiment workspace, including when this skill was loaded directly. The Stop hook consumes it to let the inspection turn end. For status, this control-file write is the only write; it does not log or run an experiment. Codex status remains read-only and creates no inspection sentinel.

Setup

  1. Establish the goal, benchmark command, primary metric and direction, exact files in scope, fixed scorer/data/splits, correctness checks, and budget. Infer these from the request when possible. Authorization to optimize code does not imply permission to push, deploy, contact people, install dependencies, or rent compute.
  2. Inspect git status, including untracked files and the index. Use an experiment branch in a clean dedicated worktree when other work is present; preserve that work without stashing or cleaning it away. Require a committed starting point.
  3. Read the workload. Write autoresearch.md using the outline below and create experiments/worklog.md. Prepare autoresearch.sh and, when needed, checks.sh. Commit only explicitly selected initial code/harness files; keep session artifacts local. Check ignores in the target repository: this plugin's .gitignore is not inherited by another project. Add anchored artifact patterns to that project's local git exclude file (locate it with git rev-parse --git-path info/exclude): /autoresearch.jsonl, /autoresearch.md, /autoresearch-dashboard.md, /autoresearch-report.md, /autoresearch.ideas.md, /experiments/, /.autoresearch-off, /.autoresearch-inspect, /.autoresearch.jsonl.lock, /.autoresearch-codex.lock. Preserve existing excludes. Track the benchmark or explicitly ignore /autoresearch.sh if it is session-local.
  4. Lock the evaluation definition before optimization. Record scorer hashes, dataset/split identity, dependencies, command, seed schedule, and hardware where relevant. Keep benchmark and metric-emitting code outside editable scope. A legitimate scorer fix requires a new segment and a new baseline.
  5. Validate the harness with an appropriate trivial/input-independent control. Run the unchanged baseline 3–5 times to estimate noise. Hold evaluation data and folds fixed; vary only training seeds or repeat timing measurements. Record the raw values, mean, and sample standard deviation. A zero measured deviation is not proof of zero uncertainty.
  6. Initialize the state with the measured floor, then log the baseline as the first keep (an unchanged baseline need not create an empty commit). Use a finite maxRuns (default 200), and a practical wall-time budget. Setup/calibration runs are outside the logged experiment count: record and budget them separately.
  7. Continue until a budget, target, user pause, or a real execution failure prevents progress. On failure, preserve evidence, pause, and explain the blocker.
Session outline: autoresearch.md
markdown
# Autoresearch: <goal>
## Objective
Workload, expected outcome, and what was learned from initial inspection.
## Metrics
Primary name/unit/direction, secondary metrics, measured noise floor and seed values.
## Budget
maxRuns, maxSeconds, optional targetMetric, per-benchmark timeout, setup cost.
## How to Run
Exact benchmark/check commands, working directory, runtime and dependencies.
## Files in Scope
Exact files the experiment may edit.
## Off Limits
Scorer, metric code, data, split/seed definition; record hashes/identity here.
## Constraints
Correctness requirements, resource/network limits, and allowed actions.
## What's Been Tried
Results, failed ideas, insights, and next candidates. Update every 5–10 runs.

Run one experiment

  1. Read the current segment, best kept result, session rules, and recent worklog. Check the budget before launching. Do not reset a budget to continue.
  2. Record starting HEAD and clean status. Choose one hypothesis and its precise editable file list; keep scorer and evaluation data fixed. Use diverse drafts before refining a promising approach. Cap debugging one idea at three attempts.
  3. Run the benchmark with a timeout and a unique log file. Capture stdout and stderr separately; parse METRIC name=number from stdout only. Check exit status even when a metric was printed. Reject missing, duplicate, or non-finite primary metrics. A failing benchmark is crash; passing benchmark plus failing checks is checks_failed. Both consume a run.
  4. Inspect only metric lines and bounded log excerpts; keep full output on disk. Do not use a shared /tmp/autoresearch-output.txt or parse tee's exit status as the benchmark status. Use Python's monotonic clock or an available timeout tool; GNU date +%s%N and timeout are not portable to stock macOS.
  5. Verify locked files against the initial hashes before accepting or committing a result, including ignored harness files. An instruction to lock a harness is not an access-control boundary. The Codex supervisor checks configured hashes between turns; inspect a detected violation and re-baseline before trusting it.
  6. Apply the decision rule, keep or restore the experiment's scoped changes, then append exactly one result and update the dashboard/worklog. Complete cleanup before ending a supervisor turn.
Show full SKILL.md (556 more words)Show less
Decision rule
  • keep: a finite primary metric beats the current best by strictly more than noiseFloor in the right direction, and correctness checks pass.
  • discard: worse, equal, or an improvement less than or equal to the floor.
  • crash: failed/timed-out benchmark or invalid/missing primary metric; use metric 0 as a placeholder. This value is never eligible as a best result.
  • checks_failed: benchmark passed but a correctness check failed; cannot be kept.

Compare means over the same seed schedule for a borderline improvement (within about 2× the floor), rerunning both incumbent and candidate when needed. Log n_seeds and the measured mean. A noise threshold is a practical heuristic, not a significance guarantee across hundreds of adaptive trials. Equal-performance code simplification requires a separately declared objective/acceptance rule, not an exception silently applied to this metric contract.

For ML, fit imputation, scaling, feature selection, and early stopping exclusively inside training folds. Fix groups/splits before searching. Use validation for selection; reserve a final untouched test set. Repeated test-set monitoring that steers subsequent ideas also leaks information. Changing sample aggregation, CV folds, or the target definition starts a new segment; scores across these changes are not measured improvements under one benchmark.

Git operations

Never stage the entire repository or restore/clean the entire working tree. Inspect the diff and index. On a keep, stage only the explicit experiment files using git add -- <files>, check git diff --cached, and commit with a description and a valid Result: {...} JSON trailer. Record the resulting HEAD hash.

On discard/crash/checks_failed, use git restore --source=<starting-HEAD> -- <tracked-experiment-files> and remove only exact untracked files created by this experiment after inspecting those paths. Preserve pre-existing files and artifacts. Do not use blanket git checkout -- ., git clean, or git reset --hard. If ownership is unclear, pause with the diff intact. Record starting HEAD for discarded results.

Backtracking requires a clean experiment workspace and an explicit recorded parent; restore the intended scoped code from that parent. Compare against the segment's best metric, and leave the best code in place when pausing. Do not silently detach HEAD or change branches under the Codex supervisor.

State, logging, and reporting

Read references/state.md for config/result schemas and helper commands. autoresearch.jsonl is the authoritative append-only logical history. The helper validates the entire history and atomically replaces it under a lock; never hand-build JSON or overwrite prior segments. A malformed state is a reason to pause and repair from evidence, not to silently skip rows or restart the count.

After each result, update autoresearch-dashboard.md with the current segment's run budget, status counts, baseline/best, floor, and a table of all current segment runs (run, commit, metric, delta, status, description). Flag undefined percentages when the baseline is zero; avoid interpreting R² ratios as accuracy.

Append a worklog entry containing run/time, hypothesis, exact change, metrics, keep/discard explanation, log path, insight, and next idea. Refresh the session summary and autoresearch.ideas.md periodically. At a boundary, summarize verified results, remaining budget, and partial work. An empty ideas file does not prove research is complete.

On resume, read session, state, worklog, and git status/log first. Reconcile any unlogged benchmark, unfinished diff, or commit-without-result before another run; do not fabricate missing results or blindly repeat a possibly completed job. Remove .autoresearch-off only for an explicit resume within the current budget. An exhausted budget requires the user's extension or a deliberately new experiment contract, not merely removing the sentinel.

© drivelineresearch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in skills/autoresearch of drivelineresearch/autoresearch-claude-code.

  • SKILL.md
  • references/codex.md
  • references/state.md
  • scripts/ar-log.sh
  • scripts/ar_state.py
  • scripts/codex_loop.py

Open the folder on GitHubat commit e05758f

Compare with similar skills

Autoresearch next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Autoresearch compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Autoresearch this skilldrivelineresearch/autoresearch-claude-code346—~2.8kAutomated safety check: PassMIT
Show Me Your Work Decision Logcursor/plugins11k8 repos~1.6kAutomated safety check: PassNone
Autoresearch Iteration Loopuditgoenka/autoresearch6.5k1 repos~2kAutomated safety check: PassMIT
Install Loop Engineeringcobusgreyling/loop-engineering11k1 repos~648Automated safety check: PassMIT
LoopyForward-Future/loopy3.2k—~3.9kAutomated safety check: PassMIT
AI Performance Improvement Plantanweai/pua20k2 repos~6.9kAutomated safety check: PassMIT

Similar skills

  • Official

    Keeps a TSV decision log for long or unattended agent runs, one row per decision with what, why, evidence and result, so a reviewer can check the work later.

    11k GitHub starsUsed in 8 repos~1.6k tokens
    Agent WorkflowsAuto-check passed
  • Autoresearch Iteration Loop

    uditgoenka/autoresearch

    Runs an autonomous modify, verify, keep-or-discard loop against any metric, with subcommands for planning, debugging, fixing, security audits, shipping and more.

    6.5k GitHub starsUsed in 1 repo~2k tokens
    Agent WorkflowsAuto-check passed
  • Install Loop Engineering

    cobusgreyling/loop-engineering

    Installs Loop Engineering into a project through the single @cobusgreyling/loop CLI, scaffolding a report-only loop and a readiness score.

    11k GitHub starsUsed in 1 repo~648 tokens
    Agent WorkflowsAuto-check passed
  • Loopy

    Forward-Future/loopy

    Discover, find, compare, audit, repair, adapt, craft, run, debrief, save, and prepare repeatable AI-agent loops for publication.

    3.2k GitHub stars~3.9k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Pushes an agent to exhaust every option, investigate before asking and take initiative beyond the literal request, instead of giving up or waiting passively.

    20k GitHub starsUsed in 2 repos~6.9k tokens
    Agent WorkflowsAuto-check passed
  • LoopX Self Repair

    loopx-project/loopx

    Diagnoses surprising LoopX behavior, such as stale recommendations or tiny progress, assigns it to the responsible layer and repairs it at the lowest durable level.

    6.2k GitHub stars~2.2k tokensUpdated today
    Agent WorkflowsAuto-check passed

Categories

Questions about Autoresearch

What does Autoresearch do?

Set up, resume, inspect, or pause a measured experiment loop in Claude Code or Codex. Autoresearch is an agent skill from drivelineresearch/autoresearch-claude-code. Set up, resume, inspect, or pause a measured experiment loop in Claude Code or Codex.

When should I use Autoresearch?

Autoresearch fits situations like: asked to run autoresearch; iteratively optimize a named benchmark.

How do I install Autoresearch in Claude Code?

Run `npx skills add drivelineresearch/autoresearch-claude-code --skill autoresearch -a claude-code`. Or copy the skill folder (skills/autoresearch in drivelineresearch/autoresearch-claude-code) into .claude/skills/autoresearch in your project. Claude Code loads it when a task matches its description.

How do I install Autoresearch in Codex?

Run `npx skills add drivelineresearch/autoresearch-claude-code --skill autoresearch -a codex`. Or copy the skill folder (skills/autoresearch in drivelineresearch/autoresearch-claude-code) into .agents/skills/autoresearch in your project. Codex loads it when a task matches its description.

Can I use Autoresearch in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add drivelineresearch/autoresearch-claude-code --skill autoresearch -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/autoresearch, .gemini/skills/autoresearch, .github/skills/autoresearch and .opencode/skills/autoresearch in your project.

What does Autoresearch need to run?

Going by SKILL.md and its folder, Autoresearch needs Python and a shell for the scripts in its folder and the command-line tools its instructions call (git and python3). Our summary lists: Python 3; A Bash shell.

Does Autoresearch access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Autoresearch safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Autoresearch use?

Autoresearch is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Autoresearch use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.7k tokens, read only when the agent opens those files.

What are the alternatives to Autoresearch?

Skills that share tags, products or a category with Autoresearch: Show Me Your Work Decision Log (cursor/plugins, 11k stars), Autoresearch Iteration Loop (uditgoenka/autoresearch, 6.5k stars), Install Loop Engineering (cobusgreyling/loop-engineering, 11k stars) and Loopy (Forward-Future/loopy, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Autoresearch?

drivelineresearch (a GitHub organization) maintains it in drivelineresearch/autoresearch-claude-code, which has 346 GitHub stars. The repository was last updated on September 7, 2026.

Source: drivelineresearch/autoresearch-claude-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.