Andrej Karpathy’s One-File Fix for AI Overengineering

A four-rule markdown skill derived from an Andrej Karpathy thread has become the most installed behavioral guide for Claude Code, forcing LLM agents to ask questions before they overengineer.
Andrej Karpathy carries unusual authority in the AI engineering world. From 2017 to 2022 he led Tesla Autopilot’s computer vision team; he returned to OpenAI from 2023 to 2024 to work on midtraining and synthetic data; and at Stanford he built CS 231n, the university’s first deep learning course, which grew to 750 students. When Karpathy posts observations about how large language models write code, engineers listen.

In a widely circulated thread, Karpathy identified specific pathologies in LLM-assisted coding. Models, he noted, make wrong assumptions silently, overcomplicate APIs with bloated abstractions, and touch orthogonal code as side effects. They do not manage confusion, present tradeoffs, or push back when they should. A GitHub repository called multica-ai/andrej-karpathy-skills distilled these complaints into four principles and packaged them as a single markdown file plus a Cursor rule. The result has accumulated 13.9 thousand installs and 165.4 thousand stars on the Claude Code Skills marketplace. For a repository that contains essentially no code, only constraints, that metric suggests the industry is hungry for something other than better models: it wants better behaved models.
The repository’s entire payload is a set of behavioral guidelines formatted for Claude Code’s project memory system. According to documentation on how Claude Code handles instructions, the tool traverses the directory tree from its launch point and automatically concatenates markdown memory files into the system prompt. The hierarchy runs from managed organization policy down through user memory, project memory, and local memory, with more specific files loading later and overriding overlapping instructions. This means the Karpathy skill is not merely advice; it is runtime firmware injected into the agent’s context window.
Google Cloud’s developer experience team has independently converged on a similar pattern, recommending that engineers create context files containing high-level instructions, dependency versions, and architecture diagrams to preserve state across sessions. The search giant’s engineers save plans as markdown files and instruct agents to request approval at milestones. What the Karpathy skill does is compress a senior engineer’s judgment into the same layer—turning project memory from a passive onboarding document into an active behavioral filter.
The author, who also maintains an open-source platform called Multica for running and managing coding agents with reusable skills, appears to treat this file as a prototype for modular agent behavior. The skill is portable across projects and editors, suggesting a future where behavioral modules are as reusable as software libraries.
The skill organizes its constraints around four principles that directly counter the tendencies Karpathy criticized.
Think Before Coding attacks sycophancy. LLMs often pick an interpretation and execute immediately, treating ambiguity as a bug to be smoothed over rather than a risk to be flagged. The guideline forces the agent to state assumptions explicitly, present multiple interpretations when a requirement is unclear, and stop to ask rather than guess. In effect, it installs a chain-of-reasoning requirement with social permission to push back.
Simplicity First targets the tendency toward speculative architecture. The repository quotes Karpathy’s observation that models implement bloated constructions over a thousand lines when a hundred would do. The rule prohibits abstractions for single-use code, unrequested flexibility, and error handling for impossible scenarios. The litmus test is blunt: would a senior engineer call this overcomplicated? If yes, rewrite it. This is a direct assault on the LLM’s bias toward generating plausible-looking complexity.
Surgical Changes addresses trust. One of the most common complaints about agentic coding is that an LLM asked to fix a function will also reformat an adjacent file, delete comments it does not understand, or refactor working code. The guideline restricts edits to lines that trace directly to the user’s request. It permits cleanup only for orphans created by the current change—unused imports, dead variables—while explicitly forbidding drive-by improvements. For developers reviewing diffs, this is the difference between an automated tool and an unpredictable collaborator.
Goal-Driven Execution is the positive insight. Rather than fighting the LLM’s nature, it exploits the model’s strength at looping until criteria are met. The repository cites Karpathy: do not tell it what to do, give it success criteria and watch it go. Tasks are transformed from imperative commands into verifiable goals. Add validation becomes write tests for invalid inputs, then make them pass. Fix the bug becomes write a reproduction test, then make it pass. Multi-step tasks include explicit verification checkpoints, allowing the agent to iterate independently without constant human clarification.
The skill’s popularity arrives amid rapid, messy adoption of AI coding assistants. A Codacy survey cites that 64 percent of developers have integrated AI into code production workflows and 62 percent use it for code review. Yet 36 percent of developers who have not adopted these tools cite learning effective usage as the primary barrier. The Karpathy skill functions as a shortcut across that gap. It does not teach a developer how to prompt; it pre-installs a senior engineer’s heuristics so the agent requires less hand-holding. In a market where 77 percent of developers believe AI tools will improve code quality but many still struggle with overcomplicated output, a widely trusted behavioral template has immediate appeal.
The skill is not without rough edges, and its popularity should not be mistaken for infallibility. A Hacker News discussion about writing effective Claude memory files notes that Claude often ignores instructions when they become lengthy or contain information not universally applicable to the current task. One user tested this by instructing the model to use a specific nickname, observing inconsistent adherence as evidence that the system prompt is not absolute. The Karpathy skill, despite its brevity, lives in the same fallible substrate.
The repository itself acknowledges a tradeoff: the guidelines bias toward caution over speed. For trivial fixes—a typo, an obvious one-liner—the full rigor of stating assumptions and verification loops is overkill. The value proposition is reducing costly mistakes on non-trivial work, not slowing down every interaction.
It is also worth stating plainly what this repository is. It contains no novel algorithms, no training data pipeline, no inference optimization. It is a well-curated prompt engineering artifact, a markdown wrapper around observations from a respected voice. Its impact comes from packaging and authority rather than technical invention. In a landscape flooded with AI coding assistants, that distinction matters: developers are not starved for tools, but for reliable heuristics on how to use them. Public criticism remains limited; related Reddit discussions were inaccessible due to network blocks, leaving the Hacker News thread as the primary visible skepticism.
The repository sits at the edge of a larger shift. As coding agents migrate from autocomplete to autonomous actors, the industry is discovering that raw model capability is only half the equation. The other half is behavioral constraint. The Claude Code Skills marketplace, where the Karpathy guidelines live, is an early signal of a market for reusable agent personalities—modular social contracts that define how an LLM should conduct itself inside a codebase. Cursor has its own rules format; Google Cloud advocates for session context files; Anthropic’s memory hierarchy supports increasingly granular instruction layers.
Some observers argue that future foundation models, trained on more code and human feedback, will internalize these habits and make external rule files redundant. Others suspect the opposite: as agents gain the ability to execute longer chains of action, the cost of a single wrong assumption or bloated abstraction grows exponentially, making surgical constraints more valuable, not less. The Karpathy skill does not resolve this tension. It simply demonstrates that, for now, the most effective upgrade you can give your coding agent might not be a larger context window or a faster inference engine, but a shorter, clearer set of rules written in plain English.
Sources
- Five Best Practices for Using AI Coding Assistants | Google Cloud Blog
- Writing a good Claude.md - Hacker News
- Does anyone use andrej-karpathy-skills? : r/ClaudeCode - Reddit
- Best Practices for Coding with AI in 2024 - Codacy | Blog
- Creating the Perfect CLAUDE.md for Claude Code - Dometrain
- Andrej Karpathy
- Best Practices I Learned for AI Assisted Coding | by Claire Longo
- What to include in CLAUDE.md... and what not? : r/ClaudeCode
- Karpathy's Skill Just Fixed Claude Code's Biggest Problem - YouTube
- Best AI Coding Assistant Tools of 2024 - YouTube
- CLAUDE.md for .NET Developers - Complete Guide with Templates
- Karpathy Guidelines | Claude Code Skills