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 oyi77/1ai-skills --skill karpathy-coding-principlesgit clone --depth 1 https://github.com/oyi77/1ai-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/oyi77/1ai-skills/karpathy-coding-principles)<a href="https://agentmods.dev/skills/oyi77/1ai-skills/karpathy-coding-principles"><img src="https://agentmods.dev/badge/skills/oyi77/1ai-skills/karpathy-coding-principles/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/oyi77/1ai-skills/karpathy-coding-principles"><img src="https://agentmods.dev/badge/skills/oyi77/1ai-skills/karpathy-coding-principles.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.00046 | $0.01229 |
| Opus 5 | $0.00023 | $0.00615 |
| Sonnet 5 | $0.00009 | $0.00246 |
| Haiku 4.5 | $0.00005 | $0.00123 |
Grade A, and why
karpathy-coding-principles 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 6d 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 — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.
When NOT to Use
- Task is outside your authorization scope
- You need to implement controls (use implementing-* skills)
- Task is about analysis, not action (use analyzing-* skills)
- You don't have access to target systems
- Task requires compliance expertise (consult professionals)
- Task is about defense, not offense (use defensive skills)
Overview
Andrej Karpathy's 4 coding principles distilled into actionable rules for AI agents and developers. Focuses on reducing overengineering, maintaining simplicity, making minimal changes, and verifying outcomes. Originally from multica-ai/andrej-karpathy-skills.
Capabilities
- Enforce explicit reasoning before writing code
- Prevent speculative features and unnecessary abstractions
- Restrict changes to only what the task requires
- Convert imperative tasks into declarative goals with verification
When to Use
Trigger phrases:
-
"karpathy coding principles"
-
"Writing or reviewing code for quality"
-
"Reducing overengineering in implementations"
-
"Coaching LLMs to produce cleaner output"
-
Writing or reviewing code for quality
-
Reducing overengineering in implementations
-
Coaching LLMs to produce cleaner output
-
Code review to catch scope creep
-
Refactoring sessions to simplify architecture
-
Any coding task where discipline matters
Principle 1: Think Before Coding
Before writing any code, reason explicitly about the problem.
- Surface assumptions — state what you believe about the requirements
- Ask clarifying questions — do not guess when ambiguity exists
- Outline your approach in plain language before implementation
- Consider edge cases and failure modes upfront
# BAD: Jump straight to code
def process(data):
# immediately writing implementation
# GOOD: Think first
# Assumption: data is a list of dicts with 'id' and 'value' keys
# Edge cases: empty list, missing keys, negative values
# Approach: validate -> transform -> aggregate
def process(data):
...
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.
- 6d ago First seen · 166 lines · 46 tokens per session scan A 435a15aab2e5
karpathy-coding-principles is a skill published in the GitHub repository oyi77/1ai-skills (12 stars, last pushed yesterday), licensed MIT. It adds 46 tokens to every session and 1,229 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-09-03.
Other skills, from other repositories
karpathy-coder
Use when writing, reviewing, or committing code to enforce Karpathy's 4 coding principles — surface assumptions before coding, keep it simple, make surgical changes, define verifiable goals. Triggers on "review my diff", "check complexity", "am I overcomplicating this", "karpathy check", "before I commit", or any code…
security-review
AI-powered security analysis of code changes — traces data flow, detects injection, auth bypass, secrets exposure, and unsafe deserialization across files. Use when reviewing pending changes, before release-branch, during verify-work Phase 5, during build-epic Step 0 threat modeling, or when the user says "security…
audit-code
Self-review checklist for the coding agent to run before dispatching a reviewer. Checks CONVENTIONS.md compliance, Boy Scout Rule, test coverage, types, and SOLID. Produces a pass/fail checklist. Use before request-review, before committing, or when user asks for a code quality check.
request-review
Dispatch a fresh reviewer agent with a clean context to critique the code after audit-code passes. The reviewer has no shared state with the coding agent and gives a genuine second opinion. Use after audit-code passes, before committing, or when user wants an independent code review.
respond-review
Act on a reviewer agent's feedback systematically — categorize findings, apply fixes, verify tests still pass. Use after request-review returns a report, or when user wants to work through code review findings.
nlpm-audit
Audit SKILL.md, AGENTS.md, prompts, hooks, and plugin manifests for instruction conflicts, quality, broken references, and manifest-to-disk drift.