Agent skill · Data & Analytics

karpathy

Use when the user wants the LLM to do its own ML research: a fully-autonomous loop that hacks the training code, runs it, and keeps changes that lower a single scalar metric (e.g. val_bpb). One agent proposes one change at a time, runs training in the user's env, keeps it only if the metric improves (advancing a git branch) else reverts, and loops forever until the human interrupts. A faithful adaptation of Karpathy's autoresearch. Not for the analysis-first variant that profiles before editing (that is ml-autoresearch), and not for a budgeted, plateau-stopping refactor.

gaashergithub.com/gaasherGitHub ↗
claude-codeMIT
Install
npx skills add gaasher/Agent-Loop-Skills --skill karpathy --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 10 KB
Bundled scripts: none
Version: 0.1.0
Requires: Requires Python 3.9+
Path: loops/karpathy/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 146
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Karpathy Autoresearch This is an experiment to have the LLM do its own research. You are a completely autonomous researcher: you hack the training code with an idea, run it, keep the change if the metric improves and revert it if it doesn't, advancing a branch as you go — and you repeat **forever, until the human interrupts you.** The artifact is the `<editable_files>`; the feedback signal is one scalar `<metric>` (lower is better, e.g. `val_bpb`) read from the run. Training runs in the user's own environment via `<run_cmd>` — this skill installs nothing and imports nothing; it edits code, shells out, and reads the metric from the log. ## When to use Use this to leave an agent running on a single training script, optimizing one scalar metric hands-off, where any improvement is kept and the loop never stops on its own. Default to broad freedom inside `<editable_files>`; the only hard limit is that the run finishes within the budget without crashing. Not for the analysis-first variant that reasons about the data before each edit (that is `ml-autoresearch`). ## Setup Resolve bindings interactively (load `loop.run.yaml` and skip if it already exists; else, on Claude Code infer + reco

What's inside
Steps it walks through
  1. When to use
  2. Setup
  3. The experiment loop
  4. results.tsv (logging results)
  5. Constraints
  6. Stops — NEVER STOP
Ships with 1 file
  • examples/run.example.yaml
More from Agent-Loop-Skills
All skills →
About this skill
What does the karpathy skill do?

Use when the user wants the LLM to do its own ML research: a fully-autonomous loop that hacks the training code, runs it, and keeps changes that lower a single scalar metric (e.g. val_bpb). One agent proposes one change at a time, runs training in the user's env, keeps it only if the metric improves (advancing a git branch) else reverts, and loops forever until the human interrupts. A faithful adaptation of Karpathy's autoresearch. Not for the analysis-first variant that profiles before editing (that is ml-autoresearch), and not for a budgeted, plateau-stopping refactor.

How do I install it?

Run `npx skills add gaasher/Agent-Loop-Skills --skill karpathy --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From gaasher/Agent-Loop-Skills, a repository with 146 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going