Andrej Karpathy-inspired guidelines for Codex and Claude Code that reduce common LLM coding mistakes through clearer assumptions, simpler code, surgical changes, and verification-driven execution.
SaferSkills independently audited andrej-karpathy-guideline-for-ai-coding (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Behavioral guidelines for Codex and Claude Code, adapted from Andrej Karpathy's observations about common LLM coding failure modes.
This repository packages the ideas in a Codex-native form by centering them around workspace instruction files such as AGENTS.md and CLAUDE.md.
It is adapted from the original project:
https://github.com/forrestchang/andrej-karpathy-skillsKarpathy's critique of coding agents is still accurate across tools:
Codex is powerful, but it also benefits from explicit local guidance. This repository gives you a small instruction file that pushes coding agents toward:
Do not guess through ambiguity. Surface assumptions, name uncertainty, and ask when the risk of being wrong is material.
Read the relevant files and local conventions before making changes. Prefer project evidence over generic assumptions.
Write the smallest solution that satisfies the request. Avoid speculative abstractions, unused flexibility, and premature edge-case machinery.
Touch only what the task requires. Avoid drive-by cleanup, formatting churn, and unrelated refactors.
Turn tasks into verifiable goals. Prefer tests, builds, or direct checks over intuition when deciding whether work is complete.
Prefer actual repository checks such as tests, lint, type-check, and build commands over intuition. If verification cannot run, say why.
Simplifying implementation is fine. Silently collapsing distinct domain objects is not. Temporary feature reduction is usually safer than mixing ownership boundaries.
Ask before irreversible changes, dependency additions, schema or migration changes, network use, or writes outside the working area.
Keep default guidance short and reusable. Put project-specific workflow details in repository-local instruction files.
Copy AGENTS.md into the root of the workspace you want Codex to follow:
curl -o AGENTS.md https://raw.githubusercontent.com/hobart9527/andrej-karpathy-guideline-for-codex/main/AGENTS.mdIf you also want a Claude-compatible version in the same repository:
curl -o CLAUDE.md https://raw.githubusercontent.com/hobart9527/andrej-karpathy-guideline-for-codex/main/CLAUDE.mdOr append the guidance into an existing AGENTS.md if you already have workspace rules:
printf '\n' >> AGENTS.md
curl https://raw.githubusercontent.com/hobart9527/andrej-karpathy-guideline-for-codex/main/AGENTS.md >> AGENTS.mdYou can do the same for an existing CLAUDE.md:
printf '\n' >> CLAUDE.md
curl https://raw.githubusercontent.com/hobart9527/andrej-karpathy-guideline-for-codex/main/CLAUDE.md >> CLAUDE.mdThese guidelines are working if you see:
This repository is adapted from the original CLAUDE.md-based project at:
https://github.com/forrestchang/andrej-karpathy-skillsThe intent is not to change the ideas, only to package them for Codex.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.