opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

Karpathy's LLM coding pitfalls, distilled into one Claude Code file
GitHub RepoImpressions2

Project Description

View on GitHub

Karpathy's LLM Coding Pitfalls, Packaged as a Claude Code Skill

If you've ever watched Andrej Karpathy talk about LLM-assisted coding, you know he has some strong opinions. He's called out everything from "vibe coding" to the tendency of LLMs to write overly clever code that no one can maintain. The problem is, those insights are usually scattered across talks, tweets, and YouTube videos. They're valuable, but they're not actionable in your editor.

That's where this GitHub repo comes in. It takes Karpathy's observations and turns them into a single, structured file that Claude Code can actually use as a skill. Instead of keeping his advice in your head, you can now inject it directly into your coding workflow.

What It Does

The repository contains a skill definition file for Claude Code. Think of it like a prompt template, but more structured. It's built around Karpathy's known pitfalls with LLM-generated code, and it translates those into a set of rules, checklists, and good practices that Claude will follow when generating or reviewing code.

You're essentially giving Claude a "Karpathy mode" that it can switch into. When active, it should avoid common failure modes like:

  • Generating overly abstract code with unnecessary inheritance chains
  • Adding comments that restate the code instead of explaining the "why"
  • Refactoring working code just to make it "cleaner"
  • Writing code that's clever but hard to trace

The file itself is a mix of natural language constraints and explicit directives. It's designed to be plugged into your existing Claude Code setup with minimal friction.

Why It's Cool

The clever part is that this isn't a plugin or a complex framework. It's one file. That means you can read it, modify it, and truly understand what rules you're enforcing. There's no black box. If you disagree with one of Karpathy's principles, you can delete it. If you want to add your own team-specific rules, you just write them in.

It's also a great pattern for anyone who wants to codify their own engineering philosophy. Instead of repeating the same code review comments every PR, you could write a skill file that captures your preferences and let Claude handle the enforcement.

For teams, this is a lightweight way to standardize on a specific style of LLM-generated code. You can commit the skill file to your repo, so every developer's Claude instance follows the same rules. It's a shared culture file, but for your AI pair programmer.

How to Try It

Getting started is straightforward. Head over to the repo and check the README for the exact setup instructions. In general, you'll want to:

  1. Clone the repository or download the skill file.
  2. Place it in the appropriate directory for Claude Code skills (the README will show you the exact path).
  3. Restart your Claude Code session so it picks up the new skill.
  4. Start a new task and see if you notice the difference in the generated code.

You can also inspect the file contents directly. It's just text, so there's no barrier to entry. If you don't use Claude Code, you could even adapt the principles into a system prompt for any other LLM tool you use.

Final Thoughts

I think this is a really practical take on "AI best practices." Instead of another blog post with a list of tips, someone actually shipped a config file that enforces those tips in a tool. That's the kind of thing that moves the needle.

Whether you agree with every single point Karpathy makes or not, having a concrete, inspectable, and customizable artifact is genuinely useful. Give it a try, tweak it to match your own style, and you might find that your LLM pair programmer starts writing code that actually survives code review.

Find me on X: @githubprojects

Back to Projects
Project ID: b09a323c-2163-456d-ab84-288e9a716ca9Last updated: August 4, 2026 at 02:45 AM