karpathy-guidelines

karpathy-guidelines is a skill for Claude Code, Codex from SumonMSelim/agentguard. It costs 46 tokens per session (523 once invoked), scanned A, original, MIT.

A set of behavioral rules for AI-assisted coding, based on common mistakes made by language models. It emphasizes clear assumptions, simple solutions, small edits, and checks that prove the result works.

In plain words
What is it for?
Use it when writing, reviewing, or refactoring code with an AI assistant, especially when requirements or existing interfaces are uncertain.
Why use it?
It helps reduce invented APIs, unnecessary refactoring, overcomplicated designs, and changes made without a clear success condition.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when writing, reviewing, or refactoring code with an AI assistant, especially when requirements or existing interfaces are uncertain.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sumonmselim/agentguard/karpathy-guidelines
Install

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.

Any agent
npx skills add SumonMSelim/agentguard --skill karpathy-guidelines
Clone the repo
git clone --depth 1 https://github.com/SumonMSelim/agentguard

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for karpathy-guidelines

README.md
[![agentmods](https://agentmods.dev/badge/skills/sumonmselim/agentguard/karpathy-guidelines/github.svg)](https://agentmods.dev/skills/sumonmselim/agentguard/karpathy-guidelines)
Your own site
<a href="https://agentmods.dev/skills/sumonmselim/agentguard/karpathy-guidelines"><img src="https://agentmods.dev/badge/skills/sumonmselim/agentguard/karpathy-guidelines/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.

agentmods 80×15 button for karpathy-guidelines

Your own site · 80×15
<a href="https://agentmods.dev/skills/sumonmselim/agentguard/karpathy-guidelines"><img src="https://agentmods.dev/badge/skills/sumonmselim/agentguard/karpathy-guidelines.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 523 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00523
Opus 5 $0.00023 $0.00262
Sonnet 5 $0.00009 $0.00105
Haiku 4.5 $0.00005 $0.00052

Measured 9d ago against content hash 0ffc567b2df9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

karpathy-guidelines 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 9d 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.

skills/karpathy-guidelines/SKILL.md · 60 lines

What it actually says

Karpathy Guidelines

Derived from Andrej Karpathy's observations on common LLM coding mistakes. Biases toward caution over speed. Apply judgment on trivial tasks.

1. Think before coding

  • State assumptions explicitly. Uncertain → ask before proceeding
  • Multiple interpretations → present them, don't pick silently
  • Simpler approach exists → say so and push back
  • Unclear requirement → stop, name what's confusing, ask
  • Unknown API, method, or type → verify existence before using. Never hallucinate interfaces

2. Simplicity first

  • No features beyond what was asked
  • No abstractions for single-use code
  • No unrequested "flexibility" or "configurability"
  • No error handling for impossible scenarios
  • 200 lines that could be 50 → rewrite it

3. Surgical changes

When editing existing code:

  • Don't improve adjacent code, comments, or formatting
  • Don't refactor things that aren't broken
  • Match existing style even if you'd do it differently
  • Unrelated dead code → mention it, don't delete it

When your changes create orphans:

  • Remove imports/variables/functions YOUR changes made unused
  • Don't remove pre-existing dead code unless asked

Every changed line must trace directly to the user's request.

4. Destructive operations

  • Deletes, drops, truncates, overwrites → confirm explicitly before executing
  • Irreversible actions → state what will be lost and wait for approval
  • When in doubt, show the plan, don't run it

5. Goal-driven execution

Transform tasks into verifiable goals before starting:

  • "Add validation" → "Write tests for invalid inputs, then make them pass"
  • "Fix the bug" → "Write a test that reproduces it, then make it pass"
  • "Refactor X" → "Ensure tests pass before and after"

For multi-step tasks, state a brief plan first:

1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]

Strong success criteria → loop independently to completion.

Changes

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.

  1. 9d ago First seen · 60 lines · 46 tokens per session scan A 0ffc567b2df9

Subscribe to this mod's changes

karpathy-guidelines is a skill published in the GitHub repository SumonMSelim/agentguard (56 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 523 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

karpathy-coding-principles

Use when andrej Karpathy's 4 coding principles — think before coding, simplicity first, surgical changes, goal-driven execution. Use when coding, reviewing code quality, reducing overengineering,.

oyi77/1ai-skills · 46 tokens

review

Structured code review with parallel audit agents, confidence-scored triage, and optional auto-fix. Examines uncommitted changes, staged diffs, commit ranges, or specific paths. Produces a tiered report (MUST-FIX / RECOMMENDED / NIT) backed by evidence, then optionally applies fixes with verification.

greglas75/zuvo · 70 tokens

debug

Systematic bug investigation with a five-phase framework: reproduce, narrow, diagnose, fix, verify. Supports automated regression bisect via --regression flag. Produces a structured debug report with root cause analysis, regression test, and CQ/Q self-evaluations.

greglas75/zuvo · 55 tokens

refactor

Refactor existing code by extracting helpers, splitting files, removing duplication, or untangling dependencies. Supports resumable and batch runs. Use for structural changes that preserve behavior; use zuvo:build for new features.

greglas75/zuvo · 47 tokens

primitive-review

A conversational review process for finding quality and decision problems that static checks—automated rules for code or configuration—may miss.

Adelie-Squad/solosquad · 76 tokens

integrity-check

End-to-end 8-dimension verification — requirements through delivery, all aligned and correct.

andreibesleaga/GABBE · 21 tokens