Be Explicit and Precise
Use @
mentions liberally to reference specific files (@/src/utils.ts
), symbols (@MyClass
), and documentation (@Docs
). The more precise your context, the more relevant the AI’s response will be.
Using an AI coding assistant effectively is more than just learning to write good prompts; it’s about adopting a new set of workflows and mental models. By treating the AI as a true development partner and leveraging its strengths, you can achieve a step-change in your productivity and code quality.
This guide outlines the core best practices that separate novice users from expert AI-powered developers.
The single most important factor in getting high-quality results from your AI assistant is providing it with high-quality context. The AI is only as good as the information it has.
Be Explicit and Precise
Use @
mentions liberally to reference specific files (@/src/utils.ts
), symbols (@MyClass
), and documentation (@Docs
). The more precise your context, the more relevant the AI’s response will be.
Establish Persistent Rules
Use project-level configuration files (.cursor/rules
or CLAUDE.md
) to provide the AI with persistent, high-level context about your project’s architecture, coding standards, and common patterns. This is your “brain sheet” for the AI.
Avoid Information Overload
More context isn’t always better. Flooding the AI with dozens of irrelevant files can be more confusing than helpful. Focus on providing a curated set of the most relevant information for the task at hand.
The most successful and reliable pattern for working with an AI assistant is to follow a structured, three-phase approach: Plan, Execute, and Verify.
Plan First.
Before writing any code, work with the AI in an “ask” or “read-only” mode. Use it to explore the existing codebase, understand the requirements, and collaboratively create a detailed, step-by-step implementation plan, often in the form of a TODO
list.
Execute Incrementally. Switch to an “agent” or “edit” mode and tackle one item from your plan at a time. Your role here is that of a supervisor: you provide the instruction, and the AI performs the implementation, which you then review and approve. Working in small, focused steps makes the process manageable and easy to verify.
Verify Continuously. Use automated feedback loops to verify the AI’s work. Test-Driven Development (TDD) is a particularly powerful paradigm here: have the AI write the tests first, confirm they fail, and then write the code to make them pass. Use browser automation to check UIs and compiler errors to guide refactoring.
While incredibly powerful, the AI is not infallible. The best mental model is to treat it as a very fast, very knowledgeable, but sometimes naive junior developer.
By embracing these best practices, you move from simply using an AI tool to truly partnering with it, creating a development process that is faster, more efficient, and often produces higher-quality results.