📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

How to Master AI-Driven Development in Cursor (Step-by-Step Workflow)

aiwithbrandon55:59

Transcription

Hey guys, Cursor has become the most popular IDE for AI developers, but unfortunately only 1% of developers know how to use Cursor to its full potential. So that's why in today's video, I'm going to be sharing my five-step AI development system that you guys can copy so you can start to code 10 times faster when you're using Cursor. And because you guys are awesome, I'm going to be giving away a bunch of cheat sheets and free templates in today's video, completely for free, so you can easily start replicating everything I'm about to show in the rest of today's video. Just click that first link down the description below so you can grab everything for free.

Okay, so let's dive into the five-step AI development system that I've been using to help me with everything from working on client projects to building out my own AI applications and to help me build demos for right here on this YouTube channel. So let's go through these one at a time and then we're going to do a deep dive right after.

So first things first, when we're working with AI-driven development, we are trying to lean into using AI as much as we possibly can. And with AI, we have given ourselves a promotion. In the past, we were a full-stack engineer where we were building out our applications ourselves, but now we've been promoted to an AI engineer manager. So we're letting AI do all the work. I'm sure you've heard this before, but this is exactly how you lean into this new paradigm shift that has happened.

So, here's how we handle this when working with Cursor. So, first things first, we want to lean into AI-driven development. And the way we're going to do that is to use templates. You'll see this in just a second, but we are going to build a custom template for everything that we do as a developer. Oh, you're trying to create a new task? Cool. We have a template that's going to load in the context for everything we're trying to build to where it's going to go research our project, see what dependencies we're using, check out all the other files, and look at what second-order consequences could happen whenever we're going to make a change. Oh, you're trying to do a bug fix? It should investigate it in a certain way that we would do as if we were doing it. So basically with templates, we are going to be documenting and codifying everything we do as a developer, put it into a template, and then that way going forward, every time we want to make a change or do something inside of Cursor, we have a template that tells the agent exactly what it needs to do and how to do it. I'm so excited for you guys to see this one because this is the most powerful shift that I've seen when working with Cursor.

Next, we're going to dive into working with reference code. And really, this could just be called context, is what this is focused on. But for step two, what we want to do is give AI references to exactly what we're trying to work on. Are we trying to add in a new feature to allow us to use the Vercel AI SDK? Cool. We can use a combination of context 7 and we could add in additional working projects so that AI can easily look through everything that needs to be done in a working example to implement it into our project. Very excited to show you guys a few tweaks and tricks I've been using to get some really great results with this so I can just crank out working code.

Next, we're going to dive in deep into Cursor rules. I've seen a lot of developers inside of my school community. We have over 9,000 developers in there right now, and I've seen a bunch of people go about making their own Cursor rules, and I don't think a lot of people are leaning into Cursor rules as much as they should. So every time AI makes a mistake, we need to correct it. We're training it at the end of the day. So every time AI makes a mistake, you're going to see how we can create Cursor rules to make sure it does not make that same mistake again. And you're going to go from AI making a mistake one out of every four, one out of every three attempts to maybe one out of 20 or one out of 10. It is a magnitude shift once we start to actually properly implement Cursor rules.

Then next, now that we have the foundation laid with our templates and our reference code and our Cursor rules, now we can dive into going speed mode with AI-driven development. And I'm going to show you how I multitask inside of Cursor. And then immediately after that, I'm going to show you guys how you can start to use Cursor shortcuts properly. Because one of the biggest things when I'm doing code reviews or watching other developers work, they're using their mouse to click everything. And it hurts me because my hands never leave the keyboard when working with Cursor. And I'm going to show you some of the most common shortcuts that you need to be using so that you can go from slowly making changes one at a time every few seconds to just humming through and making changes lightning fast.

So with all of that overview out of the way, we're going to dive into each one of these one step at a time. So, let's hop into step number one so you can see how I am doing AI-driven development with templates. And I have a free giveaway for this one, too. So, very excited for you guys to see number one. So, let's dive on in.

All right, guys. Welcome to step one of our AI development-driven framework. And in this step, we're going to focus strictly on templates. And this is my favorite section out of all of them. So, I'm so excited for you guys to see this in action. And what we're going to do, quick overview. First, we're going to dive into how most developers are using Cursor and some of the limitations. Then I'm going to dive into how you should be using templates inside of Cursor so you get an insane amount of leverage and way better results when using Cursor. And then finally, we're going to hop over to Cursor so you can actually see this in action and see the power of using templates inside of your AI development-driven lifecycle. So let's dive in.

So first things first, when it comes to the current development lifecycle, this is what I see most developers do. Most developers go, "Hey, Cursor, I would like you to add a new page that has a chat window in it." So then Cursor is going to go, "Okay, cool. Well, I think I know what a chat window is. Maybe you provided a screenshot of what you wanted." And Cursor is just going to go, "Okay, cool. I'm going to start just make new page. Once I have the page, add components. Once I have components, make them functional. Maybe talk to a database. Add packages." And it's just going to go and do as much as it possibly can. Now, sometimes this does work great. Usually, the smaller the task, the better it does. The bigger the task, it usually kind of varies in results. So, if you've ever experienced Cursor, you know, maybe not using your existing dependencies and just adding all sorts of new stuff, and you're like, "Hey, why the heck did AI go rogue on me?" It's usually one of the main issues of just not giving AI enough context.

Then the other issue is if sometimes for whatever reason you're like, "Hey, I told you to add this new feature. I had an entire utils library with 30 functions to help with all things AI chat related for the new page you're building, and you skipped all of them and created new functions." So, you know, there's another common error that you'll usually see AI agents make. So, that's because we're not providing context to our AI agents, and because we're not giving them enough context, they usually don't give us the best results. So, the core lesson here is when you give AI context, it does great. When you don't, eh, sometimes it, it usually, it usually breaks. So those are the few core errors that I usually see with the current development lifecycle that developers have when they're just saying, "Hey, go build this. Hey, go add this."

