
Probably the most promising use case that AI has created is code generation. It is INCREDIBLE what AI can do to generate and refine code. This is true for experienced developers and also for those who are just getting started. Of course, you can ask ChatGPT to generate code on the side, but the real power comes when you bring AI directly into your development environment. That is where my favorite tool comes in: Cursor.
Introducing Cursor
Cursor is an AI-native code editor built on top of VS Code. Instead of copy-pasting snippets from a browser, you can generate entire files, refactor large sections of code, and even scaffold full projects without leaving your editor. With AI built in, it feels like you are working side by side with a capable coding partner who knows your project.
Why Best Practices Matter
AI can create amazing outputs, but the quality depends heavily on how you guide it. The difference between a messy block of generic code and a polished file that drops right into your repo often comes down to the context you provide. Without direction, AI guesses. With structure and clear context, it delivers code that matches your project’s style and requirements.
Best Practices for Using Cursor
Create an Overview File
One of the simplest ways to set yourself up for success is to create a file that gives AI the bigger picture. Add a README.md or overview.md that explains what you are building, which frameworks and libraries you are using, how you structure your project, and any principles you want to enforce.
For example:
Frameworks: “This project uses Next.js, Tailwind, and Firebase.”
Structure: “Components live in /src/components and everything is TypeScript.”
Principles: “Prioritize performance, accessibility, and responsive design.”
When Cursor has this reference, it can create full files that align with your stack instead of spitting out disconnected snippets.
Manage Context Thoughtfully
Every AI model relies on context to generate useful output. Context includes system prompts, your conversation history, attached files, tool outputs, and the code currently in view. As conversations grow longer, context fills up, and the model forgets details.
Give Cursor clear, relevant context by opening the right files, keeping your overview file updated, and prompting with specific goals. This makes the AI more accurate and less likely to drift.
Learn to Use Tools
Cursor supports tool calls, which let the AI do more than just write text. With tools, the model can read and write files in your codebase, search through code, run shell commands, check for errors, and even access documentation.
Think of it as the difference between telling someone what to do and giving them the ability to look at your fridge before cooking. The more tools you enable, the better Cursor can understand your code and produce helpful results.
Experiment with Agents
Agents take things a step further. Instead of asking Cursor to update one file at a time, you can give it a goal and let it figure out the steps. For example, you might say, “Add a dark mode toggle to my settings page.” The agent can then find the right files, plan the implementation, update components, add CSS classes, and check for errors as it goes.
Agents are powerful, but they also require guardrails. They use more tokens, can get stuck in loops, and may make changes you did not intend. Start small with well-defined tasks like adding tests, updating documentation, or refactoring repeated patterns. Always review the results before merging.
When to Use Cursor and When Not To
There is a lot of conversation about when to use Cursor and other “vibe-coding” tools and when to avoid them. Some use cases are universally agreed upon: generating boilerplate code, writing test cases, and handling some front-end work. Critics argue that beyond these scenarios, AI coding tools fall short or produce unreliable results.
I disagree. While you always need to monitor the output, there are far more situations where Cursor can unlock massive gains. With the right context and oversight, it is possible to become 10x or even 20x more efficient. Some training programs, like Gauntlet AI, even teach engineers to build entire applications with AI at the core of their workflow.
For me, the future is not far away. The future is already here.
Here is a great video overview on how to get going with Cursor.