Agent skill

Autoresearch Loop

by jdrhyne in jdrhyne/agent-skills

Domain-agnostic metric-driven improvement loop, generalizing Karpathy's autoresearch.

MITAuto-check passedAgent Workflows

Install Autoresearch Loop

skills CLI
$ npx skills add jdrhyne/agent-skills --skill autoresearch-loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jdrhyne/agent-skills autoresearch-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jdrhyne/agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/autoresearch-loop .claude/skills/autoresearch-loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
autoresearch-loop
GitHub stars
240
Token cost
~2k tokens
SKILL.md length
991 words
Files
25 (incl. scripts, references)
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

Domain-agnostic metric-driven improvement loop, generalizing Karpathy's autoresearch.

  • Works in 4 steps: FRAME (metric discovery) → BASELINE → LOOP (until stop condition) → …
  • You want an agent to discover what to measure for a project/goal
  • SKILL.md covers When NOT to run, Phase 0 — FRAME (metric…, Phase 1 — BASELINE and Phase 2 — LOOP (until stop…, plus 3 more sections
  • Runs JavaScript and Shell scripts from its folder; calls node

What it does

Autoresearch Loop is an agent skill from jdrhyne/agent-skills. Domain-agnostic metric-driven improvement loop, generalizing Karpathy's autoresearch. Use when you want an agent to discover what to measure for a project/goal, then run a keep-or-revert experiment loop that proposes changes, measures them against an objective, keeps wins, discards regressions, and records implemented improvements. Adapts to code perf-auditing, codegen, bug-finding, ad optimization, or any artifact + measurable objective + trial. Trigger: 'autoresearch this', 'find and implement improvements to…

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 28 other files, including scripts and reference files (for example `DESIGN.md`, `README.md` and `adapters/bug-finding.md`).

It sits in Agent Workflows, covering Autonomous loops and Project scaffolding. The repository describes itself as: A collection of AI agent skills for Clawdbot, Claude Code, Codex. The licence is MIT.

When your agent uses it

  • You want an agent to discover what to measure for a project/goal
  • Then run a keep-or-revert experiment loop that proposes changes
  • Measures them against an objective
  • Discards regressions

Example prompts

  • “autoresearch this”
  • “find and implement improvements to X”
  • “discover metrics and optimize”
  • “/autoresearch-loop”

Requirements

  • Node.js
  • A Bash shell

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. FRAME (metric discovery)
  2. BASELINE
  3. LOOP (until stop condition)
  4. ADAPT (every N trials)

What it can do on your machine

Read from SKILL.md and the folder at commit 439cd3a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (JavaScript and Shell, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Autoresearch Loop loads about 2k tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 143 tokens; SKILL.md has 991 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~143
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from jdrhyne/agent-skills at commit 439cd3a, republished under its MIT licence (© jdrhyne). 991 words, ~1,966 tokens.

Download SKILL.mdSave it as .claude/skills/autoresearch-loop/SKILL.md (or your agent's skills folder). This skill also uses 24 other files; get the full folder from GitHub.
name
autoresearch-loop
description
Domain-agnostic metric-driven improvement loop, generalizing Karpathy's autoresearch. Use when you want an agent to discover what to measure for a project/goal, then run a keep-or-revert experiment loop that proposes changes, measures them against an objective, keeps wins, discards regressions, and records implemented improvements. Adapts to code perf-auditing, codegen, bug-finding, ad optimization, or any artifact + measurable objective + trial. Trigger: 'autoresearch this', 'find and implement improvements to X', 'discover metrics and optimize'.

autoresearch-loop

Generalize Karpathy's autoresearch into a domain-adaptive improvement loop. The agent discovers what to measure, then runs a disciplined propose → trial → keep-or-revert loop, maintaining an explicit ledger of what was tried, kept, discarded, and implemented.

Read DESIGN.md once at the start of a run for the full architecture and the domain-specific tensions (metric latency/noise/cost, Goodhart gaming, cost-per-trial, reversibility). The phases below are the operating procedure.

Runtime: the loop's mechanics (run a trial, parse the metric, score confidence, keep/commit or discard/revert) are handled by the arl CLI over a .auto/ session folder — a Claude-native port of pi-autoresearch's tools. Read references/runtime-contract.md for the .auto/ layout, the METRIC name=value contract, MAD confidence scoring, and the arl init|run|log|status commands. Invoke it as node scripts/arl.mjs <cmd> (or arl if on PATH).

When NOT to run

  • There is no metric that can be measured repeatably and cheaply enough within a trial budget. A loop with no trustworthy metric chases noise — stop and say so.
  • The change surface is irreversible or unsafe to mutate experimentally (production data, customer-facing irreversible actions) without an explicit revert procedure in the adapter.

Phase 0 — FRAME (metric discovery)

Given {project, goal, context} — follow the procedure in references/metric-discovery.md (restate the goal as an outcome → enumerate candidates on the proxy→outcome spectrum → score on six axes → choose primary + guardrails + strategy → red-team for gaming). In brief:

  1. Identify or select a domain adapter (adapters/*.md). If none fits, draft an inline adapter following references/domain-adapter-contract.md.
  2. Propose candidate metrics (the adapter's menu is a prior, not the answer — reason from the goal). Score each on measurability, latency, noise, alignment, gameability, and cost. Prefer alignment over convenience for the primary.
  3. Pick ONE primary objective, a set of guardrail metrics that must not regress, a trial budget (wall-clock and/or cost per trial), and a stop condition (budget exhausted, plateau over K trials, or target hit).
  4. Choose the accept/reject strategy for this domain: deterministic-delta (fast, low-noise), significance-test, or bandit (noisy/delayed/expensive — e.g. ads).
  5. Name the Goodhart guards (guardrail metrics, holdout, periodic critic).
  6. Write runs/<id>/CHARTER.md. Confirm it with the user before spending real budget if trials cost money or touch production.

Phase 1 — BASELINE

Write .auto/measure.sh (and .auto/checks.sh if guardrails require it). arl init with the primary metric + direction, run the baseline (arl run), and record it (arl log --status keep --metric <baseline> --desc baseline). If the baseline can't be measured cleanly and repeatably, stop (see "When NOT to run").

Before proposing any change, profile where the cost actually is, and confirm the benchmark stresses the IN-SCOPE artifact — not a dependency, a native/FFI call, an external engine, the network, or unrelated code. (Validated the hard way on two live runs: once the assumed hot path was wrong twice and 97% of time was in an out-of-scope library; once the in-scope managed code was only 0.4–3.8% of wall-time because a Rust NIF dominated — the correct loop output there was a true negative, "re-scope," not a sub-noise edit. See adapters/code-perf-audit.md → Pitfalls.) Spend one profiling run on the managed-vs-native/dependency split; a loop that optimizes code which isn't the bottleneck produces confident, useless churn — and proving "no in-scope headroom" cheaply is itself a successful outcome.

Show full SKILL.md (469 more words)Show less

Phase 2 — LOOP (until stop condition)

Each iteration:

  1. Read the artifact, .auto/prompt.md, the .auto/log.jsonl tail, and .auto/ideas.md — never re-propose an exhausted line.
  2. Propose one hypothesis: the smallest change most likely to move the primary metric. Pull from .auto/ideas.md; append newly-imagined ideas there.
  3. Apply it directly to the in-scope files (a discard reverts code via git; .auto/ is preserved).
  4. arl run — runs the trial harness, parses METRIC lines, runs guardrail checks.sh.
  5. Decide with the charter's accept/reject strategy. For fast-low-noise domains, watch the MAD confidence score (<1.0× = within noise, re-run before trusting). For delayed-expensive domains (ads), do NOT trust a single trial — reach the adapter's minimum sample and use significance/bandit logic. A primary win that regresses any guardrail is a discard.
  6. arl log --status keep|discard|... --metric <value> --desc "..." --asi <learning>. Keep auto-commits and advances the baseline; discard auto-reverts the code. Record cost with --cost.
  7. Annotate every run's --asi with what was learned (survives a discard's revert); prune exhausted ideas.

Respect concurrency reality: deterministic domains can run many fast sequential trials; noisy/delayed domains (ads) run few long concurrent trials and must reach a minimum sample before any verdict.

Phase 3 — ADAPT (every N trials)

  • Prune dead-end hypothesis families.
  • Re-tune the trial budget (raise if trials are cheap and informative; lower if wasteful).
  • Goodhart check: inspect recent keeps — is the metric genuinely better, or gamed (tests deleted, benchmark special-cased, holdout diverging from training metric, downstream conversion dropping while CTR rises)? If gamed, tighten guardrails or refine the metric, and revert the gamed keep.
  • Proxy-degeneracy check: if a cheap proxy metric can be structurally degenerate for some task shapes (e.g. a routing score that is always 0 when landing == target), it will under-measure or mislead — and it can "pass" real defects a behavioral check would catch. When a cheap and a behavioral oracle both exist, iterate on the cheap one but decide keeps with the behavioral oracle. Validated on a real run where the content score read a genuine fix as +2.15 while the browser-flow oracle measured +28.68 and also caught three broken links the content score missed. See adapters/web-onboarding.md.

Output

At any stop, report (arl status summarizes most of it): metric baseline → current with the delta and confidence, the kept improvements (each with its delta and cost), what was tried and discarded with the --asi reasons from .auto/log.jsonl, the remaining promising ideas, and total cost. The durable record is .auto/ plus the git history of kept commits.

Reference files

  • DESIGN.md — architecture, per-domain design tensions, and the pi-autoresearch prior-art decision (read once per run).
  • references/metric-discovery.md — the Phase 0 procedure: deriving + scoring + red-teaming the metric.
  • references/runtime-contract.md — the .auto/ layout, METRIC contract, MAD confidence, and arl commands.
  • references/domain-adapter-contract.md — how to define a new domain adapter.
  • references/journal-schema.md — the ledger record formats.
  • adapters/*.md — concrete domain adapters (code-perf-audit, bug-finding, code-generation, google-ads, web-onboarding).

© jdrhyne, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 24 other files (scripts, references) in skills/autoresearch-loop of jdrhyne/agent-skills.

  • SKILL.md
  • DESIGN.md
  • README.md
  • adapters/bug-finding.md
  • adapters/code-generation.md
  • adapters/code-perf-audit.md
  • adapters/google-ads.md
  • adapters/web-onboarding.md
  • examples/code-perf-demo/.auto/checks.sh
  • examples/code-perf-demo/.auto/ideas.md
  • examples/code-perf-demo/.auto/log.jsonl
  • examples/code-perf-demo/.auto/measure.sh
  • examples/code-perf-demo/.auto/prompt.md
  • examples/code-perf-demo/RESULTS.md
  • examples/code-perf-demo/bench.js
  • examples/code-perf-demo/gen.js
  • examples/code-perf-demo/solution.js
  • … and 8 more

Open the folder on GitHubat commit 439cd3a

Compare with similar skills

Autoresearch Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Autoresearch Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Autoresearch Loop this skilljdrhyne/agent-skills240—~2kAutomated safety check: PassMIT
Loop FactoryJuliusBrussee/skills162—~2kAutomated safety check: PassMIT
Harness Engineeringguanyang/open-agent-hub9771 repos~2.9kAutomated safety check: PassMIT
Self Improvement Loopsguanyang/open-agent-hub9771 repos~5.6kAutomated safety check: PassMIT
Toolifycoreyhaines31/makerskills850—~2.9kAutomated safety check: NotesMIT
Spec Optimizeleo-kuang-ai/spec-first107—~13kAutomated safety check: PassMIT

Similar skills

  • Loop Factory

    JuliusBrussee/skills

    Run a spec-driven agent loop where coding tasks live as markdown specs that move through inbox → active → archive, get implemented by Claude Code or Codex, and pass a review gate before they count…

    162 GitHub stars~2k tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • Harness Engineering

    guanyang/open-agent-hub

    This skill should be used when designing autonomous agent harnesses: research loops, evaluation scaffolds, locked and editable surfaces, durable logs, novelty gates, pruning, rollback, PR…

    977 GitHub starsUsed in 1 repo~2.9k tokens
    Agent WorkflowsAuto-check passed
  • Self Improvement Loops

    guanyang/open-agent-hub

    This skill should be used when the harness, scaffold, workflow, or optimizer itself is the optimization target: recursive self-improvement (RSI) loops, meta-harnesses, self-improving harnesses that…

    977 GitHub starsUsed in 1 repo~5.6k tokens
    Agent WorkflowsAuto-check passed
  • Toolify

    coreyhaines31/makerskills

    When you want to integrate an external tool, API, MCP server, or service into a project — the wizard walks you through auth, config, env vars, client wrapper code, example usage, and an optional…

    850 GitHub stars~2.9k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Spec Optimize

    leo-kuang-ai/spec-first

    Run metric-driven iterative optimization loops. An agent skill from leo-kuang-ai/spec-first.

    107 GitHub stars~13k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • AWS Harness

    hoodini/ai-agents-skills

    Build a new AI agent on AWS and deploy it easily, OR wrap and deploy an agent you already have, using the Amazon Bedrock AgentCore harness.

    282 GitHub stars~4.2k tokensUpdated 2 mo ago
    Backend & APIsAuto-check: notes

More from jdrhyne/agent-skills

All 20 skills in this repo
  • Gong

    jdrhyne/agent-skills

    Gong API for searching calls, transcripts, and conversation intelligence.

    240 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Elegant Reports

    jdrhyne/agent-skills

    Generate beautifully designed PDF reports with a Nordic/Scandinavian aesthetic.

    240 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Ga4

    jdrhyne/agent-skills

    Read Google Analytics 4 reporting data through the GA4 Data API.

    240 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Gallery Scraper

    jdrhyne/agent-skills

    Bulk download images from login-protected gallery websites using an attached browser session.

    240 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Gsc

    jdrhyne/agent-skills

    Read Google Search Console properties, Search Analytics, URL Inspection, and sitemaps.

    240 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Nudocs

    jdrhyne/agent-skills

    Upload, edit, and export documents via Nudocs.ai. An agent skill from jdrhyne/agent-skills.

    240 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed

Categories

Questions about Autoresearch Loop

What does Autoresearch Loop do?

Domain-agnostic metric-driven improvement loop, generalizing Karpathy's autoresearch. Autoresearch Loop is an agent skill from jdrhyne/agent-skills. Domain-agnostic metric-driven improvement loop, generalizing Karpathy's autoresearch.

When should I use Autoresearch Loop?

Autoresearch Loop fits situations like: you want an agent to discover what to measure for a project/goal; then run a keep-or-revert experiment loop that proposes changes; measures them against an objective; discards regressions.

How do I install Autoresearch Loop in Claude Code?

Run `npx skills add jdrhyne/agent-skills --skill autoresearch-loop -a claude-code`. Or copy the skill folder (skills/autoresearch-loop in jdrhyne/agent-skills) into .claude/skills/autoresearch-loop in your project. Claude Code loads it when a task matches its description.

How do I install Autoresearch Loop in Codex?

Run `npx skills add jdrhyne/agent-skills --skill autoresearch-loop -a codex`. Or copy the skill folder (skills/autoresearch-loop in jdrhyne/agent-skills) into .agents/skills/autoresearch-loop in your project. Codex loads it when a task matches its description.

Can I use Autoresearch Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jdrhyne/agent-skills --skill autoresearch-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/autoresearch-loop, .gemini/skills/autoresearch-loop, .github/skills/autoresearch-loop and .opencode/skills/autoresearch-loop in your project.

What does Autoresearch Loop need to run?

Going by SKILL.md and its folder, Autoresearch Loop needs JavaScript and a shell for the scripts in its folder and the command-line tools its instructions call (node). Our summary lists: Node.js; A Bash shell.

Does Autoresearch Loop access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Autoresearch Loop safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Autoresearch Loop use?

Autoresearch Loop is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Autoresearch Loop use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3k tokens, read only when the agent opens those files.

What are the alternatives to Autoresearch Loop?

Skills that share tags, products or a category with Autoresearch Loop: Loop Factory (JuliusBrussee/skills, 162 stars), Harness Engineering (guanyang/open-agent-hub, 977 stars), Self Improvement Loops (guanyang/open-agent-hub, 977 stars) and Toolify (coreyhaines31/makerskills, 850 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Autoresearch Loop?

jdrhyne (a GitHub user) maintains it in jdrhyne/agent-skills, which has 240 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on August 30, 2026.

Source: jdrhyne/agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.