The other core issue that I see with the current development lifecycle for developers is they have zero leverage. What I mean by that is in the development lifecycle, there's a few core things that we're always doing. We're always adding new features, we're always debugging issues, updating the UI, making Git commits. And there's a few core things that we're doing over and over and over and over again. And the problem is, every time they're using Cursor to do one of these tasks, they're always starting from ground zero. And because they're starting from ground zero, you know, maybe on the last chat session inside of Cursor, they finally got it working perfectly. It was understanding their wants, their needs in the codebase, but then when they hop to that new chat session, they're starting from ground zero again. And it's like, once again, just doesn't understand all the components and all the files that you have inside your project, and you get back to those initial issues of, hey, it's not going to implement the proper solutions, it's might not actually use your existing codebase, and you just end up with bad results. So, these are the problems that I see with the current development lifecycle.

So now that we've seen some of the problems, let me show you how you can improve this process to get way more leverage and 10 times better results. So let's dive into it.

So here is what the updated lifecycle looks like using AI-driven development. Obviously, the main changes you see here are we are using templates and tasks, and these new elements are going to help us write way better code and get better results. So, let me explain each one of these, first, how we can build them, and how they all get used together.

So, a template is nothing more than a set of instructions on how we want to do things. So, we're going to have a template saying how to create new features, how we debug things, what we're trying to do when we improve the UI. So basically, a template is going to be our mental model where we kind of codify everything in our head for our development lifecycle, for how we perform each one of these tasks.

Then the template is going to generate a task document. A task document contains all the core instructions AI needs to go implement the task or to go solve the bug or do whatever we're trying to do. So basically, we create templates. Once we have a template created, this template will create a task, and then we just pass that task into Cursor and say, "Hey, go fix and work on this task." And then Cursor will start writing the code.

Now, why is this different? Well, we are going to make sure that our templates have all the perfect instructions for, like, hey, here's how the codebase is set up. Here's how we usually go through everything step by step to build features. Here's how we handle working with the databases. Like, it's going to contain all of our core instructions for our project. And that way, once this template is generating the task, the task itself is going to be a really long file that contains, like, hey, here's the goal that the user is trying to accomplish. Here is exactly what success looks like. Hey, also, by the way, when you're updating the front end, there's a bunch of utility files that they've already made. I've already found them when I was searching through the codebase and understanding it all. So, you definitely want to reuse these as much as you can. And then once we have context, our context set up properly inside this task document, once AI starts to update the code, it's just going to hum. It's going to do everything perfectly because it already knows everything it needs to do because it was already predefined and listed out inside of this task document.

If you've experienced Cairo at all from AWS, it's very similar to that, except we're in control where we get to define our way for creating features, our way for debugging, our way for doing everything. And you know, you can do it yourself. So you don't have to basically work with Cairo. You can do it inside Cursor, which I love way more than Cairo.

So let's talk about how you actually do this. When you're using Cursor, you can say, "Hey, Cursor, I'm trying to create a template. This template is going to help me create all new features for going forward. Do your best job. Look at my entire codebase. Point out all the most important things and then help me make this template." Once you have the template, you're going to say, "All right, Cursor. Thank you for making that template. I want to make a new page inside of my website for handling chatting with Vercel AI SDK. Go make a task." Cursor is going to use the template. Once it has the template, it's going to create the task. The task is going to have instructions on, make this component, make this component, do this, talk to this backend service. But usually, when you're first creating templates, it's going to be garbage.

So then we go, "Oh, okay. Hey, Cursor, do you see how in the task you said to do all these three things? That's completely wrong. Never do that again. You should always make sure that you check this file over here to make sure that we're properly using our database schema." So then Cursor is going to go, "Okay, cool. I'm going to go update the template so that I never make this mistake again going forward." And then I'm going to regenerate a new task. Then it's going to go and show the updated task. And we're going to go, "Okay, cool. It looks like you are doing a really good job now at creating the new page for our AI chat interface. Oh, but you did make one small mistake when you were creating the components. It looks like you weren't handling light mode and dark mode, and you didn't make it mobile responsive. Can you update the template again?" Once again, Cursor will update the template and regenerate a new task. And this is just going to happen over and over and over again. And eventually, this tasks document right here is going to become flawless at creating new tasks. And the reason why is because we've been consistently training it on its own errors. Like, we're not manually typing anything. We're having AI see what it did wrong and then improve it. See what it did wrong and improve it.

Then eventually, what's going to happen going forward is every time you want to fix a new thing in your application, you just say, "Hey, use the new feature template right here. Make a new task." That task is going to be 99% perfect. Once the task is created, we just say, "All right, Cursor, go update the code using this task," and it's just going to do it perfectly.

So that's it hypothetically. And you're going to be doing this for every single development lifecycle part that you work on as a developer. And eventually, you're going to end up with a set of templates that allow you to just build, you know, at lightning-fast speeds and produce high-quality code.

So enough hypotheticals. Let's actually hop over to Cursor so you can see all of this in action. I'm so pumped for you guys to see it. And I actually have a few uh templates that you guys can grab and use on your own so that you can copy exactly what I'm about to show you guys. So let's hop over to Cursor.

Okay. So now we're over in Cursor land. So let me just show you high-level exactly what I was talking about. So as you can see, I'm just in a regular software project. I have two different apps in here. I have an app that's a back-end Python job, and then I have a front-end web application. But most importantly for our AI development-driven workflow, I have an AI docs folder. Now, this is super important because if you're not using a folder of some sort to keep track of all AI templates, your prep work, you know, anything that could be used as context for a future conversation, if you're not doing that, you're making yourself work harder unnecessarily.

