Skip to content

About

Coding agents fill the blanks in a prompt and ship the guess. For Codex, Claude, Cursor, Antigravity, Gemini, and Grok: Karpathy's coding rules, plus a short gap check. Ask only when a missing fact would change the result and you cannot look it up.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

karpathy-skills-extended

Coding agents fill the blanks in your prompt and ship the guess. "Add a delete button on the patient row" can mean hide the row, mark the record inactive, or remove the record. The agent picks one, writes the code, and opens the PR.

Andrej Karpathy named this habit in his notes on LLM coding mistakes: models make wrong assumptions on your behalf and run with them. The Karpathy guidelines tell the agent to state those assumptions, show tradeoffs, and ask when it is unsure. Agents often write the assumption down and continue. You can see what they assumed. You still did not get a vote before the diff existed.

Matt Pocock's grill-me skill, and the grilling session under it, walk every branch of the plan and wait until nothing is left assumed. Use that when the idea is still soft. On a prompt that is already a task, the interview runs long.

This skill takes the best of both: Karpathy's discipline of surfacing assumptions, and grill-me's refusal to proceed while something that matters is still open. It stays loaded on every prompt. Before it acts, it looks for a fact that would change the result and that it cannot read from the repo, the tools, or the conversation. It asks that, in one round, with the answer it would have used. Three questions is the cap.

Same delete-button prompt. One side ships a guessed behavior. The other asks hide, deactivate, or remove, recommends the pattern the table already uses, and then builds that.

The gap check

All four have to be true before it asks:

  1. You did not say it, and no earlier turn settled it.
  2. The agent cannot get it from the repo, docs, tools, or config.
  3. More than one plausible answer exists.
  4. The choice would change the files, behavior, audience, schema, copy, or the check for done.

A fact that fails any line is not a question. The agent looks it up, or follows the reading that matches your request and the surrounding code. Lookup is the agent's job. Your intent is yours.

Four gates on one line. If every gate passes, ask one to three questions and wait. If any gate fails, do the work.

Coding rules

The skill keeps the four Karpathy rules, so it still works if you do not install the original:

  • Think before coding. Name a real tradeoff when it changes the design. Prefer the simpler approach, and say so.
  • Simplicity first. Code that solves the request. No extra features, no one-off abstraction, no config you did not ask for.
  • Surgical changes. Edit only the lines the request needs. Match the file. Leave unrelated dead code alone, and say you saw it.
  • Goal-driven execution. Turn the task into a check you can run, then run it.

On a material gap, the gap check overrides "state the assumption and proceed."

Install

The behavior file is skills/karpathy-skills-extended/SKILL.md. Codex, Claude, Cursor, Antigravity, Gemini, and Grok all read that Agent Skills layout. Copy the folder into the host's skills directory, and paste rules/karpathy-skills-extended.md into the host's always-on instructions. A skills directory lets the agent open the file when the description matches, and run /karpathy-skills-extended. The always-on file is what puts the check in context on every prompt, including in hosts that only show the description until they decide to read the skill.

npx skills add anshuxinha/karpathy-skills-extended

Pass -a with the installer name: codex, claude-code, cursor, antigravity, antigravity-cli, gemini-cli, or grok. Example: npx skills add anshuxinha/karpathy-skills-extended -a codex.

Host Skill folder Always-on file
Codex ~/.codex/skills/ and <repo>/.agents/skills/ ~/.codex/AGENTS.md
Claude Code ~/.claude/skills/ ~/.claude/rules/ or ~/.claude/CLAUDE.md
Cursor ~/.cursor/skills/ and <repo>/.agents/skills/ .cursor/rules/karpathy-skills-extended.mdc copied to ~/.cursor/rules/ (alwaysApply: true)
Antigravity ~/.gemini/config/skills/, ~/.gemini/antigravity/skills/, ~/.gemini/antigravity-cli/skills/, and <repo>/.agents/skills/ AGENTS.md in the project
Gemini CLI ~/.gemini/skills/ and <repo>/.agents/skills/ GEMINI.md
Grok ~/.grok/skills/ and ~/.agents/skills/ ~/.grok/rules/

Those paths are the ones the skills installer and each host's docs use. Codex also reads agents/openai.yaml inside the skill for its skill picker.

Plugin install adds the slash command on that host. The always-on file is still the copy that loads the check every session.

grok plugin install anshuxinha/karpathy-skills-extended --trust
agy plugin install https://github.com/anshuxinha/karpathy-skills-extended

Examples

"Add a delete button on the patient row." Delete might hide the row, mark the record inactive, or remove the record. The agent asks one question, recommends whatever that table already does, and waits.

"Rename getUser to fetchUser in src/api.ts." One reading. The agent renames it.

License

MIT. The four coding rules follow the structure of multica-ai/andrej-karpathy-skills. Stopping to ask you, when a decision is still open, follows Matt Pocock's grill-me. The wording in this repo is ours. See NOTICE.

About

Coding agents fill the blanks in a prompt and ship the guess. For Codex, Claude, Cursor, Antigravity, Gemini, and Grok: Karpathy's coding rules, plus a short gap check. Ask only when a missing fact would change the result and you cannot look it up.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors