
SYS.BLOG
Thoughts on Vibe Coding and Cursor
Best practices for vibe coding with Cursor, including the dual-model workflow, advanced prompting techniques, context management, and common pitfalls to avoid.
I've spent 10 hours a day the past couple of weeks vibe coding my SaaS as well as several other projects. During that time I have learned a lot about Cursor and decided to document my thoughts here. There's certainly more to it than just asking Claude "plz fix".
What follows is everything I've figured out so far: how to set up Cursor for repeatable results, why I use two models instead of one, the prompting patterns that actually work, and the mistakes that cost me hours before I learned to avoid them.
What Vibe Coding Actually Looks Like
In practice, vibe coding means you describe what you want in plain language and the AI writes the code. Instead of typing out a React component line by line, I tell Cursor: "Build a settings page with a sidebar nav, form fields for profile info, and a danger zone for account deletion." It generates the component, I review it, tweak the parts that are off, and move on.
The speed difference is real. A settings page that would take me 45 minutes to scaffold by hand takes about 5 minutes of prompting and review. But the quality depends entirely on how you set up Cursor and how you talk to the model, which is what the rest of this post is about.
A Couple of Tips for Cursor
1. Create a .cursorrules File
A .cursorrules file in your project root directory provides project-specific instructions to the AI. This is crucial for consistent vibe coding results. Here's a template to start with:
You are an expert developer with deep knowledge of [YOUR_TECH_STACK].
Code Style and Structure:
- Write clean, maintainable code with appropriate comments
- Follow [YOUR_CODING_STANDARDS]
- Prioritize readability and simplicity over clever solutions
- Use consistent naming conventions
- Structure code logically with clear separation of concerns
Project Context:
[BRIEF_DESCRIPTION_OF_YOUR_PROJECT]
When generating code:
- Consider performance implications
- Include error handling
- Write with testability in mind
- Consider edge cases2. Set Up Notepads for Key Concepts
Cursor's Notepads feature is invaluable for vibe coding. Create notepads for:
- Project architecture overview
- Key design patterns and principles
- Common code snippets and patterns
- API documentation and examples
- User stories or requirements
These notepads can be referenced during your vibe coding sessions, providing important context to the AI.
The Dual-Model Workflow
The approach that's worked best for me is using two models together. A high-reasoning model (like o1 or o3) handles planning and architecture decisions, and Claude in Cursor handles the actual code generation.
Dual-Model Workflow
Click a step to expand details
Understanding the Strengths of Each Model
Strategic AI (high-reasoning models like o1/o3) excels at:
- Choosing between monolith vs. microservices for your specific use case
- Designing database schemas, API contracts, and auth flows before writing code
- Comparing trade-offs: "Should I use SSR, SSG, or ISR for this page?"
- Spotting race conditions, N+1 queries, and security holes in a proposed design
- Breaking a large feature into ordered implementation steps
Claude (in Cursor) excels at:
- Generating full component files that match your existing code style
- Writing migrations, API routes, and tests from a spec
- Refactoring: extracting hooks, splitting components, renaming across files
- Adding error handling, loading states, and edge-case logic to existing code
- Explaining unfamiliar code: "What does this useEffect do and why?"
Advanced Prompting Techniques for Vibe Coding
The quality of your vibe coding experience depends significantly on how you communicate with the AI. Here are advanced prompting techniques specifically tailored for Cursor:
Prompting Techniques
Tap a technique to see example & tip
Iterative Refinement
Start with a basic implementation and refine it through conversation:
Let's create a basic data visualization component using D3.js.Now let's enhance it with interactive tooltips and animations.Finally, let's optimize for performance and add responsive behavior.
Context Management: The Key to Effective Vibe Coding
Perhaps the most critical aspect of successful vibe coding is effective context management. Here are best practices specifically for Cursor:
Strategic File Selection
Don't try to give the AI your entire codebase. Instead:
- Use
@to add only the most relevant files to the context - Keep key files open in your editor
- Reference specific files with
/when asking questions
Use the Context Window Wisely
Every model has a context window, and even though modern limits are large (100K+ tokens), stuffing more in doesn't mean better results. The model pays less attention to middle content. To use context effectively:
- Start new chats for new topics or features
- Remove irrelevant files from context when switching topics
- Prioritize recent and relevant code over older or peripheral code
Create Context-Rich Notepads
Use Notepads to store important context that you can reference across multiple conversations: system architecture diagrams, API specifications, design patterns, and user stories. Reference these notepads using the @ syntax when needed.
Maintaining Code Quality in Vibe Coding
- Always Review Generated Code: Never accept generated code without review. Look for logical errors, security vulnerabilities, performance issues, and consistency with your coding standards.
- Request Explanations: Ask the AI to explain complex or unfamiliar code it generates.
- Enforce Testing: Make testing an integral part of your vibe coding workflow. Write comprehensive tests for all generated code.
- Refactor for Simplicity: After implementing functionality, always ask for simplification.
- Progressive Enhancement: Start with minimal viable implementations and enhance progressively. Get basic functionality working first, then add error handling, optimize for performance, and enhance with additional features.
Real-World Vibe Coding Patterns
Pattern 1: The Feature Expansion
Start with a minimal feature description and progressively expand:
Create a user profile page that displays basic user info.Add the ability to edit profile information.Implement profile picture uploads with preview and cropping.Add validation for all fields and proper error handling.
Pattern 2: The Architectural Exploration
Use vibe coding to explore different architectural approaches:
I'm building a data-intensive dashboard. What are the different architectural approaches and trade-offs?The micro-frontend approach sounds promising. How would I structure the project?
Pattern 3: The Code Archaeologist
Use vibe coding to understand and improve existing code:
Help me analyze how this legacy authentication system works and identify areas for improvement.Refactor the authentication system to use modern best practices while maintaining backward compatibility.
Pattern 4: The Learning Accelerator
Use vibe coding to learn new technologies:
I want to learn React Server Components. Create a simple app that demonstrates key concepts and best practices.Explain how this code showcases the benefits and how it differs from traditional React.
Common Pitfalls and How to Avoid Them
Even with best practices, there are common pitfalls in vibe coding. Check off each one as you internalize the fix:
Pitfall Checklist
0/4 addressedThe Skill That Actually Matters Now
After a couple of weeks of this, the biggest thing I've learned is that vibe coding shifts where the difficulty lies. Writing code is faster, but reading code is more important than ever. If you can't review what the AI generates (spot a missing null check, catch a bad SQL query, notice that it silently dropped your error handling), you'll ship bugs faster too.
The developers who get the most out of this aren't the ones who prompt the hardest. They're the ones who understand their own codebase well enough to give the AI good context and catch its mistakes quickly. Domain knowledge, system design sense, and a strong review habit matter more now, not less.
My advice: start with a small, well-scoped feature. Set up your .cursorrules, use the dual-model workflow, and pay close attention to what the AI gets wrong. That's where you'll learn the most about how to work with it effectively.