autoresearch-create
What it does
This skill sets up a repeating test-and-improve cycle for a goal you choose, such as speed or size. It is for people who want their AI to keep trying small changes and measuring the results.
When to use it
- βWhen you want to optimize something, such as how fast a program runs, by trying many changes.
- βWhen you ask your AI to run autoresearch or start experiments on a target.
- βWhen you want measured results kept in a log rather than guesses.
Skill link
https://github.com/davebcn87/pi-autoresearch/blob/main/skills/autoresearch-create/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βSet up autoresearch to make my sorting function run faster, and keep going while it keeps improving.β
5 new skills a week. 1 minute to read.
How it works
The skill first asks what to measure, then saves a plan and a measuring script in a folder named .auto. It runs each idea, logs the result, keeps improvements and reverts failed tries.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
.auto/prompt.md
This is the heart of the session. A fresh agent with no context should be able to read this file and run the loop effectively. Invest time making it excellent.
# Autoresearch: <goal>
## Objective
<Specific description of what we're optimizing and the workload.>
## Metrics
- **Primary**: <name> (<unit>, lower/higher is better) β the optimization target
- **Secondary**: <name>, <name>, ... β independent tradeoff monitors
## How to Run
`./.auto/measure.sh` β outputs `METRIC name=number` lines.
## Files in Scope
<Every file the agent may modify, with a brief note on what it does.>
## Off Limits
<What must NOT be touched.>
## Constraints
<Hard rules: tests must pass, no new deps, etc.>
## What's Been Tried
<Update this section as experiments accumulate. Note key wins, architectural
insights, and discarded ideas: why they failed and what would justify revisiting them.>
Update .auto/prompt.md periodically β especially the "What's Been Tried" section β so resuming agents have full context.
.auto/measure.sh
Bash script (set -euo pipefail) that: pre-checks fast (syntax errors in <1s), runs the benchmark, and outputs structured lines to stdout. Keep the script fast β every second is multiplied by hundreds of runs.
For fast, noisy benchmarks (< 5s), run the workload multiple times inside the script and report the median. This produces stable data points and makes the confidence score reliable from the start. Slow workloads (ML training, large builds) don't need this β single runs are fine.
Structured output
METRIC name=valueβ primary metric (must matchinit_experiment'smetric_name) and any secondary metrics. Parsed automatically byrun_experiment.
Design the script to inform optimization
The script should output whatever data helps you make better decisions in the next iteration. Think about what you'll need to see after each run to know where to focus:
- Phase timings when the workload has distinct stages
- Error counts, failure categories, or test names when checks can fail in different ways
- Memory usage, cache hit rates, or other runtime diagnostics when relevant
- Anything domain-specific that would help localize regressions or identify bottlenecks
The script runs the same code every iteration β but you can update it during the loop if you discover you need more signal. Add instrumentation as you learn what matters.
Agent-supplied ASI via log_experiment
Use log_experiment's asi parameter to annotate each run with whatever would help the next iteration make a better decision. Free-form key/value pairs β you de
FAQ
What do I need to give it to start?
It needs a target to optimize and a way to measure it, and it helps you set both up.
Will it undo my code changes?
Discarded or failed experiments are reverted automatically, while kept ones are committed.
How does it keep track of results?
Every run is written to a log in the .auto folder, so you can review what was tried.
Details
Original description by the author
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".
Popularity
- GitHub stars
- 8.2k
- Ranking position
- #12522
- License
- MIT
- Updated
- 10/7/2026
Comments
- β¦
More skills from this repository
autoresearch-finalize
8.2kHelps your agent turn a messy series of experiment changes into clean, separate branches that are ready for review.
autoresearch-hooks
8.2kTeaches your agent to write small scripts that run before and after each experiment, for alerts, saved notes or fetching research.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.