autoresearch · factory-ai — Claude Code skill: what it does, how to install
The autoresearch skill runs repeated code experiments against a measurable target. Use it for tuning tests, builds, bundle size, or ML training results.
no license 137 installs ★ 129 updated 2026-10-25
npx skills add Factory-AI/factory-plugins --skill autoresearch -a claude-codeWhat autoresearch does
autoresearch sets up a repeatable optimization session around a command and a named metric. The agent changes files in scope, runs the measurement, compares the result with the current best, and keeps or reverts the change. It also supports a termination rule such as an experiment count, time budget, target value, or interruption.
The setup uses a Git branch plus autoresearch.md, autoresearch.sh, and autoresearch.jsonl. An optional autoresearch.checks.sh handles required tests or type checks. The log records experiment outcomes, while MAD-based confidence scoring helps assess noisy measurements. The loop cannot start without a measurable metric.
What it helps with
- define a measurable optimization target
- record a baseline with
autoresearch.sh - compare trials against the current best result
- revert changes that worsen the metric
- keep hypotheses and outcomes in JSONL
Example prompts for the agent
- Set up autoresearch to reduce the runtime reported by
pnpm testand limit the editable files. - Create
autoresearch.sh, measure the baseline, and log it inautoresearch.jsonl. - Run another experiment, compare its metric with the best result, and revert the change if it regresses.
How to install autoresearch
1Skills CLI (Vercel)
npx skills add Factory-AI/factory-plugins --skill autoresearch -a claude-code2Manually: put the files in place
~/.claude/skills/autoresearch/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/autoresearch/
1Skills CLI (Vercel)
npx skills add Factory-AI/factory-plugins --skill autoresearch -a codex2Manually: put the files in place
.agents/skills/autoresearch/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Factory-AI/factory-plugins --skill autoresearch -a cursor2Manually: put the files in place
.cursor/skills/autoresearch/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Factory-AI/factory-plugins plugins/autoresearch/skills/autoresearch2Manually: put the files in place
.github/skills/autoresearch/SKILL.md1Skills CLI (Vercel)
npx skills add Factory-AI/factory-plugins --skill autoresearch -a gemini-cli2Platform CLI
gemini skills install https://github.com/Factory-AI/factory-plugins --path plugins/autoresearch/skills/autoresearchManually: put the files in place
.devin/skills/autoresearch/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Factory-AI/factory-plugins --skill autoresearch -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about autoresearch
How do I install autoresearch in Claude Code?
Run npx skills add Factory-AI/factory-plugins --skill autoresearch -a claude-code, then check ~/.claude/skills/autoresearch/SKILL.md.
What does autoresearch do?
It structures an optimization loop around code edits and measurements. Successful changes stay in the branch, while regressions are reverted and recorded.
Which files does the experiment setup create?
The core files are autoresearch.md, autoresearch.sh, and autoresearch.jsonl. Add autoresearch.checks.sh when tests or type checks are part of the constraints.
Similar skills
All skills for Agent setup: memory, context, orchestration →autoresearch by other authors comes first.