Latest / AI Fire Daily / #696 Neil: Build Smarter With Andrej Karpathy's Claude Code Workflow
Transcript
- 0:00One of the world's top AI engineers rarely writes
- 0:03his own code anymore. I mean, it's kind of wild
- 0:06to think about. He just asks an AI to do it.
- 0:10Let's figure out how. It really is a fundamental
- 0:13shift in how we approach problem solving. Welcome
- 0:15to the deep dive. We are thrilled you can join
- 0:18us today. Yeah, glad to be here. We are looking
- 0:22at... Andrej Karpathy's personal workflow playbook.
- 0:26He's basically figured out how to turn a simple
- 0:28language model into a relentless proxy workforce.
- 0:32Right. It's not just an autocomplete tool anymore.
- 0:34We are unpacking his specific five -step method
- 0:37today. From the basic setup all the way to automating
- 0:40the boring stuff. Now, a lot of developers just
- 0:43dump their whole project into a chat window.
- 0:46Yeah, constantly. They hit enter and just, you
- 0:48know, hope for the best. Which is usually a disaster.
- 0:51But Kirpoffe does the exact opposite. He relies
- 0:54on a very deliberate architecture. You really
- 0:57have to if you want consistent results. But let's
- 0:59start with step one, the everyday setup. Right,
- 1:02so he configures his environment for everyday
- 1:04tasks. He uses the Mac desktop app running Claude
- 1:08Opus 5 .5. Running it locally is actually crucial
- 1:12here. Because it lets the model interact directly
- 1:14with his file system. Exactly. But the most interesting
- 1:17detail is his default effort setting. Right.
- 1:20He manually locks the reasoning effort to medium
- 1:24effort. Which feels entirely counterintuitive
- 1:27to me. How so? Well, you have access to this
- 1:29massive, state -of -the -art AI brain. Why wouldn't
- 1:33you use maximum computing power all the time?
- 1:35Because more compute doesn't always equal better
- 1:37code. Really? Yeah, it's usually a waste of resources.
- 1:41Maximum effort is slower. And it burns through
- 1:44your token limits. Exactly. Plus, max effort
- 1:47models tend to overthink simple problems. Ah,
- 1:49they over -engineer the solutions. Yeah, they
- 1:52make it way too complicated. Okay, I like to
- 1:54define medium effort simply, using moderate AI
- 1:57brain power to balance speed, cost, and quality.
- 2:00That is a perfect way to phrase it. You want
- 2:03to save the highest reasoning level for major
- 2:05architectural changes. Right. I mean, if you're
- 2:08just fixing a CSS bug, you don't need maximum
- 2:11brain power. You don't need the AI to rethink
- 2:14your whole database structure. No, definitely
- 2:16not. It makes total sense. It's like not driving
- 2:19a Ferrari just to get groceries. Perfect analogy.
- 2:22It's also about maintaining your momentum. He
- 2:24keeps his feedback loops incredibly tight, right?
- 2:27Very tight. He lets Cloud Code handle all the
- 2:29heavy lifting. The guide mentions he rarely reads
- 2:32files manually anymore. He doesn't. And he doesn't
- 2:35even run his own terminal commands. He just describes
- 2:38his intent? Yep. Cloud Code inspects the project.
- 2:41It locates the bugs. It writes the patches. And
- 2:44then actually runs the tests. It acts as an autonomous
- 2:47agent in his local environment. Which brings
- 2:50up a pretty glaring question for me. I think
- 2:51I know what you're gonna ask. Do you really just
- 2:53trust an AI to run wild in your terminal? Well,
- 2:56no. You definitely don't give it blind execution
- 2:58rights. Okay, good. That sounds dangerous. Yeah.
- 3:01The mechanism here is staged implementation.
- 3:04How does that work? Cloud proposes the terminal
- 3:07commands and the file changes first. So it creates
- 3:10a temporary staging area. Exactly. In its own
- 3:13context window. You review the exact differences
- 3:16it wants to apply. And you approve it before
- 3:19anything actually executes. Right. So you still
- 3:21review the code, but skip the manual typing.
- 3:24Mostly, yes. It's kind of like being an executive
- 3:27producer. You are directing the logic, not just
- 3:30copy editing. Exactly. You let the machine handle
- 3:33the syntax. Which perfectly transitions into
- 3:36step two. Right. How we actually communicate
- 3:38with this system. So you have this medium effort
- 3:41AI hovering in your terminal. How do you talk
- 3:44to it without completely confusing it? This requires
- 3:47a totally counterintuitive approach to prompting.
- 3:50We generally assume that more context is better.
- 3:53We do. But with complex models, less is actually
- 3:58more. I still wrestle with prompt drift myself.
- 4:02Oh, same here. I tend to over explain things.
- 4:05I add layer after layer of background information.
- 4:08It is a totally natural human instinct. We communicate
- 4:11through stories and rich context. But Karpathy's
- 4:14method relies on aggressively short prompts.
- 4:17They have to be focused on a clear, isolated
- 4:20goal. Because adding too many instructions inevitably
- 4:22confuses the model. Especially if you accidentally
- 4:25include contradictory requirements. Right. And
- 4:28to understand why, we have to look at how AI
- 4:30works. It doesn't read like a human reads. No.
- 4:33It calculates probabilities. So when you add
- 4:35paragraphs of flowery language, you introduce
- 4:38mathematical noise. You widen the probability
- 4:41distribution. So keeping it short tightens that
- 4:43distribution toward the correct answer. Exactly.
- 4:46Let's look at the specific performance optimization
- 4:48example. The prompt in the guide is incredibly
- 4:51stark. It is completely stripped of pleasantries.
- 4:54It just says, identify what's slowing down the
- 4:56website. Notice what is missing there. He doesn't
- 4:59list specific files for it to check. Right. He
- 5:02completely avoids telling the model how to fix
- 5:04the code. He just defines the desired end state.
- 5:07But there is a crucial second sentence in that
- 5:09prompt. Oh, right. Keep existing futures working
- 5:12and run tests. That is the guardrail. You define
- 5:15the destination and then the absolute most important
- 5:18constraint. Do not break the current build. And
- 5:20then you get out of the way. The guide highlights
- 5:23a fascinating framework he uses for this. Yeah,
- 5:25something called ASD -STE100? Simplified technical
- 5:29English. It is a brilliant application of an
- 5:31old concept. It was originally designed for aerospace
- 5:34maintenance manuals, right? Back in the day,
- 5:36yeah. The idea is to remove all ambiguity. So
- 5:40mechanics don't accidentally break an airplane
- 5:41due to a confusing sentence. Exactly. It completely
- 5:45restricts your vocabulary. You use one word for
- 5:48one concept. No synonyms. You focus purely on
- 5:51direct actions and clear states. Right. But I
- 5:54have to ask about the trade -off here. Okay.
- 5:56Doesn't using simplified technical English strip
- 5:58away necessary nuance? Not at all, actually.
- 6:01Code is fundamentally rooted in logic. And human
- 6:04nuance is often just ambiguity. disguised as
- 6:08sophistication. Oh, that's a good point. Ambiguity
- 6:11is the enemy of logic. So by stripping away that
- 6:15flowery language, you reduce the token noise.
- 6:17Precisely. Right. Clarity actually prevents the
- 6:20AI from hallucinating complex features. It really
- 6:22does. You're speaking a language that aligns
- 6:24with deterministic logic. OK, so short hyper
- 6:28clear prompts work beautifully for targeted fixes.
- 6:31They do. But what happens when you inherit a
- 6:33massive tangled code base? Oh, the legacy projects.
- 6:37something so large you can't even hold the architecture
- 6:39in your head. That brings us to the third step,
- 6:42visualizing complexity. This might be my absolute
- 6:45favorite insight from the whole guide. It is
- 6:47a game changer. Instead of reading dozens of
- 6:50raw code files, Karpathy generates visual aids.
- 6:53Because human working memory maxes out at around
- 6:56seven items. When a developer hits a complicated
- 6:58project, they usually spend days mapping it out.
- 7:01Tracking out data moves between 50 different
- 7:03files. Karpathy bypasses that entirely. He asks
- 7:07Claude Code to build interactive diagrams. The
- 7:09guide provides a specific prompt he calls the
- 7:12Architecture Explorer. Right. You ask the AI
- 7:14to build a professional interactive HTML dashboard.
- 7:18It reads the raw code and generates a node -based
- 7:20diagram. It physically maps out the major components.
- 7:24And it draws directional arrows showing exactly
- 7:26how they connect. So you can actually see the
- 7:28data flow visually. Like you trace exactly what
- 7:31happens under the hood during a search. Or when
- 7:33a user clicks Add Cart. The AI analyzes the entry
- 7:36points and the dependencies. And then it renders
- 7:39it as a visual web. Wait, isn't generating a
- 7:43whole interactive dashboard just to understand
- 7:45code a bit overkill? It definitely sounds like
- 7:48overkill if you are used to traditional coding.
- 7:51It seems like a lot of work. But think about
- 7:54the mechanical time investment. Mentally mapping
- 7:58an unfamiliar codebase takes days of scrolling.
- 8:01You are constantly taking notes and losing your
- 8:03place. Exactly. But generating this dashboard
- 8:06takes the AI about 45 seconds. Wow. You just
- 8:11open the standalone HTML file in your browser.
- 8:14And it groups related components by responsibility.
- 8:17Right. You can actually click a node on the screen
- 8:20to see its purpose. It reveals the related files
- 8:23instantly. And this is where it gets incredibly
- 8:25powerful. How so? Because it maps the dependencies
- 8:28visually, it highlights performance bottlenecks.
- 8:31How does a bottleneck actually look in a node
- 8:34diagram? In raw text, a bottleneck is hidden
- 8:37across 20 different files. It is basically invisible.
- 8:41Right. But in a node diagram, it looks like 20
- 8:43bright red arrows. All pointing to one overloaded
- 8:47database node. It becomes instantly obvious.
- 8:49And it does all this without modifying a single
- 8:51line of the actual application. Yep. It just
- 8:54creates this disposable, fully responsive dashboard.
- 8:57You can zoom in, pan around, and explore the
- 9:00logic. But there is a catch. Can we really trust
- 9:03these generated dashboards to be accurate? That
- 9:05is the big question. What if the AI hallucinates
- 9:08a connection that doesn't actually exist? That
- 9:10risk is mitigated by a very strict rule in the
- 9:12prompt. OK, what is the rule? It explicitly instructs
- 9:15the AI to base explanations solely on existing
- 9:19code. So it is forbidden from inventing components.
- 9:22It strictly acts as a mirror, reflecting the
- 9:25current state. It strictly visualizes existing
- 9:27files. It doesn't invent new logic. Exactly.
- 9:30It just translates raw text logic into spatial
- 9:33logic. Okay, so seeing the architecture is step
- 9:35one. Right. But fixing multiple parts of that
- 9:39architecture at the same time requires a team.
- 9:42Enter the agent swarm. This is step four, right?
- 9:44Yes. Orchestrating a multi -agent sprint to tackle
- 9:47parallel tasks. We are moving from using the
- 9:50AI as a single tool to managing a workforce.
- 9:53You are no longer asking for a linear task. You
- 9:56are coordinating parallel processing. Karpathy
- 9:58uses Claude Opus as the lead coordinator here.
- 10:01And he spins up instances of Claude Sonnet to
- 10:04act as sub -agents. Which is a brilliant cost
- 10:06-saving measure. Sonnet is faster and cheaper.
- 10:09It's perfectly suited for isolated tasks. While
- 10:11Opus retains the high -level reasoning to manage
- 10:14the overall project. Let's break down the e -commerce
- 10:16example from the guy to see this. He deploys
- 10:19three Sonnet agents to run at the exact same
- 10:21time. Agent 1 is assigned the shopping experience.
- 10:24So it evaluates the customer journey logic. Browsing
- 10:27products. Adding items to the cart, checking
- 10:29out. It basically looks for friction points.
- 10:32Simultaneously, Agent 2 focuses on search and
- 10:35product discovery. It evaluates how customers
- 10:38find what they want. Handling edge cases like
- 10:41empty search results. And then Agent 3 tackles
- 10:44accessibility. Ensuring keyboard navigation works
- 10:46smoothly. Adding screen reader support without
- 10:49breaking the visual design. Right. Now, to make
- 10:52this swarm efficient, you have to manage the
- 10:54context. He filters out unnecessary data before
- 10:57handing it to the sub -agents. He uses lightweight
- 10:59code searches to narrow the focus. This drastically
- 11:02reduces token usage for each agent. And just
- 11:05to define token usage real quick. Go ahead. The
- 11:08basic building blocks of text that AI reads and
- 11:10writes. Perfect. By limiting those tokens, you
- 11:12keep the agents fast and focused. Whoa. Imagine
- 11:16scaling to a billion queries or a swarm of dozens
- 11:19of agents. The scaling potential is just staggering.
- 11:22You essentially have a dedicated tireless development
- 11:24team on standby. You could rewrite entire legacy
- 11:27platforms in an afternoon. But I see a huge potential
- 11:30problem with this architecture. Merge complex.
- 11:33Exactly. When all these independent agents finish
- 11:35at the exact same time. How do you avoid a massive
- 11:38collision of code? Right. That is the most critical
- 11:40part of the orchestration. The prompt establishes
- 11:43strict boundary rules, doesn't it? Yes. Each
- 11:46sub -agent is responsible for entirely separate
- 11:49files. Oh, so they aren't tripping over each
- 11:51other's work. And then the lead coordinator steps
- 11:54back in. Claude Opus reviews the changes from
- 11:56all three sonnet agents. It creates a temporary
- 11:59staging branch in its head. It runs logical compatibility
- 12:02checks across everything. Before merging anything
- 12:05into the main file system. Opus acts like a manager,
- 12:08combining the isolated files seamlessly. It acts
- 12:11as the ultimate gatekeeper. So the swarm identifies
- 12:13the bottlenecks and fixes the website. But how
- 12:17do we ensure human error doesn't break it again
- 12:18tomorrow? That brings us to the final step of
- 12:20the workflow. But before we dive into how Karpathy
- 12:23automates his problem solving, let's take a quick
- 12:25break. We are back. We are looking at the final
- 12:31piece of the puzzle, step five. Building Kessam
- 12:34scripts and automating workflows. This is all
- 12:37about automating daily annoyances so you never
- 12:39do them twice. Karpathy has this really interesting
- 12:42operational habit. When something annoys him,
- 12:45he refuses to just power through it. He stops
- 12:48and builds a quick AI solution. Like that project
- 12:51called HackerTube mentioned in the guide? Right.
- 12:54He found it annoying to manually search for YouTube
- 12:56videos. The ones recommended in text on Hacker
- 12:58News. So instead of searching for them himself,
- 13:01he used Claude Code. He automated the entire
- 13:04extraction and collection process. He basically
- 13:07spun up a custom website just to solve a minor
- 13:09annoyance. It is a total mindset shift. You stop
- 13:12doing manual labor and start building automated
- 13:15infrastructure. Let's apply this to the e -commerce
- 13:17example we have been tracking. Okay. Let's say
- 13:20you want to automate your product data checks.
- 13:22You absolutely do not want to review a database
- 13:25of products manually every week. So you prompt
- 13:27the AI to build a product catalog health monitor.
- 13:30It's like hiring a tireless night watchman for
- 13:33your database. That is a great analogy. The prompt
- 13:36asks Claude to write a custom script. A script
- 13:39that aggressively validates every single product
- 13:41entry. It scans the system for missing product
- 13:44names. It flags invalid pricing structures. It
- 13:47hunts down duplicate IDs. It even performs a
- 13:50live image health check. dynamically pinging
- 13:53the servers to look for broken image URLs. And
- 13:56what's really impressive is how the AI handles
- 13:58the technical hurdles. Right. It autonomously
- 14:01builds in logic for network timeouts. So a slow
- 14:04server response doesn't crash the entire validation
- 14:06scan. It writes robust error handling without
- 14:09you even asking for it. The final output is an
- 14:12automated HTML report. It elegantly displays
- 14:15the total number of products checked. It groups
- 14:18the discovered issues by severity levels. It
- 14:21provides the exact product IDs causing the errors.
- 14:24And even recommends the specific database fixes.
- 14:27The best part is how it packages this automation.
- 14:30It doesn't just give you a loose script. No,
- 14:32it creates a reusable command like npm run catalog
- 14:35check. So it becomes a permanent part of your
- 14:38environment. In the example, they ran this against
- 14:40600 products. It checked everything almost instantly.
- 14:44All the asynchronous tests passed. And the original
- 14:46product data remained completely untouched. It
- 14:49acted strictly as an observer and reporter. It's
- 14:52like stacking Lego blocks of data. You build
- 14:54the validation structure once and it just runs
- 14:56forever. But what about maintaining these AI
- 14:59-generated scripts long -term? Well, what do
- 15:01you mean? Doesn't your codebase just become a
- 15:03messy graveyard of old AI tools? Not if you treat
- 15:06the AI as your long -term maintenance team, too.
- 15:09Oh, I see. If your core data structure changes
- 15:11six months from now. You do not open the script
- 15:14and rewrite it manually. No, you just give Claude
- 15:16the new context. You just prompt the AI again
- 15:18to update the script later. Exactly. The AI maintains
- 15:21what the AI built. You just manage the evolving
- 15:24requirements. Okay, let's zoom out and look at
- 15:27the big picture here. The overarching theme for
- 15:29you, the learner, is a fundamental shift in perspective.
- 15:33The shortcut to being well -informed here is
- 15:35realizing what AI actually is now. It is no longer
- 15:38just an autocomplete tool helping you type faster.
- 15:41It is a proxy workforce. We just walk through
- 15:44a literal master class in productivity. You start
- 15:47by setting clear, isolated goals. You lock the
- 15:50system to medium effort for that perfect balance
- 15:52of speed and cost. You abandon flowery language
- 15:55and keep your prompts ruthlessly short. You stop
- 15:58trying to read raw code and force the AI to map
- 16:00it visually. You orchestrate multi -agent swarms
- 16:03to tackle parallel problems. And you automate
- 16:06every single repetitive annoyance the moment
- 16:09it bothers you. This is how you unlock Carpathi
- 16:12-level output. You permanently step out of the
- 16:14manual labor of coding. And you step into an
- 16:17executive management role. You give the AI a
- 16:19clear target. You let the models figure out the
- 16:22granular technical implementation. And your only
- 16:24job is to review the logic of the results. So
- 16:27here is a challenge for you today. Try just one
- 16:30of these steps. Take whatever complex project
- 16:33you are currently stuck on. Open your AI tool
- 16:36of choice. And ask it to generate a visual node
- 16:39map of the architecture. See what happens when
- 16:42you look at the problem spatially instead of
- 16:44textually. It might completely change how you
- 16:47view your own workflow. But it also leaves us
- 16:49with a pretty heavy thought. If the AI is writing
- 16:52the code, mapping the architecture, fixing the
- 16:55bugs, and running the QA, in five years, is the
- 16:58only real skill left for a developer just having
- 17:01good taste and knowing what goal to set?