awesome-autoresearch
```markdown
What this skill does
```markdown
---
name: awesome-autoresearch
description: Curated index of autonomous improvement loops, research agents, and autoresearch-style systems inspired by Karpathy's autoresearch.
triggers:
- set up an autoresearch loop
- build a self-improving agent
- implement autonomous research workflow
- create an experiment optimization loop
- add autoresearch skill to my project
- build a keep-or-revert improvement loop
- set up a research agent pipeline
- automate ml experimentation with agents
---
# ๐ฌ Awesome Autoresearch
> Skill by [ara.so](https://ara.so) โ Daily 2026 Skills collection.
A curated index of autonomous improvement loops, research agents, and autoresearch-style systems. The core pattern: an LLM agent proposes changes, runs experiments, measures a metric, and keeps or reverts โ looping until a budget is exhausted or a threshold is met.
---
## What Is Autoresearch?
Autoresearch (originated by [karpathy/autoresearch](https://github.com/karpathy/autoresearch)) is an **autonomous experiment loop** where:
1. An LLM agent reads a codebase and a goal metric
2. It proposes a targeted change (hypothesis)
3. The change is applied and the metric is measured
4. If the metric improves โ keep; otherwise โ revert
5. Repeat within a fixed compute/time budget
The pattern generalizes to any measurable objective: model loss, Sharpe ratio, test pass rate, API latency, prompt quality, etc.
---
## Core Loop Pattern
```python
# Canonical keep-or-revert autoresearch loop
import subprocess, shutil, json
from pathlib import Path
METRIC_CMD = ["python", "eval.py"] # returns JSON {"score": float}
BUDGET = 20 # number of iterations
GOAL = "maximize score"
def measure() -> float:
result = subprocess.run(METRIC_CMD, capture_output=True, text=True)
return json.loads(result.stdout)["score"]
def run_loop(agent_propose_fn):
best_score = measure()
print(f"Baseline: {best_score:.4f}")
for step in range(BUDGET):
# Agent proposes a diff/edit
agent_propose_fn(goal=GOAL, step=step, best=best_score)
score = measure()
if score > best_score:
best_score = score
print(f"[{step}] โ
Improved โ {score:.4f}")
# Commit the change (git add -A && git commit)
subprocess.run(["git", "commit", "-am", f"step {step}: {score:.4f}"])
else:
print(f"[{step}] โ Reverted ({score:.4f} < {best_score:.4f})")
# Revert to last good state
subprocess.run(["git", "checkout", "--", "."])
print(f"Final best: {best_score:.4f}")
```
---
## Installation Patterns by Platform
### Claude Code Skill (SKILL.md / CLAUDE.md)
Create `CLAUDE.md` or `.claude/skills/autoresearch.md` in your repo:
```markdown
## Autoresearch Loop
You are running an autonomous improvement loop. Each iteration:
1. Read `GOAL.md` for the objective and metric command
2. Propose ONE focused change to the codebase
3. Apply the change
4. Run: `python eval.py` โ parse `{"score": float}`
5. If score improves over baseline: `git commit -am "step N: <score>"`
6. Else: `git checkout -- .`
7. Log to `experiments.jsonl`
8. Repeat until BUDGET iterations or target score reached
```
### GOAL.md Pattern ([jmilinovich/goal-md](https://github.com/jmilinovich/goal-md))
```markdown
# GOAL.md
## Objective
Minimize validation bits-per-byte on the Shakespeare dataset.
## Metric Command
```bash
python eval.py --split val
```
Returns: `{"val_bpb": float}` โ lower is better.
## Budget
- Max iterations: 20
- Max wall time: 2 hours
## Constraints
- Single file edits only (`model.py` or `train.py`)
- No external API calls
- Must run on single A100
```
### Codex / OpenAI CLI
```bash
# Install Codex CLI
npm install -g @openai/codex
# Run autoresearch loop via Codex
codex "Read GOAL.md. Run the autoresearch loop: propose a change, measure eval.py output, keep if improved else revert. Repeat 20 times. Log each step to experiments.jsonl."
```
---
## Experiment Logging
```python
# experiments.jsonl writer โ append each step
import json, datetime
def log_step(step: int, score: float, baseline: float, diff: str, kept: bool):
record = {
"step": step,
"timestamp": datetime.datetime.utcnow().isoformat(),
"score": score,
"baseline": baseline,
"delta": score - baseline,
"kept": kept,
"diff_summary": diff[:200], # first 200 chars of unified diff
}
with open("experiments.jsonl", "a") as f:
f.write(json.dumps(record) + "\n")
```
---
## Domain-Specific Configurations
### ML Training Loss (original pattern)
```python
# eval.py for language model val_bpb
import torch, json
model = load_checkpoint("ckpt_latest.pt")
val_bpb = evaluate_bpb(model, "data/val.bin")
print(json.dumps({"score": -val_bpb})) # negate so higher=better
```
### API / Prompt Optimization
```python
# eval.py for prompt quality
import os, json
from openai import OpenAI
client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
def score_prompt(prompt_file="system_prompt.txt") -> float:
prompt = open(prompt_file).read()
scores = []
for test_case in load_test_cases("test_cases.json"):
resp = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "system", "content": prompt},
{"role": "user", "content": test_case["input"]}]
)
scores.append(judge(resp.choices[0].message.content, test_case["expected"]))
return sum(scores) / len(scores)
print(json.dumps({"score": score_prompt()}))
```
### GPU Kernel Optimization ([RightNow-AI/autokernel](https://github.com/RightNow-AI/autokernel))
```python
# eval.py for kernel throughput
import subprocess, json, re
result = subprocess.run(
["python", "benchmark_kernel.py", "--kernel", "attn_fwd"],
capture_output=True, text=True
)
tflops = float(re.search(r"TFLOP/s: ([\d.]+)", result.stdout).group(1))
print(json.dumps({"score": tflops}))
```
### Trading Strategy ([chrisworsey55/atlas-gic](https://github.com/chrisworsey55/atlas-gic))
```python
# eval.py for Sharpe ratio
import json
from backtest import run_backtest
sharpe = run_backtest(
strategy_file="strategy.py",
data_path="data/ohlcv_2023.parquet",
initial_capital=100_000
)
print(json.dumps({"score": sharpe}))
```
---
## Multi-GPU / Parallel Loops ([iii-hq/n-autoresearch](https://github.com/iii-hq/n-autoresearch))
```python
# parallel_loop.py โ run N agents on different hypotheses simultaneously
import asyncio, json
from pathlib import Path
async def run_agent(agent_id: int, gpu_id: int, hypothesis: dict) -> dict:
env = {"CUDA_VISIBLE_DEVICES": str(gpu_id)}
proc = await asyncio.create_subprocess_exec(
"python", "eval.py",
env={**__import__("os").environ, **env},
stdout=asyncio.subprocess.PIPE
)
stdout, _ = await proc.communicate()
score = json.loads(stdout)["score"]
return {"agent_id": agent_id, "hypothesis": hypothesis, "score": score}
async def parallel_search(hypotheses: list, gpus: list):
tasks = [
run_agent(i, gpus[i % len(gpus)], h)
for i, h in enumerate(hypotheses)
]
results = await asyncio.gather(*tasks)
best = max(results, key=lambda r: r["score"])
return best
```
---
## Persistent Memory Across Sessions
```python
# memory.py โ frequency-weighted cross-session knowledge retrieval
import json, time
from pathlib import Path
MEMORY_FILE = Path(".autoresearch_memory.json")
def load_memory() -> dict:
if MEMORY_FILE.exists():
return json.loads(MEMORY_FILE.read_text())
return {"lessons": [], "best_score": None, "total_steps": 0}
def save_lesson(lesson: str, score_delta: float):
mem = load_memory()
mem["lessons"].append({
"text": lesson,
"delta": score_delta,
"timestamp": time.time(),
"weight": 1.0
})
# Boost weight for high-impact lessons
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing โ use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.