So, let me show you what this actually looks like. So, so far you've seen me talk about creating templates. So, I've created a template for everything that I've had to do when working on this project. So, anytime I run into a bug, I call it bug fix. Anytime I want to do some code cleanup because I tried three or four different things and some of it's not used anymore. Every time I want to do a code review to where I almost have Cursor act as a senior software engineer, I have created a template for it. But the main one that you guys have seen so far was this AI task template.

So, here's exactly what that looks like. And I'll be giving out a skeleton version of this to where you get to adjust it and tweak it based on that initial process I showed to where it's like, hey, build the template, make a task, update the template, make the task. So, I'll be giving that away for free. Just click the link down description below so you can start to build this out yourselves. But here is exactly what goes inside one of these task templates.

So, we want to make sure Cursor knows exactly what it's building and what it's trying to do for working on a new task. So, we're going to give it some title, a goal. Then we're going to tell AI, hey, you know, some of these tasks that you're going to be given are going to be pretty intense, some are going to be small. So, you need to analyze all approaches and force the AI to think through all the different approaches and come up with a few different options so that we can later analyze which one's the best one and work on that one. Outside of that, we need to make sure that you fully understand exactly what's going on. Like, what's the core problem that we're trying to fix? Oh, we're building a new thing. Okay, cool. Well, I need to map out everything that could happen and what's going on in the project and all the different options of ways we can actually implement this. So, this is where we're going to have the AI come up with a few different options on how it could go about solving this issue. Once again, we're just trying to force AI to think through the problem as hard as it can so that we get better results.

Then not only are we going to have it come up with options, we're going to have the AI actually generate a recommendation on what it should do and have it explain why it's the best choice. This will make sure AI or the task that you generate perform way better than just if you said, "Hey, go fix this."

Outside of that, we want our project to fully understand the current state of our application. So, we want it to, we want to call out all of the different packages we're using. So you can see this task creation template is for my Next.js application. So we want the AI to fully understand, you know, what dependencies am I using? What are my styles? What is going on inside of my database schema? What is happening in my middleware? Does it need to worry about authentication? What are the different components and utility files I've had created so far? And basically, we just want to force AI to describe in max detail the current state of the application. Because if AI just goes and looks up the entire codebase, reports back the current state, it's automatically loading context. And that's what we're trying to do. We are trying to basically just create a task document where the AI just-in-time adds all the relevant context it needs to solve the specific problem you want it to work on.

And we basically just go through this whole process. I'll give the template down below, but basically we just want the AI to like, you know, you'll get the template and you'll be able to grab it yourself. It'll be the skeleton version of this, but basically we're just trying to update this to go through the workflow how we want it to. So basically just build up context. So think through the problem. Go type up the technical requirements. Just do everything that you would do as a super senior software engineer as if you were going to go create a report you had to show to your boss before you're allowed to write code. That's the level of detail we're trying to get.

So, with that out of the way, now that you've seen task templates, like at high level, what one of these templates looks like, the next thing I want to show you is you can see like I use these religiously. Every time I want to build or do something new, I make a new task for it. So, this is something I recommend for you guys to do as well. Every time you're trying to work on something new, don't just keep doing it in the same conversation and blow out your context window because you're trying to solve six tasks in one context window. What you want to do is per fix, per feature, per new thing, make a new task for it. And we'll talk about it later in step five, but you can actually start to do these in parallel. We'll talk about that later.

Okay, with all that out of the way, let me actually show you a demo of this in action. So, you can see we're going to do a side-by-side where we're not going to do a template, and then we are going to do and use a template.

So, here's an application that I've been working on for you guys, part of a new project working on. So, more information on that just a little bit. But as you can see, I have a welcome card right here. I have a chat window down here. And what I want to do is whenever I click one of these words right here, like, "Hey, try asking one of these questions." This is a RAG application. Anytime I click on one of these phrases, I want it to appear down here so that I can easily send it. So that's what I want to do. So we're going to run two different experiments. We're going to do one where I just trigger this regularly where I say like, "Hey, go do this." this cuz this is what I see most developers do like, "Hey, when I click one of these things, add it to the user input." And then I just took a screenshot of the relevant page. So, we're just going to let AI go do its thing. We're going to analyze the code it generates. Then, we're going to do it again, but through the task template approach, so you can see this in action. So, let's go ahead and start kicking this off.

All right, so kicking it all off. And I'm not going to make you guys watch the whole thing. But, you know, we can look at what AI is doing just so you can see it in action. So, it's like, okay, cool. It looks like you're using the welcome card. It's going to then, you know, AI is going to start to look through like, okay, how does everything else work? And, you know, usually this takes a few seconds to go update the chat container. Like, so that's some of the code that you'll see right here. So, it goes welcome card, chat messages, chat container, and usually like it found the whole logic loop right there. So, for small fixes like this, it usually does do a pretty good job. So, we'll now just give it a few seconds to update it all so you can see it in action. So, we'll hop back as soon as it's done.

All right. So we just wrapped up running this command. So you can see it said it was able to add everything successfully. And if you look into our code, you can see most of the changes involved updating our chat container. So you can see we're now updating some set input values. So now it's kind of doing a little bit of prop drilling to where it's passing in the uh where you can see it down here. Yeah, you can see it's now updating the way we handle where did it go? Sorry about that. You can see the way we now have set input everywhere. You can see it's updating that. So basically what's happening, we'll hop into the code. Let's go back to RAG Sass. We'll refresh. So you can now see whenever I click something, it pops up in here. So all around pretty clean fix. It did do what it was supposed to do. And you can review each one of these files one at a time. Like I said, the main thing is we're just passing around set input everywhere so that we can do and update the welcome card to now whenever we click on one of the prompts, it actually handles it.

