Your AI Code Is Trash. Hereโs Why โ
Let's learn how to use Cursor AI๐
2025-11-15
Transcript โ
[00:00] You're building with cursor, replet, wind surf, and you're just getting trash code outputs. Let me help you out here by giving you some simple rules to make this agent perform better. Follow the rules, agent. Welcome back, y'all. On today's video, I'm going to show you five very simple rules you can add to your settings right away that's going to make your code execute a lot better. These rules have slowly and progressively come through me just developing my own applications. And what I realized, I was like, you know what? I got to make a video on this cuz some of y'all are just like, "Corbin, I need some simple stuff to just improve code outputs by 5x, 10x, oh maybe 20x." Let's
[00:32] jump in. First off, go to whatever you build. Go to your settings. If you don't know where this is located, simply search in your settings. But there'll be something called rules. Real quick, shout out to another video I did on this channel. I show you how to set up project rules. Is this a actual fundamental thing I need to do, Corbin? Yes. Why? Because you want to give your AI agent the perspective, the knowledge, and the wisdom of a senior engineer. This is a whole separate video. Check me out on this channel. Big thing here though in today's video is we're going to go over these rules and why I use them. Okay, this might be more than five rules. Let's jump in. You know those YouTube videos that's like top 10 AI
[01:03] hacks. Number 10, we're going to use that voice. Don't worry about it. Number one, delete any test files I create after completing them. They are no longer needed. Why do we use this rule? Because if you have used any of these agents and you kind of let them off the leash, they go a little crazy sometimes and they create a bunch of files that are just dead weight in the code. So, if I come over here to editor, you'll notice like we want to keep this codebase clean for scalability and if we ever do become a million-dollar company and you have other developers looking at your codebase. When I say codebase, I'm referencing these files. When I say these files, I'm referencing folders within folders and folder inception. All
[01:34] this code, we want to make sure this is clean. Therefore, we don't need dead files that are sometime in the agent workflow process. Therefore, simply add the line, delete any test files I create after confirming they are no longer needed. Here's a real quick hack for anyone that is watching this video and is looking in the description for these rules or alternatively looking in the comments for these rules and is frustrated because they don't want to type them out. Pause this video. Screenshot the rule that you like. Once you screenshot the rule you like, simply double click it. It will open up as an image. What do I do now? Double click the text, copy, and boom, you can paste it anywhere. Simple hack. If I just showed you the hack, make sure you leave a like. It's free. Next one that I
[02:06] personally added. When creating or editing readme files, always add these social media links on the top of the file right after the main title. This one for me is because I create a bunch of free source code. If you didn't know, they call me hashtagfreecode corbin. This is my GitHub profile description down below. You get a bunch of free code. And what I do is I post a repo here and in these repositories of amazing free code. What I will do is simply have an automated readme created for this top fold. For some of y'all, this is not relevant at all, but I wanted to show you this rule. So now you know that in different repositories, you can mimic or recreate behavior. The
[02:37] behavior I mimicked and recreated was this little top fold where someone comes for free source code and they're like you know what this was value let me join the AI community. They click this and they are brought to the AI community that's completely free description down below third link click it and they join it. You might be asking yourself Corbin what is this rule headedit rule and what I did I mean these rules can get quite lengthy so I want to show you this so we can kind of open this right here is simply the markdown. So I identified what the behavior I want to mimic for every single app. As you'll notice, user rules is for every single repository or
[03:08] every single folder you open in your little IDE. I scroll down and I just gave the relevant markdown. And when I say markdown, notice how this looks crazy like hashtag hashtag bracket exclamation mark bracket and it's just all craziness. Markdown essentially when you render it. When the little robots read that text, it renders it like this. So it looks all nice and pretty. If you don't know what markdown is, that's actually very fundamental for you to know. So I would encourage you to open up a chat here, hit ask, and just let it explain markdown to you. Other applications that use markdown is chatgbt, anthropic, perplexity. You know when you get a chat output and then some
[03:38] of the text is bolded or some of the text is a little bit formatted of bullet points. That's markdown. Here is a third rule which is really good for front-end engineering. When we add UI elements that repeat between pages, either reuse an existing shared component or refractor the repeated markup into a shared component before finishing the task. What does this mean? Right now, if you don't add this rule in your code, what's going to incur is your code is going to get bulky, messy, and absolutely disgusting. So for example, let's say if we didn't add this rule. I want you to notice something. You see right down here that we have a footer and then let's say I go to the terms page, we have a footer. Again, sometimes
[04:10] what this AI model will do is it's going to repeat the exact same code for the exact same footer. This could be two files, three files for the privacy policy as well. When alternatively, we can make the footer one file and then import it across these different pages. What I want you to understand, if you have no clue what I just said there, is what that rule will do is make it so that your underlying application requires less lines of code, is cleaner, and what you need to understand when developing software that is scalable and the architecture looks absolutely
[04:40] beautiful. So by the time you get another engineer on your team, they look at it and they're like, "Oh, this actually looks really good." You want to make sure you optimize how many lines of code you use. As a little side note for a nice little side lesson on that topic, if you want to make sure you are not absolutely cooking yourself, if you have any file specifically in the context of React built apps, ask an AI model, whatever you're building your tech stack and ask your specific context. But if you're building out an application and you have a file that's over a thousand lines of code, clean it. Next little helpful rule here, this is one of those cookie cutter rules that probably should already exist natively within the
[05:11] platform, but always provide Mac specific keyboard shortcuts and terminal commands. Use command instead of control, etc. The user is on Mac OS. Corbin, I'm not on Mac OS. Then do the same exact rule for Windows or Linux. This one right here got a lot of attention on X. They absolutely loved this rule right here. And if you like everything I've been saying so far, make sure to follow me on X. As a lot of content that I don't necessarily make into a video, I'll make it into a post. So, for example, I show you when you face an extremely annoying error, a tactic to handle it when dealing with multiple models tackling the same error. Like, this is just free value I put on X
[05:43] that I haven't had the time to make a video about yet. So, if you just want free value on Axe, follow me on Axe. Second link in the description down below. This rule right here got a lot of love because I love this rule. Critical when fixing a bug. Identify the root cause, implement the fix, and verify with linting. Always end with a simple one-s sentence summary with exactly three alarm emojis. Alarm, alarm, alarm. This is a mandatory and must be in the very last sentence of response. So, what am I doing here? Why am I doing this? Anyone that's been coding with these builders in the last couple weeks have noticed that, wow, I'm getting good results. It's outputting a ton of text,
[06:14] but I don't want to read all that text. I don't want to read, "Hey, Corbin, we fixed the bug. Here's how we did it. Step one, step two, step three. I don't care. I don't got time to read." So, I added this rule so that the three emojis instantly I can see it visually and be like, "Okay, let me read this one to two sentence description of how it fixed it." So, I can conceptualize in a very fast and effective way like, "Oh, it fixed it by doing this. Got it. Next thing." I don't have time to read paragraphs of code output. I just need to get a real quick like, "This is how we did it. Let's move on." So, that rule right there, amazing. It saves you time. And the last rule right here, which I
[06:44] shouldn't even be sharing because honestly, this is probably one of the most valuable things that I've done in the last couple days. I'm going to make a whole separate video on this, y'all. This is extremely valuable. Always check docsbugsolutions.mmd for existing fixes of patterns before fixing any bug. This is going to sound extremely confusing on the surface because this is a creative process that I personally made through my experience. And I wouldn't even say creative, maybe it's just an operational way of handling a software company. I have a thing called DAX. And in docs I have bug reports. And in these bug reports I have specific bug audit templates. I have specific dates associated when I've audited my platform
[07:16] for bugs. I've also created a log of bug solutions. What I'm saying here and you should add this rule when you watch that other video that's going to come out on this channel. How to do this kind of architecture is I have found a way to make these agents solve any error you face. I will say that again. I have built out a system that operationally makes it so you can solve any error in your app. What's the biggest thing stopping you from building your app? It's not usually the content of you pushing out the app and building all those files. It's usually when you face a extremely frustrating error you can't get past and it takes days to solve. Yeah, I figured out a way to solve that. So, make sure to stay tuned on this channel. I'm going make a whole separate
[07:46] video on that. Make sure to like here as I'm going to show you operationally from a software engineer perspective. Basically, what I did y'all was I've been facing errors for the last 10 plus years when coding. I sat down for a second and I realized, wait, I go through a thought process that I can just push out and have the AI model do that same exact thought process, therefore streamline the entire air troubleshooting process and have it do all the air troubleshooting for me. That video is coming out. Don't worry about that. So, make sure to stay tuned on this channel. But, as you already know, these style videos, I'll see you in the next. The Corbin just showed me some cursor AI rules that I can apply to replet any type of IDE and now have the
[08:18] ability to make it so that I get better code outputs and get better app value type of video. Also, some of y'all might be wondering, Corin, why you wearing this jacket? It's cold. Okay, it's getting cold in the bay.