Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By gn00678465v1.0.0MITIn 1 marketplace
Behavioral guidelines to reduce common LLM coding mistakes, derived from Andrej Karpathy's observations on LLM coding pitfalls
Run automatically on Claude Code events. Claude doesn't decide.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Behavioral guidelines that reduce common LLM coding mistakes, derived from Andrej Karpathy's observations on LLM coding pitfalls — packaged for session-start injection: loaded once when the agent starts, with an instruction-file fallback for agents that don't support hooks.
English | 繁體中文
Guidelines like these apply to every coding task, so they belong in context from the very first request — not behind an on-demand skill the model may or may not remember to load. This repo injects them through each agent's SessionStart hook where one exists, and falls back to AGENTS.md where one doesn't.
No duplicate tokens. Every hook script first checks the instruction files the agent already auto-loads (CLAUDE.md chain for Claude Code, AGENTS.md chain for Codex). If the guidelines are already there — detected via the karpathy-guidelines marker or the guidelines' first heading — the hook injects nothing. The first request of a session has no KV cache, so paying twice for the same content is pure waste.
| Principle | Addresses |
|---|---|
| Think Before Coding | Wrong assumptions, hidden confusion, missing tradeoffs |
| Simplicity First | Overcomplication, bloated abstractions |
| Surgical Changes | Orthogonal edits, touching code you shouldn't |
| Goal-Driven Execution | Leverage through verifiable success criteria |
Full text: hooks/guidelines.md (hook payload) / AGENTS.md (fallback copy).
/plugin marketplace add gn00678465/meta-skills
/plugin install andrej-karpathy-guideline@meta-skills
The plugin ships a SessionStart hook (hooks/hooks.json, matcher startup|clear|compact) that prints the guidelines to stdout, which Claude Code adds to context. If any CLAUDE.md in scope (project, .claude/, CLAUDE.local.md, or ~/.claude/CLAUDE.md) already contains the guidelines, the hook stays silent.
resumeis deliberately excluded from the matcher: a resumed session already has the guidelines in its transcript.
This directory is also a Codex plugin (.codex-plugin/plugin.json) bundling the same SessionStart hook — Codex hooks share Claude Code's shape, including plain-stdout context injection. It is exposed through the repo-root Codex marketplace at .agents/plugins/marketplace.json.
codex plugin marketplace add gn00678465/meta-skills
Then install and enable andrej-karpathy-guideline from the plugin browser: /plugins in Codex CLI, or the Plugins Directory in the ChatGPT desktop app. Plugin-bundled hooks are skipped until you review and trust them — approve the hook when prompted.
The hook skips injection when the closest AGENTS.md (walking up from cwd) or ~/.codex/AGENTS.md already contains the guidelines — Codex reads those natively.
Simpler alternative: skip the plugin entirely and copy
AGENTS.mdto~/.codex/AGENTS.md. Codex loads it at session start natively.
For agents without a session-start injection hook (Antigravity, OpenCode, Windsurf, …), copy AGENTS.md to your project root — most agents read it natively (Antigravity CLI, OpenCode, Windsurf, Copilot, Cursor, …) — or merge its body into the agent's global instruction file (e.g. Antigravity's ~/.gemini/GEMINI.md, or a rule under .agents/rules/ for the Antigravity IDE). Keep the karpathy-guidelines marker comment — it is what the hooks above use to avoid double-loading.
| Path | Purpose |
|---|---|
hooks/guidelines.md | The guidelines payload injected by hooks |
hooks/session-start | Shared hook script (Claude Code + Codex) with dedup check |
hooks/run-hook.cmd | Windows polyglot wrapper (finds Git Bash) |
hooks/hooks.json | Claude Code plugin hook definition |
codex/hooks.json | Codex plugin hook definition |
.codex-plugin/plugin.json | Codex plugin manifest |
AGENTS.md | Fallback copy for agents without session-start hooks |
docs/research/ | Primary-source research behind this design |
From Andrej:
"LLMs are exceptionally good at looping until they meet specific goals... Don't tell it what to do, give it success criteria and watch it go."
MIT
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub gn00678465/meta-skills --plugin andrej-karpathy-guidelinePlugins from other owners that cover similar ground