So, let's dive into doing it again. So, we're going to undo all. We're going to copy the same message. We're going to open a new tab, paste it in. Then, we're going to hop back into this and let's clean it up. Then we're going to copy back the same thing in except this time we're going to add in, "Please use a task template to create this new feature." So now what's going to happen is it's going to generate a brand new task to do the same thing. But ideally, instead of doing all the prop drilling and all the normal, you know, just overly simplified fix, it's going to come up with a better solution. So we're going to give it a second. As soon as it's done creating the task, I'll show you and then we'll actually run the task. So, let's give it a second.

All right, guys. So, it took a few seconds, but now you can see it generated a brand new task for us called "Implement clickable example prompt." And in this new task, you can see it went through, it found everything out about the project. And then it found relevant existing components, so the welcome card, and it also found all the components we're about to update, so the message input, the chat state context. That's something that was not looked at or analyzed in the old solution. And you can see it's defining, hey, here's the exact current state of how the application works. And here's the problem that we're trying to solve. Here's what success looks like. And then when you scroll down just a little bit more, you can kind of see some of the other options it's going to make. But you'll see right down here, what are we going to change? Well, we're about to update the welcome card, and we're going to update a hook that manages the chat input state. So, whenever someone clicks one of the different prompts, it's going to update that. And you're going to see that this solution is much more elegant and relies on and updates our existing codebase rather than always adding new, because that's one of the main problems of this old approach is it was just always adding new stuff. So, you kind of see in here, it's just always add more, add more, add more. And most of the time, that's not always the right answer. Usually, there is existing code that we should leverage.

So we're going to say, "Yeah, please implement." So I'm going to show you this updated solution so you can see how it's much more elegant, and you know, they both work. But that's one of the bad parts about development is like, yes, sometimes both options work, but there usually is a much better approach to do something, and that's what we get to actually train as we create these task documents. So we're going to let this run for a few seconds, and then I'm going to show you the final version so you can see it in action. So, let's give it a second and I'll show you the final result.

Okay, so AI is wrapping up these changes as we speak. And the solution, the implemented solution, is so much more elegant. And that's just what I want to show you guys real fast. So, let's review the changes so you can see it in action. So, we're going to hop over to the single file that was changed. So, if you remember in the old file, there was like four or five code changes. I mean, we'll just look at it together so you can see it in action. So, you can see in the old version, we updated the welcome card, we updated the chat messages, we updated also the chat container. So we updated all sorts of different files in order to add this new functionality, and another one. So we updated four, five, yeah, we updated five different files to implement the change whenever we just said, "Hey, AI, go do something." But whenever we actually properly use a template that understands how to create real-world tasks that better understand your codebase, the result is insane.

So you can see in this new version, what it did is it tells us a quick report of what it added at the end. So, hey, all I did is use some of the existing chat state context, and I just updated our local welcome card to anytime someone clicks on a prompt to just update our text area. And now, I mean, you can see it again. Let's hop back to our code because I just want to show you it works. But you can see now whenever I click on any of these, it automatically works. So, same project, but when using task templates, it performs so much better and gives you much higher quality code. And that's just going to be easier to maintain and not break all the time because, you know, if you do that over and over and over again, your codebase is going to be disgusting, truthfully. So when you hear the term "AI code slop," it's referring to to this right here.

So another cool thing I just want to show you guys that I find pretty interesting is you can see in our task template that it also does some additional checks as well. Cuz as a regular developer, you don't just make code changes and say, "Oh, it's good." No, you actually probably should run some checks to be like, "Oh, did I add any errors? Does everything lint properly?" And then another cool thing, you can actually track the progress of what was supposed to happen. So you can see when you're using templates and tasks, you can actually see all the work that needs to get done and mark it off as you complete it. So you can see when you knocked out the changes.

So yeah, I just want to show you guys that is task templates in a nutshell. You can see it produces much better code. Yeah, I'll just show you the final changes. Yeah, all we did add one extra function right here and then update right here. Boom. Beautiful. That is what great code looks like. So, we're going to keep it. That's beautiful changes, and that is task templates in action. So, now that you've seen that, let's head over to step number two in our new AI-driven development workflow. So, let's hop on over.

Oh, and real quick, if you're enjoying this AI-driven development video, you're going to absolutely love the new project that I've been working on for you guys called Shipkit.ai. The whole purpose of Shipkit is to help you guys launch your AI application in days instead of months. And the main way you're able to do that with Shipkit is because it includes everything you need for AI-driven development. It comes with multiple templates for the most common types of AI applications. So there's a template for everything from creating simple chat applications to where you can select all your different models, chat with different types of models. There's everything from RAG templates to where you can upload documents, they get added to a vector store. It infinitely scales because we're using Google Cloud in the background. We include a bunch of other projects for helping you create SDK agent applications. In addition to that, besides just having a bunch of templates that you can use as springboards for your own applications, there's a ton of modules in here as well to help you go from, you know, coming up with an idea and all the way from creating the idea, turning it into a roadmap, coding the whole thing using AI-driven development, and then using AI to help you implement everything from analytics, monitoring, email systems. It's all there. And the coolest part is AI is built in at every step of the way. You'll see it in some of the demos in the video, but you can actually see when you're setting up the project, AI is helping you at every single step of the way to where it's like I'm sitting right over your shoulder helping you point out and set up everything along the way. So, you get to basically build AI applications on easy mode using Shipkit. And if you have any questions about Shipkit, feel free to drop a question down below. But I'm super excited for you guys to check out the new project. It's in pre-launch right now. It'll be coming out in mid-September. But enough of that, let's get back to the video and learning more about AI-driven development and dive into step two for our new updated AI-driven development workflow. And this is when we're going to really crank up the knob on making sure our AI agents do a much better job at building working code.

