Let's learn these simple prompts that are going to give us better code outputs in any AI model we use. Welcome back, y'all. In today's video, I want to go over some very simple prompts that I have used in the past years when coding of AI that should help you out a lot.
These prompts are going to work whether you code of chat GBT, maybe you code of Claude or coding within the IDE itself, whether that is cursor AI, Windsurf, everything above the board. So, let's go ahead and jump in. So, first off, before we even jump into prompting, understand the models, right?
So, what I like to use is JBT 03 Mini. I already know some of you in the comments are like Corbin Claude's better. Okay, fine.
Use Claude. If you like Claude, use Claude. If you want to know which model you like better, just mess around, play around with it.
Personally, I find best code outputs with 03 Mini. That's my context, though. I build software that has artificial intelligence integrated into it.
Your context might be different. If you're developing video games, I have no clue what the best model is. Let me know in the comments if you do.
First prompt, though, here is the first half of the first prompt. Here's the code I'm working with today. And what you're going to do is simply copy all the code.
JS, CSS, Python, whatever it may be. So for this, let's say I'm working the app. js and the CSS.
I would paste the entire JS file. Come over here. I would copy the entire CSS file.
And paste the entire CSS file as well. The second half of this prompt is going to be simply, "Are you ready to see what I want? " Now, on the surface level, some of y'all are going to be like, "This is very basic, Corbin.
" But trust me, if you have no coding experience, and more specifically, you want to learn how to use code and AI, this is fundamentally important. What this does is that this basically loads a chat with the entire context of all your code. So when you hit enter here, it isn't going to start rambling, which is very annoying when dealing with AI models.
It's simply going to say like, "Okay, cool. What do you want to do? " Watch.
And there we go. This allows us to have a kind of like a starting point, you know, like at a checkpoint in a game where if I code from here on out or if I start prompting from here on out over here, I can always come back to this original prompt, right? So, let's just say change all the color into a light UI.
Hit enter. It's going to give me an output here. And let's just say we keep going down this little rabbit hole and we're like, wait, hold up.
I actually don't like this rabbit hole. You can always scroll all the way back up into the chat here and simply just select the original message. Therefore, I come over here.
I hit this pencil and there we go. We start from ground zero again, but ground zero with all this original context of the original code files. Therefore, second prompt.
Here is the second prompt you can check out here. Let's say we want to make our code here into a retro theme. So, we'll put in the request.
Okay, I want to make my code more of a retro theme from the '9s. But here is the second prompt y'all can start leveraging. Please output the entire new.
js and CSS file. Now, obviously, whatever your context may be, so maybe it was just a Python file. You'd be like, please output the entire Python file.
This makes it so when you're working with these AI models, we're going to be able to get the entire file outputed, which allows us to simply copy the entire JS from this chat and paste it over here. This is extremely helpful if you're a beginner because end of the day, if it starts spewing out little code blocks like here's this little code that's changed, here's this code that's changed and it's all fragmented, that can be annoying. Therefore, opt for entire file outputs.
So, you can simply come over to this app. js GS file, copy it here, and paste it over into your IDE. And we got our entire app CSS as well.
Let's up the complexity here. Let's say we want to do something more advanced with our code. What's the best way to approach that?
Now, one example of doing something more advanced with our code, whether that's in the back end or the front end, is dealing with external APIs. Right? So, in this context, this is an API call to Mail Bluster, which is a email CRM.
Regardless of everything I just said there, here's a situation. You're creating your landing page. you want to accept emails and you want to accept emails but you don't necessarily know how to read API documentation slashimplement it correctly.
Now in theory I could simply tell hey Chad GBT claude we are using Mailb bluster how do I subscribe a new lead and I could prompt it right there but let's get the best output here in order to do that simply just go to the documentation so for this we would just go to API doc obviously whatever your context is it would just simply be the software name API and take it one step further there this step and this skill set I'm about to show you you can leverage in any complex type of code right this is even coming from if you're on a Stack Overflow form you see some example code you want to leverage use this logic what I'm about to show you it's simple though manage leads create don't need to know anything just copy everything everything Corbin everything so with all this copied I would come back to my chat here and we would do something along the lines of okay we want to subscribe a new email using Mailb bluster here's info whatever action you want to functionally do within your application you would put there but the skill and prompt three of what you're learning here is your ability just to frontload a ton of data but data that is relevant So, I'd paste all that API doc in there. I'd hit enter. And now it contextually knows the most modern up-to-date information on how to do said action.
Therefore, the answer we're about to get from a AI model is going to be more accurate. If we alternatively just said the exact same thing and didn't paste the entire API doc page, we could get inaccurate information. This is going to lead to better code outputs when using AI.
But let me leave you with two little bonus tips. First one being sometimes, especially if your file has changed a lot from the original input field of like how we started this chat, just start a new chat. Click this start a new chat and use that first prompt.
Reset, copy and paste your more updated files now and go down the same little rabbit hole. Second major tip here that could be very useful and this applies to any AI model. Typically, they are going to have something called custom instructions.
So in Chad GBT, that is found here. Customize Chat GBT in cursor for example it's going to be in your settings found in rules. What this allows you to do is mitigate assumptions made by your AI model.
What I mean by that is that you can identify things here like the operating system you're coding with the specific application you are even trying to code so it has more context in every new chat. Now I made a whole separate video on this so I'll leave it right there and I'll leave it in the description down below so you can check it out and how to start leveraging this in your workflow. For now that does this video.
So, make sure you leave a like if you found value in today's video, and I'll see you in the next video. AI coding, two random videos. That's my face.