Agent skill · software engineering · aradotso
pi-autoresearch-loop
pi-autoresearch-loop — an agent skill for coding agents.
Why this skill is useful
Adds an executable autonomous experiment loop that continuously optimizes and benchmarks performance metrics, which the AI cannot generate on its own.
What it needs
Requires pi installed locally. About 5k tokens when loaded. Last updated 2026-07-09. 70 stars on the source repository.
What this skill does
bash pi install https://github.com/davebcn87/pi-autoresearch bash cp -r extensions/pi-autoresearch ~/.pi/agent/extensions/ cp -r skills/autoresearch-create ~/.pi/agent/skills/ /skill:autoresearch-create typescript await initexperiment({ name: "vitest-speed", metric: "seconds", unit: "s", direction: "lower", // "lower" "higher" }); typescript const result = await runexperiment({ command: "pnpm test --run", timeoutseconds: 120, // optional, default 300 checkstimeoutseconds: 300, // optional, for checks script }); // result: { exitcode, durationseconds, stdout, stderr } typescript await logexperiment({ metricvalue: 42.3, status: "keep", // "keep" "discard" "crash" "checksfailed" description: "Enable parallel test workers in vitest config", commitmessage: "perf: parallel vitest workers → 42.3s (-18%)", }); propose change → edit files → runexperiment → measure metric ↓ metric improved? YES → logexperiment(keep) → auto-commit → update autoresearch.md NO → logexperiment(discard) → git revert → try next idea ↓ repeat forever (until interrupted) bash #!/bin/bash set -euo pipefail Pre-checks [ -f package.json ] { echo "No package.json"; exit 1; } Run workload pnpm test --run Output metric — required format echo "METRIC seconds=$SECONDS" bash echo "METRIC durationseconds=42.3" echo "METRIC testcount=847" echo "METRIC memorymb=512" bash #!/bin/bash set -euo pipefail pnpm test --run # full test suite pnpm typecheck # TypeScript pnpm lint # ESLint / Biome 🔬 autoresearch 12 runs 8 kept │ best: 42.3s typescript // Test speed { command: "pnpm test --run", metric: "seconds", direction: "lower", scope: ["vitest.config.ts", "src//.test.ts"], } // Bundle size { command: "pnpm build && du -sb dist cut -f1", metric: "bytes", direction: "lower", scope: ["vite.config.ts", "src/index.ts"], } // LLM training loss { command: "uv run train.py --epochs 1", metric: "valbpb", direction: "lower", scope: ["train.py", "model.py", "config.yaml"], } // Build speed { command: "pnpm build", metric: "sec …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aradotso/pi-autoresearch-loop