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.5 | $0.00018 | $0.00492 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (17 stars, last pushed 2d ago), licensed MIT. It adds 46 tokens to every session and 1,229 once invoked, about $0.0002 per session on Opus 5.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…
hypotheses
Turns a research direction into testable hypotheses with predictions, competing explanations and the experiments that discriminate between them, including the design (controls, randomization, blocking), sample size or seed count, the pre-specified analysis, and the result that would falsify each hypothesis. Use when a…
pr-review
Review a GitHub pull request and post one formal review — advance the existing discussion and give precision-first, high-signal feedback. Judgement on the diff, not a build gate — CI validates that it builds, and a targeted probe is allowed as evidence. Use when asked to review a PR or on a cron PR scan.
code-review
Performs thorough code reviews with focus on best practices, security, performance, and maintainability. Use this skill when reviewing pull requests, auditing code quality, or getting feedback on implementations.
code-review
The shared rubric for reviewing a code change — precision-first, high-signal findings only (Critical/Important), what to check (correctness, contracts between producer and consumer, security, edge cases, regression risk, test coverage), and what is NOT a finding (pre-existing issues, linter territory, aspirational…
rust-skills
Comprehensive Rust coding guidelines with 265 rules across 26 categories. Use when writing, reviewing, or refactoring Rust code. Covers ownership, error handling, async patterns, concurrency, unsafe code, API design, memory optimization, performance, numeric safety, conversions, serde, pattern matching, macros…