Prompt Improver
severity1/claude-code-prompt-improver
This skill enriches vague prompts with targeted research and clarification before execution.
Write explicit strategy into system prompts as a learning mechanism — making LLM behavior more predictable and teachable through prompt-as-textbook approach.
$ npx skills add LearnPrompt/andrej-karpathy-skills --skill karpathy-system-prompt-learning -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LearnPrompt/andrej-karpathy-skills karpathy-system-prompt-learning --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/LearnPrompt/andrej-karpathy-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/karpathy-system-prompt-learning .claude/skills/karpathy-system-prompt-learning && rm -rf skills-srcUse ~/.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/
Install the "karpathy-system-prompt-learning" agent skill from https://github.com/LearnPrompt/andrej-karpathy-skills/tree/main/karpathy-system-prompt-learning into .claude/skills/karpathy-system-prompt-learning/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "karpathy-system-prompt-learning", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/LearnPrompt/andrej-karpathy-skills/tree/main/karpathy-system-prompt-learningType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add LearnPrompt/andrej-karpathy-skills --skill karpathy-system-prompt-learning -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LearnPrompt/andrej-karpathy-skills karpathy-system-prompt-learning --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LearnPrompt/andrej-karpathy-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/karpathy-system-prompt-learning .agents/skills/karpathy-system-prompt-learning && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "karpathy-system-prompt-learning" agent skill from https://github.com/LearnPrompt/andrej-karpathy-skills/tree/main/karpathy-system-prompt-learning into .agents/skills/karpathy-system-prompt-learning/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "karpathy-system-prompt-learning", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LearnPrompt/andrej-karpathy-skills --skill karpathy-system-prompt-learning -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LearnPrompt/andrej-karpathy-skills karpathy-system-prompt-learning --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LearnPrompt/andrej-karpathy-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/karpathy-system-prompt-learning .cursor/skills/karpathy-system-prompt-learning && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "karpathy-system-prompt-learning" agent skill from https://github.com/LearnPrompt/andrej-karpathy-skills/tree/main/karpathy-system-prompt-learning into .cursor/skills/karpathy-system-prompt-learning/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "karpathy-system-prompt-learning", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/LearnPrompt/andrej-karpathy-skills.git --path karpathy-system-prompt-learning--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add LearnPrompt/andrej-karpathy-skills --skill karpathy-system-prompt-learning -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LearnPrompt/andrej-karpathy-skills karpathy-system-prompt-learning --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LearnPrompt/andrej-karpathy-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/karpathy-system-prompt-learning .gemini/skills/karpathy-system-prompt-learning && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "karpathy-system-prompt-learning" agent skill from https://github.com/LearnPrompt/andrej-karpathy-skills/tree/main/karpathy-system-prompt-learning into .gemini/skills/karpathy-system-prompt-learning/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "karpathy-system-prompt-learning", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install LearnPrompt/andrej-karpathy-skills karpathy-system-prompt-learningInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add LearnPrompt/andrej-karpathy-skills --skill karpathy-system-prompt-learning -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LearnPrompt/andrej-karpathy-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/karpathy-system-prompt-learning .github/skills/karpathy-system-prompt-learning && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "karpathy-system-prompt-learning" agent skill from https://github.com/LearnPrompt/andrej-karpathy-skills/tree/main/karpathy-system-prompt-learning into .github/skills/karpathy-system-prompt-learning/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "karpathy-system-prompt-learning", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LearnPrompt/andrej-karpathy-skills --skill karpathy-system-prompt-learning -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install LearnPrompt/andrej-karpathy-skills karpathy-system-prompt-learning --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LearnPrompt/andrej-karpathy-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/karpathy-system-prompt-learning .opencode/skills/karpathy-system-prompt-learning && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "karpathy-system-prompt-learning" agent skill from https://github.com/LearnPrompt/andrej-karpathy-skills/tree/main/karpathy-system-prompt-learning into .opencode/skills/karpathy-system-prompt-learning/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "karpathy-system-prompt-learning", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
karpathy-system-prompt-learningWrite explicit strategy into system prompts as a learning mechanism — making LLM behavior more predictable and teachable through prompt-as-textbook approach.
Karpathy System Prompt Learning is an agent skill from LearnPrompt/andrej-karpathy-skills. Write explicit strategy into system prompts as a learning mechanism — making LLM behavior more predictable and teachable through prompt-as-textbook approach. Use this skill when the user wants to improve an agent or LLM's performance on a specific task through system prompts, needs to encode a strategy or workflow into a prompt, wants consistent LLM behavior, or says "improve system prompt", "encode this strategy", "prompt engineering", "make agent follow this workflow", "prompt as textbook". Based on Karpathy…
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering, covering Prompt engineering. The repository describes itself as: Karpathy-inspired Agent Skills collection. The licence is MIT.
Read from SKILL.md and the folder at commit 9e46dec. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
x.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Karpathy System Prompt Learning loads about 1.9k tokens when it runs. Until then it costs about 144 tokens; SKILL.md has 185 words of instructions outside code blocks.
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.
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); files beside SKILL.md are not scanned.
The full file from LearnPrompt/andrej-karpathy-skills at commit 9e46dec, republished under its MIT licence (© LearnPrompt). 185 words, ~1,852 tokens.
.claude/skills/karpathy-system-prompt-learning/SKILL.md (or your agent's skills folder).Source: https://x.com/karpathy/status/1921368644069765486 "System prompt learning — missing LLM learning paradigm"
The system prompt is a textbook. Write it like one.
Karpathy's insight: there are three learning modes for LLMs (pretrain, finetune, RL) — but there's a fourth that's massively underused: system prompt learning. Explicitly encoding strategy into the system prompt is more sample-efficient than retraining and more reliable than hoping the model figures it out.
Think of it as writing a textbook for the LLM before each task. Not just instructions — strategy with reasoning.
Good system prompts have three layers (mirroring how humans learn):
Layer 1: EXPOSITION (pretrain equivalent)
→ Background knowledge the model needs
→ Relevant concepts, terminology, context
→ "Here's what you need to know about [domain]"
Layer 2: WORKED EXAMPLES (SFT equivalent)
→ Step-by-step demonstration of correct behavior
→ Explicit reasoning traces
→ "Here's exactly how to handle [situation]"
Layer 3: STRATEGY (RL equivalent)
→ Explicit decision rules
→ Error patterns to avoid
→ "When you see X, do Y because Z"Build a system prompt that teaches an LLM to [TASK] reliably.
Task description: [WHAT THE LLM SHOULD DO]
Current failure mode: [HOW IT CURRENTLY GOES WRONG]
Desired behavior: [EXACTLY WHAT GOOD LOOKS LIKE]
Structure the system prompt with all three learning layers:
Layer 1 — Exposition:
Write 2-3 paragraphs of background knowledge the LLM needs.
Include: key concepts, relevant context, domain vocabulary.
Layer 2 — Worked Examples:
Write 2 complete examples of the task done correctly.
Format: INPUT → [step-by-step reasoning] → OUTPUT
Show the thinking, not just the answer.
Layer 3 — Strategy:
Write explicit decision rules as IF/THEN/BECAUSE statements.
Include: common mistakes to avoid, edge cases to handle, quality checks.
End with: "Before responding, verify: [checklist of 3-5 quality checks]"When your current system prompt isn't working well:
Diagnose and improve this system prompt.
Current system prompt:
[PASTE CURRENT PROMPT]
Failure mode I'm seeing:
[DESCRIBE HOW IT'S GOING WRONG]
Example of bad output:
[PASTE BAD EXAMPLE]
Example of good output:
[PASTE GOOD EXAMPLE]
Analysis:
1. What's missing from the exposition layer? (background knowledge gaps)
2. What worked examples should I add?
3. What explicit rules would prevent this failure mode?
4. Is the prompt too restrictive? Too vague? Wrong framing?
Output: improved version of the system prompt with changes annotated.SYSTEM PROMPT: [CODING TASK]
You are an expert [LANGUAGE] developer. Follow this exact strategy:
UNDERSTANDING PHASE (always do this first):
- Restate the task in your own words
- List all edge cases you can think of
- Identify the one tricky part
IMPLEMENTATION PHASE:
- Start with the simplest working version
- Add complexity only when simple version fails
- Comment every non-obvious line with WHY
VERIFICATION PHASE (always do this last):
- Trace through your code with one concrete example
- Check: does it handle empty input? Large input? Wrong type?
- Confirm: could a junior dev maintain this?
NEVER:
- Assume the input is well-formed without checking
- Add dependencies without saying why
- Write clever code when simple code worksSYSTEM PROMPT: [ANALYSIS TASK]
You are an analytical expert. Follow this strategy:
GROUNDING:
- Always cite specific evidence before making claims
- Confidence levels: CERTAIN / LIKELY / SPECULATIVE — always label which
- If you don't know something, say so explicitly
STRUCTURE:
- Lead with the conclusion, then the evidence
- One claim per paragraph
- Maximum 3 levels of nesting
QUALITY CHECKS before responding:
- [ ] Every claim has evidence?
- [ ] Confidence levels labeled?
- [ ] Would an expert in this field agree with this framing?
- [ ] Am I answering the actual question or a related easier one?SYSTEM PROMPT: [WRITING TASK]
Writing strategy for this task:
VOICE:
[Describe the tone, style, what to avoid]
STRUCTURE:
[Describe the expected output format]
QUALITY STANDARD:
A response is good when [describe what success looks like].
A response is bad when [describe common failure modes].
EXAMPLE OF GOOD OUTPUT:
[Paste one example]
EXAMPLE OF BAD OUTPUT (and why):
[Paste one example with annotation]Track your system prompt iterations like code:
# [PROMPT NAME] — Version History
## v3 (current) — [DATE]
Change: Added explicit "verification phase" checklist
Reason: v2 was skipping edge case checking
Result: Failure rate dropped from ~30% to ~5%
## v2 — [DATE]
Change: Added worked examples section
Reason: v1 was too abstract; model wasn't following the strategy
Result: Moderate improvement
## v1 — [DATE]
Initial version: [PASTE]Help me write a system prompt for this agent.
Agent task: [WHAT IT SHOULD DO]
I'll be using this with: [CLAUDE / GPT-4 / etc.]
Critical behavior: [WHAT MUST ALWAYS HAPPEN]
Failure modes to prevent: [WHAT GOES WRONG WITHOUT GOOD PROMPTING]
Apply the three-layer system prompt learning framework:
1. Exposition (what the model needs to know)
2. Worked examples (demonstrate correct behavior)
3. Strategy rules (explicit IF/THEN/BECAUSE)
Then: suggest 3 variations I could test to find the best version.属于工作流:反偏见决策(第3步/终点)
| 位置 | 上游 | 下游 |
|---|---|---|
| 第3步(沉淀) | karpathy-understanding-first(验证后) | 沉淀完成,可复用 |
完整链路:llm-simulator → understanding-first → system-prompt-learning
也在日常开发中独立使用——任何时候 Agent 反复犯同一类错,都应该触发本 Skill。
Extract a system prompt lesson from this failure/pattern: <DESCRIBE_THE_RECURRING_ERROR>. Produce: 1) Trigger condition — when does this error occur, 2) Correct strategy — step-by-step what the agent should do instead, 3) Anti-patterns — what specifically to avoid, 4) Worked example — a before/after showing the improvement, 5) Concise instruction block (< 200 words) ready to paste into system prompt or SKILL.md.© LearnPrompt, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in karpathy-system-prompt-learning of LearnPrompt/andrej-karpathy-skills.
Open the folder on GitHubat commit 9e46dec
Karpathy System Prompt Learning 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Karpathy System Prompt Learning this skillLearnPrompt/andrej-karpathy-skills | 110 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Prompt Improverseverity1/claude-code-prompt-improver | 1.9k | 1 repos | ~1.7k | Automated safety check: Pass | MIT | |
| Prompt Engineering Patternsynulihao/AgentSkillOS | 618 | 14 repos | ~1.7k | Automated safety check: Pass | None | |
| Patch CreationPiebald-AI/tweakcc | 2.5k | — | ~1.6k | Automated safety check: Pass | MIT | |
| Senior Prompt Engineermaslennikov-ig/claude-code-orchestrator-kit | 260 | 3 repos | ~1.4k | Automated safety check: Pass | Custom licence | |
| Codex Fable5baskduf/FableCodex | 437 | — | ~1.6k | Automated safety check: Pass | AGPL-3.0 |
severity1/claude-code-prompt-improver
This skill enriches vague prompts with targeted research and clarification before execution.
ynulihao/AgentSkillOS
Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production.
Piebald-AI/tweakcc
Create and register new patches for tweakcc. An agent skill from Piebald-AI/tweakcc.
maslennikov-ig/claude-code-orchestrator-kit
Provides reference guides and Python scripts for prompt optimization, RAG evaluation, and agent orchestration when building or tuning LLM systems.
baskduf/FableCodex
Apply a Claude Fable 5 inspired operating style inside Codex.
wshobson/agents
Reference for designing and tuning production LLM prompts: few-shot examples, chain-of-thought, structured outputs, templates and system prompts.
LearnPrompt/andrej-karpathy-skills
Apply Andrej Karpathy AI methodology and principles from his 2023-2026 insights. Use this skill when the user wants to apply Karpathy-style thinking, needs…
LearnPrompt/andrej-karpathy-skills
Apply Karpathy-style agentic engineering to any coding or building task.
LearnPrompt/andrej-karpathy-skills
Sets up an autonomous research loop where an agent runs experiments on git branches, logs results and proposes the next iteration while you approve each hypothesis change.
LearnPrompt/andrej-karpathy-skills
Apply the education-first mindset — make everything you build teachable, create nano-project explanations, write for beginners.
LearnPrompt/andrej-karpathy-skills
Create and share ideas as abstract Gist-style specs instead of code — letting agents or others implement.
LearnPrompt/andrej-karpathy-skills
Use LLM as a simulator of expert debates and opposing viewpoints instead of getting a single sycophantic answer.
Categories
Write explicit strategy into system prompts as a learning mechanism — making LLM behavior more predictable and teachable through prompt-as-textbook approach. Karpathy System Prompt Learning is an agent skill from LearnPrompt/andrej-karpathy-skills. Write explicit strategy into system prompts as a learning mechanism — making LLM behavior more predictable and teachable through prompt-as-textbook approach.
Karpathy System Prompt Learning fits situations like: the user wants to improve an agent; LLMs performance on a specific task through system prompts; needs to encode a strategy; workflow into a prompt.
Run `npx skills add LearnPrompt/andrej-karpathy-skills --skill karpathy-system-prompt-learning -a claude-code`. Or copy the skill folder (karpathy-system-prompt-learning in LearnPrompt/andrej-karpathy-skills) into .claude/skills/karpathy-system-prompt-learning in your project. Claude Code loads it when a task matches its description.
Run `npx skills add LearnPrompt/andrej-karpathy-skills --skill karpathy-system-prompt-learning -a codex`. Or copy the skill folder (karpathy-system-prompt-learning in LearnPrompt/andrej-karpathy-skills) into .agents/skills/karpathy-system-prompt-learning in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LearnPrompt/andrej-karpathy-skills --skill karpathy-system-prompt-learning -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/karpathy-system-prompt-learning, .gemini/skills/karpathy-system-prompt-learning, .github/skills/karpathy-system-prompt-learning and .opencode/skills/karpathy-system-prompt-learning in your project.
SKILL.md names no scripts, command-line tools or credentials: Karpathy System Prompt Learning is instructions for the agent only.
SKILL.md names 1 domain. As links in the text: x.com. This is read from the text; nothing was executed.
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. Review the folder before installing.
Karpathy System Prompt Learning is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Karpathy System Prompt Learning: Prompt Improver (severity1/claude-code-prompt-improver, 1.9k stars), Prompt Engineering Patterns (ynulihao/AgentSkillOS, 618 stars), Patch Creation (Piebald-AI/tweakcc, 2.5k stars) and Senior Prompt Engineer (maslennikov-ig/claude-code-orchestrator-kit, 260 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
LearnPrompt (a GitHub user) maintains it in LearnPrompt/andrej-karpathy-skills, which has 110 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on July 10, 2026.
Source: LearnPrompt/andrej-karpathy-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.