Aaron O'Leary

#vibecoding: What are your favorite Cursor pro-tips?

Recently stumbled across this Cursor pro-tip from Ian Nuttall on X:

"1. ask it to recommend a folder structure

2. ask it to actually create the folder/files based on that this makes it 10x easier for me to get started and Cursor is more accurate using codebase cos it knows where to update files."


That got me thinking, what other pro tips are people using to generate better code, ship faster, organise your space better, etc. Drop em below:

5.3K views

Add a comment

Replies

Best
Charlie Reagan

Hi Aaron! Ive been vibe coding with cursor for about four months. I would say the biggest success factor is feeding the AI agent crisp/relevant/official documentation. For example: want to integrate the LemonSqueezy API into your app? Give cursor access to the official documentation, and it will get set up the correct way from the beginning, and also have a troubleshooting guide if needed. The problem right now is that most documentation isn't unified: its a set of disparate links on a website.

If you are interested, I made a chrome extension that creates unified documentation (markdown) in seconds from any website. Its 100% free (no ads) on the Chrome Web Store: https://chromewebstore.google.com/detail/kgeoehjdciibpbdabmkkooghgffehcli?utm_source=item-share-cb

I would say without a doubt, using that has saved me days of my life 😀

Good luck and hit me up if you want to discuss vibe coding!

-Charlie

Aaron O'Leary

@charlie_reagan1 Oh interesting! I love that you made a chrome extension for that. Definitely going to try it out!

Tijs Teulings

@charlie_reagan1 do you just add the result in your project in a docs folder? I’ve used the documentation feature in cursor which I assume does something similar although it’s hard to tell if the agent actually references anything in there if you don’t specifically point it at one of the docs it indexed.

Charlie Reagan

@_tijs Exactly! And then when the agent gets stuck, i just @ the correct documentation (on each request if necessary).

It definitely is a lifesaver. Im making a game today, Claude and Grok got totally stuck. I pointed Cursor to the official Phaser documentation that i had created and it figured it out in seconds. Saved me hours of debugging.

Tijs Teulings

@charlie_reagan1 oh that’s great! I’ve tried building games with it with the love2d engine but I could not get past the moon lander complexity level. Might work better with a html5 game engine anyway though. I’ll give that another shot

André J
  1. Select a bunch of code. 2. Ask: "How can this be improved". 3. Read through the recommendations and cherry-pick what makes sense. 4. Use thinking models like "Sonnet 3.7 max thinking" or O1 (regular) 5. Store the recommendations in another file, while refactoring the code based on the recommendations. 6. Refactor with the text from the recommendations. 7. Move through your code base and improve it while tests keep running.

Aaron O'Leary

@sentry_co Oh this is a genius workflow! Going to try this out as I'm kind of tired of getting lost in a sea of changes and not knowing where things went wrong

André J

Yeah. I can imagine! Tick tock. You add changes. In tick. Then you refactor and improve in Tock. don't let management think development is just tick tick tick tick ;) That is a sure way to build an unmanageable spaghetti monster that moves very slow.

Tijs Teulings

I do this, having it create the project skeleton, and also ask cursor to update the readme and the cursorrules files with whatever structural/architecture change we come up with. That way you can refer to the readme and it will also check its own rules when doing new changes later.


I also find cursor works better when it has some linting rules and tests to refer to, and when the language is typed eg typescript vs javascript.


The biggest issue I run into is code duplication. It always ends up duplicating functions or complete modules when making some new feature until you very specifically tell it what to re-use. If anyone has good tips to reliably prevent this behavior I’m all ears.

Aaron O'Leary

@_tijs Oh now this is smart! The code duplication is annoying it does that to me sometimes also

Chris Messina
Top Hunter

@_tijs  @aaronoleary I'm frequently @-mentioning redundant sections of code and asking Claude to de-dupe and update imports and references. This works better in Windsurf.

Tijs Teulings

@aaronoleary  @chrismessina never tried windsurf. I wonder how they manage to push back on that issue then; maybe simply better prompting. I noticed Cursor has custom modes now perhaps some experimenting there might help.


Would be cool if they could have a second small model double check new changes against the existing code base for duplicates. Could even be a local model if it was super specialized for the task.

Tasos V

For me being explicit and very descriptive with my prompts has been the key.

I am a JS/TS/Node dev so I use v0.dev for my products. Every time I do a prompt like:
"create me a beautiful site with simple code and modern responsive UI" , we have drama and terrible code.

Instead, I would do the prompt like this:

" Create a very clear and fully responsive across all devices app that has the following functionality:
1. Authentication with Supabase and a very minimal DB schema to store user info.
2. A minimal but very beautiful UI that is aligned to the image I am attaching (here i attach and image with name: idealui)

