StartseiteArtikel

Neuester Leitfaden für Karpathy's Atmosphärenprogrammierung: Dreistufige AI-Programmierstruktur - Cursor in guten Zeiten, Claude in schwierigen Zeiten und GPT-5 Pro in äußerster Not.

量子位2025-08-26 09:29
Die Auswahl des geeigneten Modells für eine Aufgabe ist schon zur Kunst geworden!

Just now, the guru Karpathy released a brand - new Vibe Coding guide!

In this guide, instead of focusing on a single model, Karpathy combines the advantages of multiple models and summarizes a three - layer structure for AI programming:

  • Cursor —— It is mainly responsible for auto - completion and small - scale code modification, efficiently conveying task intentions.
  • Claude Code/Codex —— Used to implement larger functional blocks, for rapid prototyping and cross - domain code experimentation.
  • GPT - 5 Pro —— Solves the most difficult bugs or complex abstractions and provides in - depth documentation/material support.

This three - layer progressive structure is not only Karpathy's sharing of programming skills but also an upgraded after - sales service for his Vibe Coding concept.

Let's see how he does it!

In smooth sailing, use Cursor; in adversity, use Claude/Codex; in desperate situations, use GPT - 5 Pro

Generally speaking, Karpathy's three - layer structure is derived from his personal programming experience.

He structured Cursor, Claude Code/Codex, and GPT - 5 Pro according to the usage frequency of the tools and the types of tasks ——

He assigns common, simple, and local completion and modification tasks to Cursor, assigns the implementation of larger functional blocks to Claude Code / Codex, and when encountering problems that neither of them can solve, he turns to GPT - 5 Pro.

That is, in smooth sailing, use Cursor; in adversity, use Claude/Codex; in desperate situations, use GPT - 5 Pro.

Specifically, in the first layer, which is the most common situation (about 75%), auto - complete the code by pressing the Tab key in Cursor.

Here, Karpathy discovered a way of high - bandwidth communication with large language models —— Write some specific code snippets or comments at appropriate positions in the project.

The purpose is clear: Show the task intention directly through code or comments, and transmit a large amount of precise information at once, which is faster and clearer than relying solely on text descriptions.

(Karpathy's note: Sometimes the auto - completion model can be a bit annoying. Pay attention to toggling the switch back and forth.)

In addition, you can highlight a specific code segment and request a certain modification.

In the second layer, there are models like Claude Code/Codex that can be configured in the Cursor sidebar. Karpathy mainly uses them to implement some large functional blocks that are relatively easy to specify through prompts.

Overall, these tools are very useful, but the results vary.

Let's start with the advantages. In some fields that developers are relatively unfamiliar with and that are more related to Vibe Coding, they are indispensable.

For Karpathy, when writing Rust or SQL statements, which he didn't do much before, these tools are very useful. At the same time, these tools can quickly generate one - time visualization or debugging code, saving developers a lot of repetitive work.

Here, code can be created and deleted at will, no longer as precious as in the past. So, the guru coined a new term: “code post - scarcity era”

After talking about the advantages, let's look at the disadvantages:

First, this type of model is prone to going off - track. Therefore, Karpathy usually doesn't use the “YOLO mode” (full - scale hosting) and often has to press ESC to terminate the project.

Second, The code written by AI is very likely to become a mess, without the beauty of The Zen of Python.

Specifically, AI programming tools often abuse try/catch, making the abstraction overly complex; they expand the code to a large size (for example, using nested if - else when a list comprehension or a one - line if - then - else can solve the problem); they copy and paste code blocks instead of extracting a useful auxiliary function...

Developers often have to manually do a round of “clean - up” to deal with these coding style issues.

In addition, Karpathy's experience also reflects the limitations of current AI programming tools in terms of interpretability and interactivity.

For example, he wanted Claude Code to explain while writing code, but found it completely unfeasible —— AI tools obviously prefer to “write code” rather than explain why they write the code this way.

The last layer is GPT - 5 Pro. Karpathy will turn to it in the most difficult situations.

For example, when Karpathy, Cursor, and Claude Code are stuck on a bug for 10 minutes without a solution, he will copy and paste the entire problem to GPT - 5 Pro and let it work for 10 minutes, and it can actually find the bug.

Karpathy said that GPT - 5 Pro is very powerful and can dig out all kinds of profound documents and papers. It can also return highly relevant resources and clues when dealing with complex tasks such as cleaning up abstract structures, conducting literature reviews, and doing investigations.

Finally, Karpathy summarized:

Programming has opened up all kinds of possibilities between different “types” of workflows and tools, each with its own advantages and disadvantages. But this also inevitably makes people feel a certain kind of anxiety: worrying that they are not at the forefront of the “collective possibilities”. So these are just some notes from my random thoughts on Sunday, and I'm also curious to know what others are discovering.

In fact, this also reflects the significance of the guru's experience summary: Through communication and sharing of usage experiences with developers, the entire development community can continuously iterate and progress.

It's worth mentioning that 4 months ago, Karpathy shared his Vibe Coding Guide 1.0:

  • Put all relevant content into the context (In a large project, it may take a long time. If the project is small enough, simply put all the files in.)
  • Describe the specific, incremental small change that we are going to implement next. Don't directly ask for code, but ask for several high - level ideas and analyze their advantages and disadvantages. There are almost always multiple ways to do it, and the judgment of large language models is not always reliable. Then (optionally) make it more specific.
  • Choose an idea and ask it to write the first version of the code.
  • Enter the review/learning stage: Manually open the API documentation that I'm not familiar with or haven't called in the browser, ask the model for explanations, clarifications, and modifications, and if necessary, go back and try another idea.
  • Test.
  • Git commit.
  • Ask what can be implemented next. Then repeat the cycle.

It can be said that since Karpathy proposed Vibe Coding in February this year, he has been constantly improving and practicing this concept, preventing it from becoming a mere “concept game”.

Based on this, netizens have also shared their own attempts and answers.

Netizens offer suggestions online

After the guru's sharing, many netizens said they could relate deeply, feeling that their experiences were very similar to the guru's.

Basically, for small problems, they rely on AI for auto - completion, and for big problems, they rely on AI tools to provide directions and supervise the process themselves.

Some netizens said that sometimes when one model gets stuck on a problem, another model can solve it quickly.

Switching between different models and choosing the right model for each task has become an art!

Other netizens also shared their experiences: The best way to ensure the consistency of the code generated by LLM is to provide detailed requirement descriptions and functional breakdowns, along with acceptance criteria, including code style and quality specifications.

PS, a netizen noticed something: Where is my “Gemini”?

What are your amazing Vibe Coding operations? Come and show them off!

Reference links

[1]https://x.com/karpathy/status/1959703967694545296

[2]https://x.com/karpathy/status/1886192184808149383

[3]https://x.com/karpathy/status/1915581920022585597

This article is from the WeChat official account “QbitAI”, author: henry, published by 36Kr with authorization.