Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add LearnPrompt/andrej-karpathy-skills --skill karpathy-practice-environmentsgit clone --depth 1 https://github.com/LearnPrompt/andrej-karpathy-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/learnprompt/andrej-karpathy-skills/karpathy-practice-environments)<a href="https://agentmods.dev/skills/learnprompt/andrej-karpathy-skills/karpathy-practice-environments"><img src="https://agentmods.dev/badge/skills/learnprompt/andrej-karpathy-skills/karpathy-practice-environments/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/learnprompt/andrej-karpathy-skills/karpathy-practice-environments"><img src="https://agentmods.dev/badge/skills/learnprompt/andrej-karpathy-skills/karpathy-practice-environments.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00110 | $0.02122 |
| Opus 5 | $0.00055 | $0.01061 |
| Sonnet 5 | $0.00022 | $0.00424 |
| Haiku 4.5 | $0.00011 | $0.00212 |
Grade A, and why
karpathy-practice-environments scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 267 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill 14: LLM Textbook + Practice Environments(LLM教科书 + 练习环境)
Source: https://x.com/karpathy/status/1885026028428681698 | https://x.com/karpathy/status/1960803117689397543 "Take LLMs to school" | "Environments for RL" posts
Core Principle
LLMs learn like students. Give them textbooks, worked problems, and practice gyms.
Karpathy's insight: the missing ingredient in LLM training isn't more parameters — it's practice environments where agents can try → fail → see feedback → try again. Like a student who reads theory but also needs problem sets.
Apply this to your agents: build environments where they can practice a skill with automatic scoring, not just generate output into the void.
The Three Training Data Types
Every good learning environment needs all three:
1. EXPOSITION (pretrain equivalent)
→ Background knowledge, concepts, context
→ The "textbook chapter" the agent reads before practicing
2. WORKED EXAMPLES (SFT equivalent)
→ Complete input-output pairs with reasoning shown
→ "Here's a solved problem — learn the pattern"
3. PRACTICE PROBLEMS with feedback (RL equivalent)
→ Problems with verifiable correct answers
→ Automatic scoring so agent knows how it did
→ Enough variety that memorization doesn't work
Building a Practice Gym (General Template)
For any skill you want an agent to get better at:
#!/usr/bin/env python3
"""
Practice Gym for: [SKILL_NAME]
Karpathy-style RL environment for agent skill development
"""
import json
import random
from typing import Callable
class PracticeGym:
"""
A practice environment where an agent can repeatedly attempt
a task and receive automatic feedback.
"""
def __init__(self, task_generator: Callable, scorer: Callable):
self.task_generator = task_generator # generates new practice problems
self.scorer = scorer # returns 0.0-1.0 score for an attempt
self.history = []
def sample_task(self):
"""Generate a new practice problem."""
return self.task_generator()
def evaluate(self, task, attempt):
"""Score an agent's attempt. Returns dict with score + feedback."""
score = self.scorer(task, attempt)
result = {
"task": task,
"attempt": attempt,
"score": score,
"passed": score >= 0.8,
}
self.history.append(result)
return result
def summary(self):
"""Summarize performance across all attempts."""
if not self.history:
return "No attempts yet."
scores = [r["score"] for r in self.history]
return {
"total_attempts": len(scores),
"avg_score": sum(scores) / len(scores),
"pass_rate": sum(1 for s in scores if s >= 0.8) / len(scores),
"recent_trend": "improving" if scores[-1] > scores[0] else "declining"
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 267 lines · 110 tokens per session scan A 87752c40657c
karpathy-practice-environments is a skill published in the GitHub repository LearnPrompt/andrej-karpathy-skills (97 stars, last pushed 2mo ago), licensed MIT. It adds 110 tokens to every session and 2,122 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
hr-onboarding
A new-hire onboarding plan as a single page — first week schedule, buddy + manager intro, learning track, equipment checklist, and "you're set when…" outcomes. Use when the brief mentions "onboarding", "new hire", "first week plan", or "入职".
book-mirror
Take any book (EPUB/PDF), produce a personalized chapter-by-chapter analysis. Each chapter is preserved in detail (The Chapter) and mirrored back to the reader's actual life (The Mirror) using brain context. The mirror observes and resonates — a friend pointing out parallels, NOT a consultant rearranging the reader's…
miniapp
Build a tiny interactive HTML playground only when someone asks to see, play with, or step through a mechanism.
eli5
Explain research, papers, or technical ideas in plain English with minimal jargon, concrete analogies, and clear takeaways. Use when the user says "ELI5 this", asks for a simple explanation of a paper or research result, wants jargon removed, or asks what something technically dense actually means.
deck-course-module
A course or workshop slide template with persistent learning goals, teaching pages, multiple-choice self-tests, and a wrap-up.
master-yinguang
A reference-based assistant for questions about Yinguang and Pure Land Buddhism, a Buddhist tradition focused on faith, ethical living, and practice connected with rebirth in the Pure Land. It can answer in Yinguang’s historical teaching style.