So, let me give you a scenario. Imagine you're trying to build out a new feature that's using Vercel AI SDK to set up AI chat interaction. So you know you want your local chat window to use that package so that you can start to work and chat with models like ChatGPT 4.1. So that's the scenario that we're trying to set up. Well, how most developers do it is say, "Hey, I want to use Vercel AI SDK to set up a chat window and start working with, you know, that new technology." Well, the Cursor goes off and does its best to look at the web, and then it comes back with some examples. Maybe they're outdated, maybe they're not. Maybe it works, maybe it doesn't. So, here is what I've done because that process is usually hit or miss for me. So, here are the two cheat codes that you need to follow in order to make sure that when you're adding new features, if they're brand new, how to get much better results.

So, option one is you want to actually upload different reference projects. So, for example, if you're watching a YouTube channel and you really like a new feature that they just built and they're sharing the source code, what you can do is go into the actual, let me actually just show you so you can see it in action. What you want to do is you can actually copy and clone that entire project into your AI docs reference folder. And then what you can do every time going forward, you can say, "Hey, please look at how they use the Vercel AI SDK implementation, and then I would like to add it to this project too." So let me, I can actually here in just a second show you an example. So let me move some stuff around and I'll show you.

Okay. So what I just did is I pasted in a new project that I built called Chat Simple, and it does use the Vercel AI SDK in order to allow you to chat with AI models. So what you can do in our new approach is you can actually drag in that project to your chat window and say something like, "Hey, please look at this new project and use it as a reference for the ability of this project to upload attachments and images in the chat session that it uses with Vercel AI SDK, and I would like to add it to my existing project. Please create a new task to implement this feature. Once you fully understand the code in that project I gave you and the current state of our existing project, then per usual, we're going to tag our task template so that it will properly create it. And then boom, you fire it off." Now, we'll actually just watch what it does real fast because I think this is pretty cool to see. So you're going to see in just a second it's going to start exploring that existing codebase and it's going to find how we can use, in our case it's called experimental attachments, in order to add images, videos, files, folders, and everything in order to actually upload them to work with Vercel AI SDK. So it's going to take just a second to do it, and but the cool thing is, is going to work way better than the other approach where it's just like, "Hey, go add attachments to this project."

Now, why is this important and how can you use it? A, anytime you see a cool project from a YouTube creator, just download it, and then every time you're working on a new project, you can go, "Oh, yeah, in that one video I saw, they did something cool. I'm just now going to add it to my references folder." Boom. So, now what you can do is just hobble together a bunch of different projects, keep referencing them, and incorporate all those cool features into your own projects.

Now, one thing that is super important while that is running is you want to make sure that you set up your git ignore to say, "Hey, I want to ignore everything inside of this reference folder." Cuz what you want to avoid is accidentally adding in six different projects and adding them to your GitHub codebase. So, that's going to make things super complex. So, make sure you always ignore that reference folder and all the other projects you uploaded.

So, we're going to give this a few minutes so we can see exactly what it recommends, and we'll hop back together so you can see it in action. Okay, so it took about another 30 to 60 seconds, and we were finished with creating our new task, and you can see it did a great job of actually detecting what we needed to do. So, how I mentioned earlier, it's actually an experimental feature right now to use, you know, the new attachments inside of Vercel AI SDK. Well, by looking through our example project, it figured out, oh, hey, in order to actually do attachments, you do need to use experimental attachments. So, you can see it went through and basically just made sure that like, hey, we do need to use this approach. And what I really like is you can actually see some of the code changes it's going to make. So, let me just scroll through some of the most important ones. So, first off, it's going to create an image preview. So whenever we were going to add in, you know, a new image right here, it should actually add the image as a preview. Then it should also update our existing way for adding attachments, cuz right now I think we only support PDFs. So it's going to update that as well. So you can see it just did a good job understanding the current state and the future state. And this is just a quick reminder, every time you see a cool project on YouTube you like, add it to your local computer, and then that way you can reference it going forward in your own AI applications. And this is so important because you want to, once again, leverage as much leverage as you possibly can to build projects faster so you're not always staring at a blank screen.

Now, another one that I want to recommend going back to our examples right here is, okay, cool. If you have a project you found on YouTube, you downloaded a course, whatever, cool. Add the project to your reference folder. The other one is called context 7. So this is actually something with your MCP server that you can set up. Feel free to copy this screenshot right now and add it to your MCP JSON file. But what context 7 does is it is a website that has all of the latest documentation for all modern software packages. So if you look up context 7, you can see inside of here we have everything that we'd want. So you can actually see Vercel AI SDK is right here. So you can say, we'll do it in a new chat just so you can see in action. "How do you upload images using AI SDK? Please use context 7 to look into the best practices for doing this in a Next.js app."

Now, what this is going to do is you're going to see in just a second it's going to say, "Cool, I need to use the tool." So this is the tool getting called. So, if you open it up, you can see, "All right, I'm going to be using context 7." And context 7 is going to look up the library. Once it finds the library, it's going to have all the results for that. So, you can see it found a few different projects. Once it finds the proper project, it's going to get the docs for that project. So, yep, we're going to look up Vercel AI docs. Then, you can see inside here, it recommends, "Oh, here's actually how you can start to use chat with file attachments." So every time we upload an image, we're going to to basically process it, and then you can start to see a little bit more of the fanciness on the back end. So this is how if you ever have a question about like, "Hey, how do I actually do something using a library?" Make sure you use context 7 to look up the latest documents for that library. And this is super helpful because I know if you're working with projects like CrewAI, Agent Development Kit, LangGraph, there's a lot of times to where the model itself was trained in 2024. So when it goes to actually generate code for you, it's going to revert back to the old method. So that's why you want to say, "Oh, please use context 7 and look up how to use this latest library." Once you figure that out, now start working on building changes for me.

