1. Home
  2. Greg Isenberg

Sep 12, 2024

How tagging official docs fixes Cursor AI

Michael Skimales

40 min → 1:37

Overview

Greg Isenberg explains how to get the best results from AI code editors like Cursor through thorough planning, setting context, tagging official documentation, and using AI for debugging and code explanations.

3 things to know

Skimales: AI works best as a partner you lead

Michael Skimales explains that developers get the best results by treating AI as a collaborative partner and providing a clear plan and visual direction before writing code.

More

The developer's role is to provide a clear plan and direction, using a "developer mindset" of planning and visualization before execution.

▶ Watch at 3:10

Isenberg says the best coding starts outside the editor

Greg Isenberg says the most effective AI coding workflow begins outside the editor by sketching wireframes on paper or in Figma and using visual generators like v0.

More

This involves sketching wireframes (on paper or with tools like Figma) and using UI generators (like v0) to create a clear visual target for the AI.

▶ Watch at 10:50

Greg Isenberg: Tagging official guides keeps AI facts current

Greg Isenberg explains that AI output improves when given better context, such as tagging official documentation for current facts, writing project rules in a special file, and sharing the whole codebase.

More

The quality of the AI's output is directly proportional to the quality of the context provided.

▶ Watch at 21:14

Also in this episode

Greg Isenberg speeds up coding by copying working parts

Greg Isenberg says developers can build much faster by giving the AI an existing, working component and asking the tool to copy and adjust it for a new purpose instead of starting from scratch.

▶ Watch at 30:32

AI for Debugging and Learning

Use the AI as a powerful tool to overcome challenges and deepen your understanding.

More

If one AI model gets stuck, you can present the problem and failed attempts to another model. You can also use simple prompts to ask the AI to explain complex code like a personal tutor.

Quotes

“You're the boss, the AI's the copilot.”

▶ Watch at 3:10

“Step one of being good at Cursor: don't go on Cursor.”

▶ Watch at 10:50

“Any technology you're using, the docs are usually the best source of truth.”

▶ Watch at 21:14

2 more quotes

“Explain this code to me like a beginner. I want to know the flow, logic, and overall how things work.”

▶ Watch at 30:32

“This works for this page. Can we do the same thing for this page, but...”

▶ Watch at 35:55

Full summary

Episode Overview

  • This episode is a masterclass on how to get the best results from AI code editors like Cursor, emphasizing a strategic approach over simple prompting.
  • The conversation stresses the critical importance of thorough planning and context-setting before writing any code, treating the AI as a copilot rather than an autonomous pilot.
  • It covers advanced techniques for improving AI accuracy, such as providing the entire project structure and "tagging" official documentation to ground the AI in the most current information.
  • The discussion explores how to leverage AI not just for code generation, but also for debugging, explaining complex code, and rapidly iterating on existing components.

Key Concepts

  • The Copilot Mindset: Treat the AI as a collaborative partner that you must lead. The developer's role is to provide a clear plan and direction, using a "developer mindset" of planning and visualization before execution.
  • Preparation is Key (Measure Twice, Cut Once): The most effective workflow starts outside the code editor. This involves sketching wireframes (on paper or with tools like Figma) and using UI generators (like v0) to create a clear visual target for the AI.
  • Context is King: The quality of the AI's output is directly proportional to the quality of the context provided. Key techniques include using a .cursor-rules file for project-specific instructions, enabling "Cursor Directory" to give the AI access to the entire codebase, and "tagging" official documentation to ensure it uses the most up-to-date information.
  • AI for Debugging and Learning: Use the AI as a powerful tool to overcome challenges and deepen your understanding. If one AI model gets stuck, you can present the problem and failed attempts to another model. You can also use simple prompts to ask the AI to explain complex code like a personal tutor.
  • Accelerated Development with Templates: Instead of building every feature from scratch, you can significantly speed up development by providing the AI with an existing, working component and asking it to duplicate and modify it for a new purpose.

Quotes

  • At 3:10 - "You're the boss, the AI's the copilot." - Michael Skimales emphasizes that the user must lead the development process.
  • At 10:50 - "Step one of being good at Cursor: don't go on Cursor." - Greg Isenberg jokes about the importance of using other planning and UI tools before starting to code.
  • At 21:14 - "Any technology you're using, the docs are usually the best source of truth." - The speaker explains the rationale for "tagging docs," as it ensures the AI uses the most accurate information instead of outdated data from its training set.
  • At 30:32 - "Explain this code to me like a beginner. I want to know the flow, logic, and overall how things work." - A powerful prompt demonstrating how to use the AI as a teaching tool to break down and explain existing code.
  • At 35:55 - "This works for this page. Can we do the same thing for this page, but..." - The speaker provides a practical prompt template for asking the AI to duplicate and modify an existing feature, a key time-saving technique.

Takeaways

  • Plan before you prompt; invest time in sketching wireframes and defining your project's structure to achieve significantly better results from your AI code editor.
  • Maximize AI performance by providing rich, high-quality context, such as giving it access to your full project directory and linking it to official documentation.
  • Leverage the AI as more than just a code generator; use it as a debugging partner, a personal tutor to explain complex topics, and an accelerator for modifying existing components.

Watch the full episode 40 min

Read along with the audio summary

According to Greg Isenberg, the secret to mastering an artificial intelligence code editor like Cursor is to avoid opening it at all when you start a project. In this episode, which came out on September 12, 2024, Greg Isenberg and Michael Skimales share a masterclass on getting the best results from AI code editors through a strategic approach rather than simple prompting. By the end, you will learn how to plan your projects, feed the AI rich context, and use it to debug, learn, and build software much faster.

Lead your AI like a copilot, not an autonomous pilot. Handing over the controls entirely to artificial intelligence is a recipe for frustration, because the software still needs a leader. Michael Skimales points out that you are the boss, and the AI is the copilot. A developer's real job is to bring a developer mindset, meaning you visualize and create a clear plan before any execution happens.

Once you accept your role as the boss, you will find that the best coding workflow actually begins outside the code editor. Greg Isenberg jokes that step one of being good at Cursor is to not go on Cursor. Instead, start by sketching wireframes, which are basic visual outlines of a page, either on paper or in a design tool like Figma, and use user interface generators like v0 to create a clear visual target for the AI.

With your visual target ready, you can unlock much better code by feeding the AI the right context. The quality of what the AI builds is directly proportional to the quality of the background information you give it. You can do this by setting up a cursor rules file for project specific instructions, and by enabling Cursor Directory so the AI can see your entire codebase, which is the full collection of code for your project. You can also tag official documentation, the written guides for a technology, because the docs are usually the best source of truth and stop the AI from relying on outdated training data.

Turn your code editor into a debugging partner and personal tutor. Even with great context, you will still hit roadblocks or run into complex code you do not understand. When one AI model gets stuck on a bug, you can simply take the problem and the failed attempts and present them to a different AI model to overcome the challenge. When you hit a confusing block of code, ask the AI to explain the flow, logic, and how things work as if you were a beginner.

Stop building every new feature from scratch when you can use existing code as a template. Instead, you can significantly speed up your work by giving the AI a component that already works and asking it to duplicate and modify it for a new purpose. To save time on your next feature, point the AI to a working page and ask it to do the exact same thing for a new page, just with your specific changes.

Getting the best results from an AI code editor comes down to planning your structure before you prompt, providing rich context like official documentation, and treating the tool as a partner for debugging, learning, and reusing working components. "You're the boss, the AI's the copilot."

More from Greg Isenberg

Related Episodes