karpathy-guidelines

karpathy-guidelines is a skill for Claude Code, Codex from lhh1301506137/CoTend. It costs 46 tokens per session (705 once invoked), scanned A, original, Apache-2.0.

A set of behavior rules for AI agents that write, review, or refactor code. It emphasizes small changes, stating assumptions, avoiding unnecessary complexity, and defining how success will be checked.

In plain words
What is it for?
Planning code changes, reviewing or refactoring existing code, identifying tradeoffs, limiting scope, and choosing practical checks for correctness.
Why use it?
It reduces common coding-agent mistakes such as guessing requirements, making broad edits, or finishing without a verifiable result.

Skill for Claude CodeCodex

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

Good fit Planning code changes, reviewing or refactoring existing code, identifying tradeoffs, limiting scope, and choosing practical checks for correctness.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lhh1301506137/cotend/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 lhh1301506137/CoTend --skill karpathy-guidelines
Clone the repo
git clone --depth 1 https://github.com/lhh1301506137/CoTend

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/lhh1301506137/cotend/karpathy-guidelines/github.svg)](https://agentmods.dev/skills/lhh1301506137/cotend/karpathy-guidelines)
Your own site
<a href="https://agentmods.dev/skills/lhh1301506137/cotend/karpathy-guidelines"><img src="https://agentmods.dev/badge/skills/lhh1301506137/cotend/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/lhh1301506137/cotend/karpathy-guidelines"><img src="https://agentmods.dev/badge/skills/lhh1301506137/cotend/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 705 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.
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.00705
Opus 5 $0.00023 $0.00352
Sonnet 5 $0.00009 $0.00141
Haiku 4.5 $0.00005 $0.00071

Measured 9d ago against content hash 393ff4376536, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Karpathy Guidelines

Behavioral guidelines to reduce common LLM coding mistakes, derived from Andrej Karpathy's observations on LLM coding pitfalls.

Tradeoff: These guidelines bias toward caution over speed. For trivial tasks, use judgment.

When CoTend governance is active, its canonical Execution Authorization Contract outranks this implementation guidance. Do not turn multiple purely technical L3/L4 options into a user approval when product meaning and user-impact boundaries are unchanged. Choose the simplest reversible option, state the assumption, and verify it. Ask when ambiguity can change user intent, protected semantics, scope, irreversible data, security/privacy, real cost, public API/external contracts, release posture, or another canonical stop.

1. Think Before Coding

Don't assume. Don't hide confusion. Surface tradeoffs.

Before implementing:

  • State material assumptions explicitly. Ask when uncertainty changes the requested outcome or an authority boundary.
  • If multiple interpretations produce materially different user-visible or boundary outcomes, present them. Otherwise choose the simplest reversible technical interpretation and verify it.
  • If a simpler approach exists, say so. Push back when warranted.
  • If the user goal or a protected boundary is unclear, stop. Name what is confusing and ask; ordinary implementation uncertainty remains AI-owned.

2. Simplicity First

Minimum code that solves the problem. Nothing speculative.

  • No features beyond what was asked.
  • No abstractions for single-use code.
  • No "flexibility" or "configurability" that wasn't requested.
  • No error handling for impossible scenarios.
  • If you write 200 lines and it could be 50, rewrite it.

Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.

3. Surgical Changes

Touch only what you must. Clean up only your own mess.

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.
  • If you notice unrelated dead code, mention it - don't delete it.

Read the full file on GitHub · 80 lines

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 · 80 lines · 46 tokens per session scan A 393ff4376536

Subscribe to this mod's changes

karpathy-guidelines is a skill published in the GitHub repository lhh1301506137/CoTend (2 stars, last pushed 18d ago), licensed Apache-2.0. It adds 46 tokens to every session and 705 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-31.

Related

Other skills, from other repositories

go-testing

Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.

Gentleman-Programming/gentle-ai · 26 tokens

iterative-development

TDD iteration loops using Claude Code Stop hooks - runs tests after each response, feeds failures back automatically.

alinaqi/maggy · 24 tokens

python

Python development with ruff, mypy, pytest - TDD and type safety.

alinaqi/maggy · 18 tokens

memstack-business-gdpr

Use this skill when the user says 'GDPR', 'data protection', 'privacy compliance', 'DPA', 'DSAR', 'data subject request', 'cookie consent', 'privacy audit', 'CCPA', or asks 'do I need GDPR for this repo'. Scans the repository to detect what personal data is collected, classifies sensitivity, determines whether GDPR…

cwinvestments/memstack · 121 tokens

memstack-deployment-domain-ssl

Use this skill when the user says 'setup domain', 'configure DNS', 'SSL certificate', 'domain-ssl', 'custom domain', 'HTTPS setup', or needs to configure DNS records, SSL certificates, and custom domains for any hosting provider. Do NOT use for full deployment workflows.

cwinvestments/memstack · 66 tokens

memstack-development-refactor-planner

Use this skill when the user says 'refactor', 'refactoring plan', 'code cleanup', 'reduce duplication', 'simplify code', 'tech debt', 'god class', 'tight coupling', or needs to systematically improve existing code. Identifies targets, assesses risk, and builds incremental execution plans. Do NOT use for writing new…

cwinvestments/memstack · 81 tokens