informal engineerby @meshrahman ↗

Tools · beginner · 30 minutes · answers: “cursor ai workflow tips”

My Cursor AI workflow

How I actually use Cursor for day-to-day coding: the setup, the prompting habits that pay off, and the failure modes to expect. Retitled and migrated from the old site, tooling refresh queued.

tested on

HardwareAny machine that runs VS Code comfortably
SoftwareCursor (2024 builds, as originally written; refresh for current versions pending)
Date2024-09-01

If you’re like me, you’ve probably found yourself diving deep into the world of Cursor AI. The idea of turning a simple concept into functional code within minutes is nothing short of revolutionary. But before you get ahead of yourself, it’s crucial to understand the best practices that can help you harness the full potential of Cursor AI.

In this post, I’ll share seven essential tips that have transformed the way I use Cursor AI. These insights come from both personal experience and expert advice from seasoned developers. Whether you’re a seasoned coder or just starting out, these strategies will save you hours of time and countless headaches.


Table of Contents

  1. Plan Before You Code
  2. Leverage Cursor Directory for Better Prompts
  3. Tag Relevant Documentation
  4. Consult Other AI Models When Stuck
  5. Use AI to Explain and Learn Code
  6. Duplicate and Modify Existing Functionality
  7. Utilize Existing Code Templates
  8. Conclusion

Plan Before You Code

Measure twice, cut once. This age-old adage holds true even in the realm of AI-assisted coding. Before jumping into Cursor AI, take the time to plan your project thoroughly.

I can’t stress this enough: planning is crucial. Before jumping into Cursor AI, take some time to sketch out what you want to build. Whether it’s on paper, Paint, or Figma, having a visual reference makes a huge difference.

For example, when I was working on a web application recently, I drew a simple wireframe on my iPad. This helped me visualize the layout and functionality before I even started coding. Trust me, spending some time planning can save you hours later on.

Why This Matters: Providing Cursor AI with a clear plan and visual references gives it more context, resulting in more accurate and efficient code generation.

Leverage Cursor Directory for Better Prompts

Did you know there’s a resource called Cursor Directory that can significantly improve your prompts?

Example Prompt:

You are an expert in TypeScript, Node.js, Next.js, React, and Tailwind CSS. Follow best practices and write clean, maintainable code.

Benefits:

Tag Relevant Documentation

Context is king when it comes to AI models.

How-To:

  1. Go to the Composer view in Cursor.
  2. Click on Add > Docs.
  3. Paste the URL of the documentation you want to add.
  4. Name it appropriately for easy reference.

Outcome: With tagged documentation, Cursor AI can provide more accurate solutions and even help troubleshoot issues using the latest guidelines.

Consult Other AI Models When Stuck

Even AI has its limitations. If you find yourself stuck, don’t hesitate to consult other AI models like Claude or even ChatGPT.

Steps:

  1. Copy the Problem: Include the code that’s causing issues and the solutions you’ve already tried.
  2. Provide Context: Explain what you’re trying to achieve and why the previous attempts didn’t work.
  3. Ask for Help: Paste this into another AI model and see what solutions it offers.

Why This Works:

Use AI to Explain and Learn Code

AI isn’t just for generating code; it’s also a fantastic learning tool.

Example:

Explain this code to me like I'm a beginner. I want to understand the flow, logic, and overall how things work.

Benefits:

Duplicate and Modify Existing Functionality

Reusability is a cornerstone of efficient coding.

Tips:

Utilize Existing Code Templates

Starting from scratch isn’t always the best approach.

Resources:

Advantages:


Conclusion

Harnessing the power of Cursor AI isn’t just about jumping in and coding; it’s about setting yourself up for success through careful planning and leveraging all the tools at your disposal.

Remember, the journey to mastering AI-assisted coding is a marathon, not a sprint. Embrace the learning process, and don’t be afraid to explore new methods and resources. As someone who’s navigated massive infrastructure projects and complex engineering challenges, I can attest that the time you invest in planning and learning today will pay dividends in the future.

By implementing these tips, I’ve been able to get the most out of Cursor AI and significantly improve my coding workflow. I hope these insights help you on your journey as well.

If this tutorial helped you out, I’d really appreciate it if you signed up for my newsletter.


Feel free to share your thoughts or ask questions in the comments below. You can also reach out to me on X (Formerly Twitter) @MeshRHM

changelog

one ask

If this saved you an evening, the weekly Lab Notes are more of the same.