3. The app does ___________________________ .

4. The code should be clean, with a functional programming paradigm focus, and without unnecessary rerenders (this is very React/NextJS relevant) .

5. Make sure the UX of the app is very clear and the value extracted by the user is 100% optimized"

This prompt, after half a year using AI to build things faster, is my go to with v0.dev . The fastest thing i shipped, took 2 and a half hours.

Aaron O'Leary

@cryptosymposium True, it can't be understated how important the initial prompt is. I'm going to try out your template! Also side note, what do you think of @V0.dev I've been meaning to try it out

Tasos V
@aaronoleary yeah the initial prompt is probably what will define if u are going to spend a couple of hours on the app and get it ready or never launch it 😅 v0.dev is a good tool. I dont think it fits to the "no-code" profiles though. you need to be technical to use it, and familiar with NextJs/Node. otherwise i think it can get messy very fast. Unless u dont want to track any data and just launch a static visual thing. But...the biggest problem of it is when u fork stuff. When your chat gets too long, it asks u to fork it and start clean, for me 75% of the time, it fucks up.
Gabe Perez

I constantly see people say to create a readme or a reference doc but I have yet to find a pretty simple way to do this? Curious if you've seen any examples of that @aaronoleary.

The folders thing I've actually don and it's super helpful! My other tips are to plan out the product roadmap and feature list with ChatGPT or another non-coding space to help you think through each feature you want to build one step at a time so you don't overcomplicate and break your build(s).

Charlie Reagan

@aaronoleary  @gabe I create a file called ai_context.md and put it in the (hidden)folder: .cursor , typically ill ask GPT/Claude/Grok to create the first version with the explicit instructions that this is for an AI agent and needs to be brief. Same for the README file. Then at the end of each coding session, just ask your AI Agent to update those two files if applicable.

It can look something like this for example:
# AI Context for [Project Name] ## Project Overview - Purpose: [Brief description of what the project aims to achieve] - Scope: [High-level boundaries or focus areas of the project] - Target Audience: [Who the project is intended for] ## Key Details - Language(s): [Programming languages or frameworks used] - Dependencies: [List key libraries, tools, of external resources] - Environment: [e.g., Node.js, Python, web browser, etc.] ## File Structure - [folder/file]: [Purpose or role in the project] - [folder/file]: [Purpose or role in the project] ## Coding Guidelines - Style: [e.g., indentation, naming conventions] - Best Practices: [e.g., error handling, modularity] - Conventions: [e.g., specific patterns or rules to follow] ## AI Assistance Preferences - Tone: [e.g., formal, concise, explanatory] - Detail Level: [e.g., high-level suggestions vs. detailed code] - Tasks: [e.g., code generation, debugging, explanations] ## Additional Notes - [Any extra context, quirks, or specific instructions for the AI] - [e.g., "Avoid suggesting deprecated methods" or "Focus on performance optimization"] ## Version History - [Date]: [Brief note on changes or updates to the context]

Tijs Teulings

@aaronoleary  @gabe if you already have a project fleshed out it’s as simple as asking cursor to “create a readme for this project”, most models will do decent summaries which is what a readme is basically. If you are starting from a blank it might help to ask the agent to ask you questions about the project and write down the result as a report. Most modern models are pretty good at asking the right questions to get to solid product description

steve beyatte

This works well for me:

  • One chat window for each feature. The second I try to cram too much into the context window or do multiple features in one window, I get worse results

  • Start with a readme doc that we both agree on is the plan. Agree on implementation details in the doc.

  • Tell Cursor or Windsurf that it can't change the doc and to check the doc after each code change to ensure it's following the plan

  • Optionally have it start by writing tests from the doc and use it like the above doc

  • Then go write the code, checking the tests and the docs against the plan


Aaron O'Leary

@steveb the one chat window for each feature is a great idea!

Shekhar K. Sharma

I have added this line in the cursor rule file that has improved the logical responses.


  • Learn from package.json on what libs already exists in this project and if new needed add them as -S or -D as relevant. And then, revise yourself with `npm view <package-name> readme` cli command.

Alex Lou
  1. Take a github repo

  2. Tell cursor to incorporate it into your code (of course do so only under suitable licenses and give credits)

  3. Be specific about the desired outcome and ask for a step-by-step implementation with your consent on each step

  4. BOOM! It works out magically especially for plugins

IMHO, Github Copilot works better on this (for natural reasons) but Cursor isn't too far away.

Dima Havryliuk

Def, cloudformation. After you wrote the code with all the functionality you wanted, ask Cursor to create the DBs and Api gateways, etc that this script needs. It will write the yaml file and then setup the backend services for you. Insane!