So hopefully that was super helpful. So you guys got to see how you can start to make sure as you're creating new tasks, you can add in packages and existing projects to your reference folder, or you can use context 7 in order to get the latest library so that when you are creating your task, you're making sure you populate the context of that task with the right instructions, and that's what's going to set you up for success when you start to code. So hopefully you love step two. Now, we're going to head over to step three and talk all about Cursor rules and how you can make sure that your AI is always writing the best code possible. So, let's hop over to step number three.

Okay, welcome to step three where we're going to make sure that our AI agent always writes the best code that it possibly can. And the way we're going to do that is by adding in Cursor rules to make sure that it always follows proper coding protocol. Now, this is one additional step that we can add in our workflow, cuz our existing AI-driven development workflow is, you saw it earlier, to where we're using Cursor, Cursor to create templates. Once we have a good set of templates, we can make tasks, and then those tasks are going to be used to write code for us that's high quality.

Now, even if you do and create the perfect task templates and just tasks in general, eventually these tasks become way too long, like many, many thousands lines of code. And once you start to add too much code into your context, whenever the agent goes off to start writing the code, it usually kind of like struggles. So, what we want to do instead of just writing every single thing that could go wrong in our task file is we want to lean more into Cursor rules.

Now, what Cursor rules will do, in case this is your first time hearing about them, a Cursor rule is going to basically get added to anytime an AI agent is working on a specific file. So, let me just show you an example of a Cursor rule so you can see it in action, and it'll make more sense. So, you can see inside when I'm working on projects, you can see I have rules for everything. So, I have, I don't know, 20, 30, 40, 40 maybe different rules of how I want AI agents to properly write code for me. And this allows me to write much higher quality and avoid errors when I'm working on projects. And this is exactly what a Cursor rule looks like up top. It allows you to pick which type of file do you want to apply your rule to. And a rule is nothing more than something that just says like, "Hey, here is what, you know, context for the issue we're trying to solve. Like, hey, in Python, there's a thing there's

A type called `any`, and you know, it allows you to like be validated, like the code is technically correct. However, `any` reduces type safety. So, are we getting back a dictionary, a boolean, a string? What are we getting back? We don't know if we're using `any`. So, we're saying, "Hey, never use `any`." So, here's the rule. Then we give an example of like what bad looks like, what good looks like, and then we kind of just update it on what it should do instead.

And this is exactly what you want to do inside your cursor rules. And then you get to pick, "Hey, where do you want me to apply this rule?" And this is what's going to allow us to prevent blowing up our task that we create with like, "Hey, don't add `any`s. Don't do this. Don't do this. Don't do this." And like, really blow up our task file and make it way too big. We're just going to have a bunch of rules that get applied dynamically to different files. So, we're saying, "Hey, I want to always apply this rule to a specific file type." In my case, I want to apply this to all Python files. And this is what's going to actually make it to where anytime our agent is working on a Python file, this is dynamically going to get added into our context for the agent. And the agent's going to go, "Oh, I was about to code something, but I see there's a rule that tells me not to do this. Therefore, I'm going to start doing what it tells me to do differently."

So, hopefully, you're getting to see these rules and hopefully, it's starting to click on like, "Oh, that is going to be super helpful to make sure that, you know, my agents write code." Now, when starting out, all of us are going to start off with an empty rules folder. So, our rules folder to start is going to be empty. Here is my best practice for building out your rules. So, what I like to do is, once again, we're starting off with this. And every time my AI agents do something incorrect in code, such as add an `any` in a Python file or do something weird in Next.js, I'm going to revert back and say, "Hey, did you see how you just did that? Never do it again. Please go look at all of my cursor rules that I've created and make a new one to make sure you never make that error again." And that's how you're going to first start populating this rules folder with, "Hey, don't do `any`. Make sure you always add these types of comments. Don't do this in our package.json file when working on database schemas. Make sure you consider this." And we're just going to continue adding over and over and over again until this list just keeps growing to where eventually the agent is just going to write perfect code all the time.

So, this is an iterative task, but that is my exact process for how I have built out all of these rules that you're seeing right here. So, whenever my agents are writing code, it's perfect. So, I just want you guys to see it. And I'll have a skeleton of this cursor rule too, so you can just copy it and use it in your own projects to start making, you know, and populating it so your agents write better code as well.

So, now that we have all of the building blocks laid out to where we have our templates, we now know how to give context to our agents using our reference projects in context 7. And you've understood how we can start to iterate using cursor rules to make sure our agents always write high-quality code. We're now going to put some, you know, some gasoline on the fire, and we're going to hop over to the next two stages, which is all about using AI at full speed. So, step four, we're going to be diving into how to use multitasking. And step five is going to be all about how to speed mode when you're inside of cursor. So, let's go ahead and hop over to step number four.

All right, guys. Welcome to step four, where we're going to dive into cursor multitasking. And this one's just easier to show than it is to actually, uh, just talk about. So, let's hop into our cursor instance, and I can just show you in real time what this looked like for me on a project recently. So, let me give you some background. The way I see most developers using cursor is they open up a single tab inside of their chat instance, and then they just work on something, and they keep working on it over and over and over until it runs out of context, and cursor says, "Hey, I broke. I have no more memory available to actually work on this. My context window has been, you know, shot. You used it all. You need to start a new chat." Then they start the next chat, and then they do the exact same thing over and over again until they run out, and they just rinse and repeat the same cycle. This causes you to use more tokens because your context window as a whole is getting bigger and bigger. So, when it's making requests, it's looking through the entire message and then coming up with a response. So, it's slower, it's more costly, and honestly, just, you know, it's just slowing you down.

