1. Reference Specific Files with @-mentions
Use @filename to give Cursor context about relevant files:
Looking at @auth.ts and @middleware.ts, add rate limiting to the login endpoint
2. Be Specific About Location
Tell Cursor exactly where you want changes:
In the UserProfile component, add a loading skeleton that matches the final layout
3. Include Existing Patterns
Reference existing code patterns you want to follow:
Create a new API endpoint for orders, following the same pattern as @products/route.ts
4. Specify Technology Stack
Be explicit about frameworks and libraries:
Using React Query and Zod, add form validation to the checkout flow with proper error handling
5. Request Minimal Changes
Ask for focused changes to avoid over-engineering:
Fix the null pointer exception in calculateTotal. Don't refactor other code.