
Autoresearch Setup
Sets up and runs an autonomous experiment loop for any optimization target.
Install
npx skills add davebcn87/pi-autoresearch --skill autoresearch-create -g -a claude-code -y- Repository
- davebcn87/pi-autoresearch8.2k
- Category
- AI and agents
- Updated
- 28d ago
- License
- MIT
- Context cost
- Mediumabout 2,198 tokens
- Runs scripts
- No, instructions only
What it does
Set up and run an autonomous experiment loop for any optimization target. Gathers what to optimize, then starts the loop immediately. Use when asked to "run autoresearch", "optimize X in a loop", "set up autoresearch for X", or "start experiments".
Autoresearch
Autonomous experiment loop: try ideas, keep what works, discard what doesn't, never stop.
Tools
init_experiment, configure session (name, metric, unit, direction). Call again to re-initialize with a new baseline when the optimization target changes.run_experiment, runs command, times it, captures output.log_experiment, records result.keepauto-commits.discard/crash/checks_failedauto-reverts code changes (autoresearch files preserved). Always include secondarymetricsdict. Dashboard: ctrl+shift+t.
Session files
All session files live in a single .auto/ subfolder at the working directory root. This keeps everything in one place, easy to preserve across reverts, gitignore, and clean up.
| File | Purpose |
|---|---|
.auto/prompt.md | Experiment prompt / playbook (heart of the session) |
.auto/measure.sh | Benchmark script, emits METRIC name=value lines |
.auto/log.jsonl | Append-only result log (written by the tools) |
.auto/ideas.md | Ideas backlog (optional) |
.auto/checks.sh | Correctness checks (optional) |
.auto/config.json | Session config (optional) |
.auto/hooks/{before,after}.sh | Lifecycle hooks (optional) |
Always create files in the
.auto/layout. Legacy flatautoresearch.*files are still read for in-flight sessions, but new sessions should use.auto/.
Setup
- Ask (or infer): Goal, Command, Metric (+ direction), Files in scope, Constraints.
git checkout -b autoresearch/<goal>-<date>- Read the source files. Understand the workload deeply before writing anything.
mkdir -p .auto, then write.auto/prompt.mdand.auto/measure.sh(see below). Commit both.init_experiment→ run baseline →log_experiment→ start looping immediately.