So, what I like to do is think in task, and per task, I will open up a new chat window. So, you can see right here, I have what, five windows going on at the same time. So, let me just show you how I was able to knock out hours' worth of tasks in a few minutes. Like, this happened this weekend. So, I received a bunch of errors that were going on and breaking for a specific project. And instead of like, "Okay, let me dive deep into task one," and then I'm going to dive into task two and task three and four and five, I'm just going to solve all the issues at the exact same time. So, I basically said, "Hey, create a task template for all of the issues." So, I start off with one and four because that's what I wanted to start with. And it made a task document, and then it made another task document, and it described exactly what it was going to do for both tasks. Then, I was like, "Cool, now do it for task three. Now, do it for the other ones." So, it ended up creating multiple tasks. So, you can see right here, it came up with creating multiple tasks to fix some microphone issues that were happening for a project. Then, at the exact same time, let me scroll up to the top. I basically did the exact same request for all tasks. And I definitely recommend you doing this as well. So, when you're solving something, remember, think task per task, open up a new chat. And ideally, you can actually run these in parallel. So, that's what we're going to do to knock out an insane amount of code really fast.

So, we're going to say, "Hey, do maximum research on this. Let me know what you think. Don't code yet. Just let me, you know, make sure the solution for this task is going to work." And it's going to dive through, understand our code architecture, and then it's going to come up with the root cause. Once it comes up with a root cause, tells us the solution, and we're just going to keep asking the AI. It's almost like we're, um, talking to a junior developer of like, "Are you sure that's the best solution? Can you do better?" And usually, what happens is the developer will come back, "Well, I don't know. Actually, let me go try again. Oh, I found something better. Oh, I found something better." So, I'm just in the background between each one of these tasks doing the exact same thing, saying like, "Go research it." Once it is, "Are you sure that's going to fix it?" And then, "Okay, cool." After I've done that test a few times of like, "Are you sure the fix you said that would work is going to work?" and make the AI think through the implementation, it comes back multiple times like, "Yeah, I am very confident this code I just suggested to you will work." And I just do that for multiple tasks in parallel. And this is the power of creating tasks because each task is an isolated instance of a bug or a task, and we get to work on them in parallel.

So, the shortcut for this, just so you can start to do this on your own, is you just, once you have your cursor instance open, you just hit Command T, and this will open up a new chat, or you can hit this plus button, and you can start to work on another one. So, you could do, "Hey, open up a new chat." "Hey, again." And you can just keep going. So, you can see we now have the ability to work on multiple tasks in parallel. Now, this is a game-changer because a few months ago, cursor had a limit of three windows, I think, at a time, maybe four or five max, but now it's unlimited. So, you can continue to work on as many tasks in parallel as you possibly can do. And if you don't like this side view, you can always click this little "Show background agents" right here, and you can see in real time all the agents that are running locally. So, if you had like multiple running, you could see all of them over here as well, or if you spun up a bunch of background agents. But this is just another way to see all the different agents, and you can just trigger them all off at the same time.

So, cannot recommend this process enough. This one trick right here has saved me, I mean, dozens, maybe a hundred-plus hours over the past few months just because I'm able to knock out in real time. The final thing I'm going to say because what it is, is a paradigm shift because you, in the past, as a software developer, you were the one writing every line of code and thinking about it and thinking about it and thinking about it, and then planning your solution, reviewing your code, and then eventually, when you were done, you were like, "Hey, I 100% know everything that's involved in this task. I'm now confident that I can ship it to main." Whereas now, we come in here, say, "Go fix this." Then the AI creates a task, writes all of this code, and then we come in at the very end to start reviewing the code. So, it's just, remember, it is okay to lean in more into AI once you start using cursor rules and task templates because you're going to be much more confident with the quality of code. And just remember, you are now a code reviewer and a team orchestrator of agents, and you are the one kicking off multiple employees to go work in parallel, and they're coming back to you with their shiny little code of like, "I fixed it for you," and you're going to review it. So, just know you're not going to be coding anymore doing this new approach. You are strictly reviewing code, and you're going to be just approving and saying, "Yes, that looks great. No, that doesn't. Go back and fix it again." And you're just going to be just... My current day of coding looks just like this, to where I'm just like spinning off tasks, spinning off tasks, reviewing, reviewing, reviewing, spinning off more tasks, reviewing, reviewing, reviewing. So, I'm going through so much more code. I'm cranking out, you know, tens of thousands of lines of code a day, and I'm really happy with the quality of it. But I'm not coding anymore. You're just strictly a code reviewer and manager. So, that's how I'm able to crank out an insane amount of code as a 10x AI developer. So, I hope you guys really like that trick. And now we can move on to the final step, number five, which is going to be just, I want to show you guys some of the most common cursor tips and tricks for speeding through all the different windows because most of the time, I see people using cursor, they're just clicking everything manually. So, let's hop into step five so you guys can code like the 1% of cursor AI developers.

All right, so now it's time to dive into step number five, which is all about using cursor shortcut keys to work 10 times faster inside of your IDE. Now, I have this quick cheat sheet reference that you can download in the source code below, but I basically just call out all the most common different options of working with cursor that I use religiously. So, let's actually go through a quick example. So, let's imagine I wanted to update this file to say, "like and subscribe." So, I'm just going to go ahead and just say exactly all the commands I'm doing in real time so you can see how I'm using cursor. So, I'm going to hit Command and Shift. Now, whenever I hit left, it's going to go to the beginning of the new line, and I'm going to select all the text. So, I hit Command Shift Left and Command Shift Up, and it selected all this text. Now, to add it to my window, you can see it says "Add to Chat." Command L. So, I'm going to add it to chat. And if you open it up a little bit more and hover, you can see it has all the selected lines added right here. Now, I can say, "Please update to say 'like and subscribe' for all free source code," and then just say, "add at end of, you know, intro." Now, press Enter. This will automatically add in, you know, it's going to do its AI thing. It's going to read the document, and now it's going to come back and start adding in the updated changes.

