FREE: Complete Cursor AI Indepth Guide🤖 (Prompt Templates + 16 Page Doc) Best AI IDE - OpenAI o1 AI
In this video
- 00:00Introduction: Getting Started with Cursor AI for All Levels
- 00:31Compiling a Free Guide for Beginners, Intermediate, and Advanced Users
- 00:52Overview of Cursor AI Best Practices and Resources
- 01:13Techniques for Better Output and Creating a Product Requirements Document (PRD)
- 01:57Installing Cursor AI: Free vs Paid Versions
- 02:39Keyboard Shortcuts Overview: Floating Editor and Composer Features
- 03:12Using Cursor's Floating Composer for File Management and Project Setup
- 04:45Best Practices for Editing Workflow in Cursor AI
- 05:23Managing Changes Across Codebase with Cursor's Composer
- 06:34Efficient Query Management and Reducing Token Wastage
- 07:15Recommended AI Models: Quad, O1, and Mini for Different Coding Needs
- 07:47Tailoring Workflow with Cursor Rules and Features
- 09:08Customizing Cursor Rules and Optimizing for Beginners to Advanced Users
- 09:51Enabling Cursor Tab and Composer for Multi-File Code Editing
- 10:58Referencing Documentation in Cursor AI for Accurate Coding
- 12:07Importance of Markdown Project Structure for Efficient Queries
- 14:11Creating a Product Requirements Document (PRD) for Better AI Workflow
- 15:38Key Aspects and Benefits of Using a PRD in Development
- 16:50PRD as a Guide for AI Coding and Feature Prioritization
- 17:40Using PRDs to Align Development and Enhance AI Code Generation
- 18:51Sample PRD Template and Customization Tips
- 20:50Additional Resources and Tips for Cursor AI Development
- 22:06Upcoming Clips on AI Coding and the Future of Software Development
- 23:10Chamath on AI coding and PDRs
- 27:18Cursor Founders on future of AI coding
Links from the video
Transcript
5,744 wordsWhat's going on everybody Josh pook here and in today's video we are going to be looking at the best tips and tricks for getting started with cursor AI editor IDE this is going to help you if you're a complete beginner to cursor and maybe even coding whether you're intermediate with cursor or even if you're Advanced let's dive right into it [Music] all right guys so it's about 4:00 a.m. right now I spent the last few hours here compiling this guide and
Resource that I'm going to give to you guys for free and this is pretty much Encompass encompassing everything that I would want to know if I was just getting started with cursor and a few tips and tricks I've learned along the way so even if you're intermediate or Advanced I'm sure you can get some value here all right so this extensive document and all the templates and resources will be available down below for free if you do get some value from
This video just make sure to hit that like button hit that subscribe button so you can stay tuned for the daily uploads all right guys so here's a few things we'll cover in today's video we're going to talk about cursor best practices everything you need to know about getting started as well as kind of just a foundation with cursor we're going to dive into some cursor techniques for better output which will help you whether you're a beginner intermediate or Advanced and
Then we're going to dive into how to create a PRD a product requirements document which will help you and assist you along your coding Journey when you're using cursor for your your project all right this will make the process a lot more seamless and it's good for you and your team to make sure you're aligned to hit your project goals much quicker all right and like I mentioned before this whole training document will be in the resource section down below and
This video may be a little bit longer I will try to speedrun and only go through what is necessary here but if you do need to you can watch this video on 1.5 or two times speed and also to there will be time stamp so you can easily see where you're at and what the next chapters are so first things first if you don't already have cursor downloaded you're going to want to download cursor so you can go here download it
Create an account I would personally recommend the paid version um you can use the free version but eventually if you're going to be using cursor on the day-to-day basis and make it your main IDE I would highly recommend the paid version it's only 20 bucks a month and I know that's another $20 a month AI tool that you may be paying for but the ROI on this one is absolutely 10-fold okay and I'm also going to include a few different clips
From different locations I will help showcase one the importance of some of these points that we're going to be going through in this video as well as also give you a bit of background about cursor and some of the founders so here is a link there's links to different videos throughout this document this one is a link to the founders of cursor I would definitely recommend watching this video and I'm going to include a clip from this video shortly so you
Can see that as well all right so let's dive into the basics so we got keyboard shortcuts so first things first is the new floating editor which is control or command K and so you know what that looks like if I just click control K here you can see that I got a new floating editor within the basically inline editor okay so this is where you can go ahead and use different prompts reference different things in your code base and we'll
Get into that in just a second the second is the chat sidebar so that would be control or command L all right so that's going to toggle the chat right here next is open floating composer so this will be control I so I hit control I and you can see here we got this floating composer right here and this is one of the key features and true beauty behind cursor because this tool this composer allows cursor to create edit delete update
Files in your entire code base all right and then we have the full composer control panel and this is shift control or command I right and this is essentially the same thing as composer but you get a full panel View and over here you can create single composers but you can also create projects so to create a project if I just go ahead and create a test one right here you'll see that one we can add Focus files right here so
I could go ahead and select different files from my project this could be actual files but this could also be documentation and we'll get into that in just a second and say if you had different Focus files you can also create an overarching prompt for your project right here so typically within your whole entire project you may have these little sub projects for different things that you're doing within that project for example if we want off set up off we could
Do off connection right this could be the off connection and then we could let it know hey we're using Clerk or we're using super base off and then then we could give all the files all the different you know documentation needed and then we could create a composer here and it be referencing as you can see our off connection project so let's talk about some cursor best practices so what is the editing workflow going to look like for you so for
Minor edits you can utilize the inline editor and autocomplete features and for major or multifile changes use the chat window or you can even sometimes use the cursor composer now with the composer keep in mind that it will do those changes for you automatically so if you just want to see the changes or have a conversation or plan things out then you can also use the chat window but you could do either or technically now to generate new files or apply
Changes across the entire codebase leverage the composer like I mentioned and for change management you can review modifications in a manner similar to git reviewed changes that I really like the cursor UI interface when it makes suggestions and changes so as you can see I just ran a simple prompt telling it to set up a project for using clerk authentification and it's telling us exactly how to do that of course this isn't a real project and I don't have environment variables
Or even nextjs installed you can see it created different files such as the layout the middleware the page all these different things and if we go into those changes one we can see the changes up here so we could check each individual file and change that it made and we could approve it one by one or decline it and then we can also just accept all or reject all in the main composer window right here so you go ahead click on
These different ones it's going to show right here and you can see that it has this nice UI of highlighted green for what it's added and highlighted red for what it's deleted so it actually hasn't deleted anything of course since it's just created these files but you could accept it one by one like I said or accept it all at once okay so I'm going to show you how you can ensure that you have sufficient context when you're doing your queries
Without overwhelming cursor as well without flooding it with too much data and wasting through different tokens and kind of confusing it causing it to hallucinate so we'll dive into that in just a second as well as documentation so so employ at docs to incorporate specific documentation where needed I'm going to show you the two different ways mainly to add document ation and references within cursor and then AI model usage I personally recommend claudet 3.5 which is preferred for most coding task
This balances high quality and speed creating a nice Dev experience and then open AI 01 and 01 mini now this is ideal for planning and when quad rate limits may be reached and this offers high quality and extended reasoning capability so it's a little bit slower with these models 01 mini it's still somewhat slow but it's a little bit faster than 01 previous but if you're not familiar with 01 and 01 mini they're essentially models where they're going to reason a
Lot more so you can use them for planning or answering difficult problems or questions within your code base and if you haven't seen my video doing a deep dive on 01 and 01 mini then I'll leave that link down below as well now a few General tips tailor your approach based on the scale and complexity of the task at hand and regularly assess and adapt your workflow to maximize efficiency now this is very important we're going to talk about cursor rules
So you can change cursor rules in two main places one is the cursor settings so to do this you're going to click on the settings Cog icon in the top right then you're going to enter your rules in the box so we can see the screenshot within our cursor app we click on here and then we see the rules for AI and you can go ahead and change these rules and also within this document I've left you an example rule section
Right here now this is an example and I wouldn't say this is the best and definitely not the best for for your specific application this is just showing you an example what I would suggest is custom you know you could use this or use a variation but I would personally recommend making it custom for your app and how you like your prompts all right cuz if you're maybe a newbie or a beginner you may want something that is explaining why it's
Doing what it's doing adding comments to its output so it can ex so you can kind of learn along the way oppose for maybe if you're someone that's intermediate or advanced you may just want the code you may want it more quick and direct so definitely change this around but this will give you a sense of how you can kind of prompt your model within cursor so you're not just getting generic output that everyone else is getting you're getting it spe
Specific for your desired project and outcomes okay so you can do it in these settings very easily now you can also do it within cursor. rules F or rule do cursor rules files now to do this Within These settings right under this option you can just toggle this include cursor rules files and then you can just simply create a curs or do cursor rules file in your project and it will reference any of those different rule files okay so both are
Pretty similar but you can test it out and maybe you'll see you get a better result with either one or you get a kind of workflow or you use a Synergy of both of them and it maybe it works best for you so once you have your rules set up you can also toggle features so make sure you toggle the desired features you want So within the settings if you go to features you'll see that there's two options that you can
Toggle on one is cursor Tab and in the video that I'm linking down below two of the founders talking about cursor they were really talking um you know singing the Praises of curs cursor tab so I definitely recommend checking that out essentially it's a powerful co-pilot replacement that can suggest changes across multiple lines and then cursor composer this is the thing that made pretty much everyone really take a look at cursor because this thing is insane and this is one of
The main reasons I would definitely recommend paying the 20 bucks but essentially multi file code editing and you will only get this on the paid version of cursor now cursor does have a two-e trial I believe so you can go test it out as you can see this is how you enable both of these features right here now it's very important to keep the tech stack docs close so there's two main ways you can reference documentation and cursor which is highly
Recommended since most of the time llms haven't been trained on the most recent docs so the first way is markdown files so in this method you can keep your docs inmd files and then add them as references when needed to your query so this is an example of a folder structure with techstack docs and we can see I got drizzle here but you can add any Tech stack docs that you're using for your project and then second is index them with
Cursor so cursor has a native feature to do this so if you're in composer or inline chat editor or just the chat sidebar whatever you're in you you can type the at symbol and select docs like you see here and then you can click on add new Doc like you see here and then you can enter the documentation URL in this drop down right here and then click enter all right so you'll see here are the docs right here I'm showing
You as an example and it even comes with preloaded docs if you type python you can see Python 3 official and you can see different docs here now the most important thing with docs and llms is that like I said before llms aren't trained on the re most recent docs most of the time so you want to make sure these docs are the most recent to ensure that you don't run into issues within your code all right so another important tip
That I haven't seen anybody on YouTube talking about and is using markdown project structure okay so context is King for AI coding and cursor can read all your files but you don't always want to of course add all your files as contacts for every prompt that just waste tokens so there is no way to tell cursor to just read the file name and compose a project structure tree of your entire project accurately without it reading the file content which is wasting
Tokens or not even getting one tenth of the actual files in your project you can go ahead and try it now that's where this useful extension comes in called Draw folder structure so if we click here you can see the VSS code extension you can install this within cursor and essentially what this allows you to do is right click on any folder in your project you want and generate markdown for the folder of all your with all your code inside so
You just right click like you see in this picture and then you click generate markdown structure and here's an example of a markdown folder structure output that you will get now you can put this code right here into your project within cursor composer within your chats whatever the case may be even in your cursor rules to show the pro and I would use the cursor the dot cursor rules if you're doing that way so that it's only specific to that specific
Project for the uh for the markdown structure opposed from putting it in your Global cursor rules within your settings but either way it works and this is so powerful because lots of the times cursor or just the llm in general doesn't necessarily know how your whole project is structured for example you're working with trpc and there's multiple different ways to structure trpc folder structure same with Drizzle same with whatever so this lets cursor know if if it needs to get access
To certain files it will know where they are or know how to reference them okay this will save a lot of redundancy of you having to correct cursor and say hey no I actually already installed this and have it set up this way it's going to be able to see this on a high level and then make decisions a lot better okay so next and another very important tip is creating a PRD a product requirements document and I'm going to go
Over what this is if maybe you have not heard of what this is before so a product requirements document TRD is a comprehensive document that defines the requirements features and functionality of a product to be developed here are a few key aspects of a PRD so purpose outlines the product's purpose features functionality and behavior this serves as a guide for businesses and Technical teams involved in building launching or marketing of the product this aligns with stakeholders Founders on the product vision
And goals key key components so executive summary product Vision objectives scope risks product features so detail list of features functionalities user stories user use cases how users will interact with the product UI ux design specifications highlevel design requirements technical requirements such as system compatibility security requirements release criteria such as functionality usability re reliability performance benchmarks timeline so Target release date key Milestones success metrics how product success will be measured and best practices keep it concise and focused on requirements not implementation
Details make it a living document that evolves as the product develops keep it simple at the start done is better than perfect and collaborate with Team to gather input and align on requirements use Clear specific language to avoid ambiguity and include visual aids like wireframes or designs where helpful prioritize requirements to guide development efforts so a few benefits this does it creates a shared understanding among team members whether even if you're just yourself as a soul developer this document will really
Give you Clarity before you actually go in cursor and start just prompting trying to build out code this will give you a overarching bird's eye view of your project beforehand this guides the product development and keeps teams aligned helps prevent scope creep and feature bloat provides a reference point for testing and quality assur Insurance informs other documents like technical specifications and test plans and like I said even if you're just starting out or even if you're a solo def this document
Will help you and it's going to help you in the short term but also in the long term so I'm painting the picture for both how it's going to help you in the short term even just create your project but also in the long term maybe when you have a team and making sure everyone's aligned all right so clear direction for AI prompts so the PRD provides a structured outline of product features and requirements this Clarity helps in formulating more precise
Prompts for cursor so devs can refer to the PRD to ensure AI generated code aligns with the product's goals contextual understanding so cursor AI excels at understanding the broader context of a codebase so a comprehensive PRD enhances the capability by providing a clear product vision and objectives outlining specific features and their priorities detailing technical requirements and constraints and then effective code generation with a PRD as reference devs can use natural language prompts and cursor to quickly generate code specific core features
In their PRD the AI can better understand the intended functionality leading to more accurate code generation time spent on routine coding tasks can be significantly reduced and then consistency in development the PRD serves as a single source of Truth for the product Vision this helps maintain consistency across different parts of the codebase even when using AI assistance cursor AI can reference the PRD to ensure generated code adheres to specific standards and requirements faster iterations as the PRD outlines featured priorities devs
Can focus cursor AI on generating code for high priority items first this aligns well with cursor's AI ability to quickly prototype and iterate on code all right guys and I'm going to include Clips like I said one from the all-in podcast and one from the founders of cursor and both of these clips are talking or mention about prds and kind of share the significance of them and how they're going to be so important especially when moving forward even though just right
Now if you start implementing this into your coding workflow and your project you are going to see significant faster coding times as well as a lot more clarity in terms of you and your team or whoever when it comes to building your project end to end now before we get into those clips I also want to give you guys a sample PRD template okay cuz you may be wondering you may thinking okay Josh I get that prds are important and it's
Going to help me where do I actually start so for that I providing you guys a free template and with this template you can customize it you can change it and I put a note here before you use this template I want to note that this is just a template you don't have to use every single thing here and especially if you're maybe just starting out you try to do as much as you can and really paint that picture of what
Your project you want to build but you know like I said before this is a Le living breathing document and I would recommend that you change it and improve upon it for your specific situation don't just take what I give you because yes it can be useful but make it custom for your specific use case okay so I'm not going to go over all of it you guys can take a look at it it's in the link down below for the
Document both of these documents are there but we have the executive summary product Vision Target Persona problem statement product goals success metrics features and requirements core features nice to have features Tech requirements user experience requirements user flow and interaction constraints and assumptions dependencies milestones and timelines risk and mitigation strategy success criteria and acceptance future considerations stakeholder approvals dependences basically this is a lot of information you don't need all of this specific for cursor as well I wouldn't just give cursor the
Entire thing with like some of the lower stuff down here where it may just be stuff for you and your team all right you can take the when you build out your PRD you can take what's needed for certain things like say maybe a bite siiz chunk that can be copy and pasted into cursor when you're doing a project on a specific thing or maybe sometime some use case you need more of it or less of it right so it's a
Working document it's a living breathing document that you can use and reference in your AI coding workflow okay other than that guys I left the links to the clips that I'm going to play now right here as well as I left links to additional cursor videos I made on this channel some more technical some more Theory and going over certain things so you can check some of these out I also left a section right here which I explained in another video
Which gives um which talks about some bonus cursor and v0 tips and tricks for building out UI components and getting the best output so I'm not going to read through this but you can check it out as well as if you want to see the video I mentioned some of these tips in there then you can check this video out as well now I would highly recommend watching these clips that I'm about to play right now because one they're going to
Show the importance of prds as well as two they're going to show you where we're headed with coding AI coding going to give you a better perspective where where you can put your time energy and focus in this space cuz things are changing so rapidly and then two it's also going to give you a better idea about cursor the founders and what their vision is to help you along with this process for devs for Founders for entrepreneurs this stuff is important
All right guys so that's pretty much it for the bulk of this video on showing you how to get started showing you how to implement the best tactics and strategies that I've found so far for cursor AI editing I've been using this tool every single day for the last few weeks ever since composer came out and I absolutely love it is completely changed my workflow and improved my experience building out projects and I have some cool stuff on the way that
I'm very excited to share with you guys soon so if you're new to the channel we upload videos every single day on AI automation business growth sales marketing tactics Etc so if you got some value here and you want to stay a part of this journey and join this fast growing Community thank you guys once again for just hitting 6,000 subscribers road to 10K and drop a like And subscribe to this channel to stay up to date with the daily uploads
All right guys so I'm going to play these clips the first one will be chamath palatia from the all-in podcast answering a question regarding where he thinks the future of AI coding will be or coding in general where he mentions the importance of prds and then I'm also going to play a clip afterwards of the founders of cursor talking about a similar topic where they see coding going in the next 5 years so stay tuned for that and I will see
You in tomorrow's video guys keep hustling keep grinding and of course accelerate your stride take care I'd love to hear you guys uh talk more about kind of current state of gen and particular software companies I know choth you got 890 going love to hear about the the lower cost of actually engineering software and building companies versus actually J AI doing replacing human judgment replacing judgment self-driving the software itself and those two Dimensions feel like they're not exclusive to each other
But they are two different axes love to hear kind of current thoughts on the return Potential from the investment standpoint I think that the entire software stack is going to get rebuilt and I think it's going to be a bunch of 10 and 20 and 30 person companies that do it and I think the core artifact of a new company today are two decisions the first decision is that you must demand that the people that join you use every available tool
At their disposal and you measure them against a counterfactual where that counterfactual is what your productivity was at a traditional company and you need to be 100 to 200% more productive so if an engineer is writing you know x amount of features or x amount of code they need to be at a 2 or 3x and if you do that in an existing company all I've seen is organ rejection so that's the first decision so the people that join you you
Must expect that they do that which means that you also have to deprive them of any help along the way no administrative help no HR help no Finance help all of that stuff needs to be a workflow or a bot or some form of AI logic so that's one critical decision and I think the second is that the document that matters more than ever is that PRD that defines the v0 MVP of the product because I don't think you should be
Writing much code I think what you really need to be doing is defining and excruciating detail what the Feature Feature set is what the parameters are what the guard rails of how features should behave in certain boundary conditions fed into an llm that then spits out the code that then compiles and then you have a working product and that is a 10 20 30% effort that can probably topple Giants it'll take a couple of years for us to get to that
Place but in that world there is no room for $500 million into a SAS company it doesn't make any sense and the reason is the 10 and 20 person company can price that thing at just a fraction of what the incumbent charges because the incumbent has an Opex load that's not correlated to Features it's correlated to the fact that you have 50,000 people across 50 offices in all over the world with all this ridiculous infrastructure that all of a sudden becomes
Obsoleted so I think there's two models one is more of the the lightweight approach so like Sak and jcal both seed a lot of stuff get it off the ground spin it up and then raise money like he just did with glue which is like I'm going to build something get it to a place where the rest of us can kind of pile on but the other version is much more distributed and I'll say a a dirty word here but I
Think it matters like it's like this web 3 Model does apply here where there are some really interesting Early Adventures in crowdsourcing technical completion I would encourage you to look at a project that I'm starting to focus a little bit on called benser and I was like what is this thing and it's basically a thing where you go and solve technical problems and produce features that people require that need and you get paid in this underlying currency that is actually a
Distributed form of venture that actually makes sense a bounty essentially where like you know 15 companies that need a replacement to Salesforce just say here's the Bounty and here's the feature set and it's a A crowdsourced or a community sourced PRD and then some llm spits out the code like that is this crazy new world that we're going to so it's all about speed of execution I think what is the equivalent of a highle programming language what is the equivalent of
All of this tooling around programming languages in the AI age um and so just to frame the problem and talk a little bit about how some other folks are thinking through it I think that you know in the popular discourse there are kind of by and large uh two ways people are approaching the problem of how does AI affect programming uh one is this kind of agent approach which uh seems to advocate for you know programming kind of goes away ceases
To exist as kind of a high level profession anyone can build software and mostly the way we build software will be through you know prds or chat messages that then get turned into code bases or big code changes um and then on the other side of things you know there are folks who are building you know really useful plugins to existing coding environments and are kind of nipping at the edges of you know we can make ghost Tex auto complete better
And we certainly can um and you know we can we can optimize the developer experience in little ways and to contrast this with how we're thinking through the problem we think that programming is still going to exist in 5 years it will still be a profession programmers will still be paid a lot of money uh it will still be a technical discipline but it's going to change a ton and it's not going to demand just a plug an existing coding environment
It's going to demand an entirely new tool for doing software engineering and so this focus on really pushing the ceiling of the amount of work the tool can take on while keeping the program in the driver's seat is our Focus as a company we're working on the full stack uh we want to build the tool when it comes to you know down to the interface and figuring out what programming is going to look like there and then also working backwards and
Building the most useful tech for people and sometimes that requires using the biggest smartest models sometimes that requires using you know models that are really specialized to a particular task are very fast and very cheap and so you know to leave you with this in the next 5 years we really believe that it will be possible to build a tool that automates almost all of software engineering as it looks like today and transforms the discipline of programming into one where individual
Engineers can build systems that are much more complex than even entire engineering teams can build today and TBD will be the ones to execute on that opportunity but that's one that really excites us and you know we wake up every day passionate to try and solve it