BA

balukosuri/andrej-karpathy-s-autoresearch-as-a-universal-skill

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

209 stars 质量 55 趋势 0

一种基于Andrej Karpathy自研究模式的Cursor和Claude代码自我改进提示优化技能。

概览

一个自我提升的Cursor和Claude代码提示优化技能,源自Andrej Karpathy的自动研究模式。将它放入任意仓库,它会扫描你的代码库,建议优化内容,定义评估指标,并运行一个自主循环,让你的提示随着时间推移变得更好——你无需动手。 2026年初,Andrej Karpathy(OpenAI前创始成员、特斯拉AI负责人)发布了一个名为 .这个想法看似简单: 让人工智能智能体自主运行实验,测量结果,保留有效的,丢弃无效的,然后无限重复。 在卡帕西的案例中,“实验”是在训练一个小型语言模型(nanoGPT)。代理会修改训练代码(train.py),运行5分钟,测量结果(一个叫val_bpb的数字——越低越好),然后决定:这个更改有没有帮助?如果有,就保留它。如果没有,就回退并尝试其他方法。

概述(AI 翻译)

一个自我提升的Cursor和Claude代码提示优化技能,源自Andrej Karpathy的自动研究模式。将它放入任意仓库,它会扫描你的代码库,建议优化内容,定义评估指标,并运行一个自主循环,让你的提示随着时间推移变得更好——你无需动手。


安德烈·卡帕西的Autoresearch如何运作

2026年初,Andrej Karpathy(OpenAI前创始成员、特斯拉AI主管)发布了一个名为autoresearch的小型GitHub仓库。这个想法看似简单明了:

让人工智能智能体自主运行实验,测量结果,保留有效的,丢弃无效的,然后无限重复。

在卡帕西的情况下,“实验”是在训练一个小型语言模型(nanoGPT)。智能体会修改训练代码(train.py),运行5分钟,测量结果(一个叫val_bpb]的数字——越小越好),然后决定:这个改动有帮助吗?如果有,就保留它。如果没有,就回退并尝试别的方法。

仓库只有三个重要的文件:

  • program.md — AI代理的指令(操作、测量方法、日志记录)
  • **'火车。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Andrej Karpathy’s Autoresearch — As a Universal AI Skill

A self-improving prompt optimization skill for Cursor and Claude Code, derived from Andrej Karpathy’s autoresearch pattern. Drop it into any repository, and it scans your codebase, suggests what to optimize, defines evaluation metrics, and runs an autonomous loop that makes your prompts better over time — without you lifting a finger.


How Andrej Karpathy’s Autoresearch Works

In early 2026, Andrej Karpathy (former founding member of OpenAI, former head of AI at Tesla) released a small GitHub repo called autoresearch. The idea was deceptively simple:

Let an AI agent autonomously run experiments, measure results, keep what works, throw away what doesn’t, and repeat — forever.

In Karpathy’s case, the “experiment” was training a small language model (nanoGPT). The agent would modify the training code (train.py), run it for 5 minutes, measure the result (a number called val_bpb — lower is better), and decide: did the change help? If yes, keep it. If no, revert and try something else.

The repo had only three files that mattered:

  • program.md — instructions for the AI agent (what to do, how to measure, how to log)
  • train.py — the thing being optimized (the agent modifies this)
  • prepare.py — the measurement tool (read-only, the agent cannot touch it)

The loop looked like this:

1. Read the current code
2. Make a change (an "experiment")
3. Run the experiment
4. Measure the result (a hard number, not vibes)
5. If better → keep the change
   If worse  → throw it away, revert
6. Go to step 1. Never stop.

That’s it. Evolution applied to code. Generate variations, test them against reality, keep the fittest, kill the rest.

Why It Works

Three ingredients make autoresearch work:

  1. An objective metric — a number you can measure. Not “feels faster” or “looks better.” An actual number. In Karpathy’s case: val_bpb (bits per byte on a validation set).

  2. An automated measurement tool — something that produces that number without a human in the loop. In Karpathy’s case: the evaluate_bpb() function in prepare.py.

  3. Something to change — the thing being optimized. In Karpathy’s case: train.py. In our case: a prompt.

If you have all three, you can run the loop forever and the thing will get better over time. The agent does the work while you sleep.


From Autoresearch to a Universal Skill

A YouTuber took Karpathy’s pattern and asked: what if, instead of optimizing ML training code, we optimize prompts?

He built a Claude Code skill that optimized a diagram-generation prompt. The skill would:

  1. Generate 10 diagrams using the current prompt (via Gemini image gen)
  2. Evaluate each diagram against 4 yes/no criteria using Claude’s vision (Is text legible? Are colors pastel? Is layout linear? Are there numbers?)
  3. Score the batch (10 diagrams x 4 criteria = max 40 points)
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add balukosuri/andrej-karpathy-s-autoresearch-as-a-universal-skill
新手?先看 mcpskill.org 教程 →