So, there's a few cool ways that you can speed through your changes. So, I just want to call these out because I don't see a lot of developers doing it. So, you can see right now, there's a few options that are popping up. Command Y will accept whatever individual change you're looking at in the current instance. If you hit Command Enter, it will accept all changes. Now, there's a few other ones that you can do, such as Option J. So, Option J, if you had a bunch of changes, it will start cycling you through all the changes so you can quickly see like, "Okay, change one, change two, change three." So, there's only one, so it's going to do it. Then there's Command K to go backwards and look at previous ones. So, J's down, K is forward. So, that's basically how you can, you know, look at going through your files. In this case, I'm going to hit Command Enter. Boom. Accepted everything.

Now, at this point, what I would see most developers do is click down in here and start adding something else. So, we can say, "Add a poem at the end." "Add my YouTube channel, uh, with Brandon in the middle." Okay, a few things that I want to call out. A, I clicked in here. That was wrong. Also, I see all the time when people mistype inside of this chat window, they are like, "Oh, it has to be perfect." And they'll spend 30 seconds like coming back in here and clicking around and updating it. No, if it's wrong, these are the smartest, you know, AI brains on the planet. They know what you mean. So, just hit Enter. You don't have to get it perfect. So, I just want to show you once again. It's going to, like, that was a few extra tips. So, it's going to update this. I'm going to showcase once again. So, you can see we now have new changes. We're going to leave that just for a second. It's adding the poem. So, I just want to show you the additional commands that you can do. So, you can see it's adding all of those changes in here. So, you can see there's more options now. So, now when I hit Option J, I can start to cycle through all the changes. And then as I see one that I like, I'm going to hit Command Y. And then I'm going to cycle down to the next one. That one looks good. Command Y. I'm going to cycle down. And then I can say, "Oh, I don't like this one." So, I can actually say, in this case, Command N for "don't do it."

Now, here's another quick shortcut that you guys can use. I hope you can see it on the screen right now, but it says you can actually quick edit a line. The easiest way to do this is you're going to select your code, hit Command Shift K, and now you can quickly say what you want to do. So, just say, "Update to August 4th, 2025." Now, this will just be a quick inline edit. Whenever you're done, once again, hit Command Enter. Boom. You've just made a change inline. You don't always have to do it in here, but let's just say you did not like the poem that it generated. Well, we're going to select the poem that we have right here. Now, to just once again add it back to our chat, you're going to hit Command L. There's no reason to drag it down here. Now, you can just say, once again, "Make longer." Okay. Here's a few other shortcuts. You can always say, "Make shorter." You can always hit Enter, and this will automatically add something to the queue. So, if you want to stop something mid-action, you can always hit, in our case, Command, sorry, if you want to like override what's happening, you can always hit Command Enter, and it will override whatever is happening and automatically send it in. So, I can say, you know, say, "Hey, 100 times." So, normally you just hit Enter, it just gets added to the queue. If you hit Option Enter whenever it's doing something, it will automatically do more. So, let's do this again. So, we can say, "This time, do it 10,000 times." So, this is just going to take forever to do. So, here's a few things that you can do. Just like if you're coding in the terminal, if you just want to kill this, you can always type C as it's happening. So, we're going to say, "Proceed." So, as it's happening, you can always kill something like you were doing in the terminal, just with Control C. Boom. It stops it in its tracks and allows you to change. So, I can say, "I actually meant to say hi." Then hit Enter again, and it'll go back. So, I know these are a little bit, you know, kind of tedious. I wish there was like a quick way to like showcase at the bottom of the screen what I was actually typing, but hopefully, these are helpful just to like, you know, even show you what's possible. And you can always check that quick reference guide that I have so you can easily look at these.

All right, let's show a few other ones. So, let's do, "Hey, hi, test test." So, if I want the new one to automatically go in, which is sub, you can hit Option Enter, and it will instantly skip the queue and pop up in here. If you don't like it, C, stop it. So, hopefully, this is helpful so you can start to see like, "Okay, I have total control over this AI chat window as it's happening, and I don't need it to automatically just always do one at a time." Okay, a few other ones. So, in the code editor, you can actually swap your different modes. You can kind of already, cursor does a great job of this, but you can always swap your agents right here. So, you can see once you have the terminal, oops, sorry, once you have the terminal selected, you can always open it back up. I have a short key mixed up, but you can always hop between different modes. So, it's just Command Dot, and you'll cycle through all of the different types of projects. I always use agent, but sometimes you just want to ask when you're like, "Hey, research this. Don't code, just research." So, this is how I quickly alternate between different modes.

Okay, I think those are most of the common ways I'm using shortcuts inside of cursor. Hopefully, that was helpful to see. And then we're just going to undo all these changes in here because there was no reason to add all of those, and life is good. Yeah. So, that's a wrap for this video, guys. I hope you enjoy seeing my five-step AI development-driven system. And I cannot wait for you guys to grab some of the templates and cheat sheets down below so that you can steal them for yourself and start coding 10 times faster. And if you have any questions, you can always drop a comment down below, or you can head over to the free school community I've created for you guys and hop on our free weekly coaching calls. Would love to help you out over there every Tuesday at 6:00 p.m. Eastern time. In the meantime, I have a ton of other AI-related content right here on this channel. So, I definitely recommend whichever videos pop up next. I've got everything from LangChain, Quai, agent development kit. If you name it, I got it right here on the channel. And I cannot wait to see you guys in the next video. But until then, have a great day. See you. [Music]