Autoresearch Agent (Autonomous Experiment Loop)
An autonomous edit–measure–keep loop that optimizes a single file against any measurable metric.
What it does
An autonomous optimization loop inspired by Karpathy's autoresearch. Give it (1) a target file, (2) an evaluation command that prints a metric, and (3) a git repo — then the agent loops indefinitely:
- Read
results.tsvhistory to see what worked and what hasn't been tried - Make exactly one change to the target file and commit it
- Run the evaluation script and read the metric
- Better → KEEP the commit; worse → DISCARD via
git reset --hard; error → log CRASH
It ships with /ar:setup, /ar:run, /ar:loop, /ar:status, /ar:resume commands, free evaluators (speed, size, memory, test pass rate, build time) and LLM-judge evaluators (headlines, prompts, copy). Every 10 runs the agent reviews patterns and updates the Strategy section of program.md so future sessions inherit what it learned.
Who it's for
- Backend/performance engineers who spend days chasing benchmark numbers
- Platform engineers shaving bundle size, build time, or Docker image weight
- Marketers and prompt engineers who want dozens of scored variants of a headline, ad, or system prompt
- Anyone who wants to leave an agent running overnight and read a dashboard in the morning
Example uses
- Cut API latency: target
src/api/search.py, metricp50_msfrompytest bench.py, 47 runs down to 185ms - Slim a frontend bundle: use the
benchmark_sizeevaluator onsize_bytesto iteratively shrink build output - Raise headline CTR: target
content/titles.mdwith thellm_judge_contentevaluator scoring 0–10, letting the agent search for higher-scoring titles
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .gemini/skills/autoresearch-agent folder from the GitHub repo alirezarezvani/claude-skills into my ~/.claude/skills/autoresearch-agent/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/alirezarezvani/claude-skills.git && mkdir -p ~/.claude/skills && cp -r claude-skills/.gemini/skills/autoresearch-agent ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and clone the repo:
git clone https://github.com/alirezarezvani/claude-skills.git - Copy the skill into Claude Code:
mkdir -p ~/.claude/skills && cp -r claude-skills/.gemini/skills/autoresearch-agent ~/.claude/skills/ - Start Claude Code inside the project you want to optimize. It must be a git repo (
git initplus an initial commit). - Commit or stash any work in progress, then create a dedicated branch:
git checkout -b autoresearch/engineering/api-speed - Ask Claude to "set up an autoresearch experiment to optimize <file> for <metric>", or run
/ar:setup. - Verify your evaluation command prints
metric_name: valueby running the--dry-runmode first. - Run
/ar:runfor a single iteration, then start/ar:loopfor autonomous mode and check progress with/ar:status.