Cursor ships with sensible defaults that don't match every project. These five behaviors cost me time until I added explicit rules to correct them.
1. It edits files you didn't ask it to touch
Ask Cursor to fix a function and it sometimes "improves" the calling code, adds types to adjacent variables, or reorganizes imports. Technically correct, not what you wanted.
Fix: Minimal footprint. Only modify files directly required for the stated task.
2. It uses deprecated Next.js patterns
Cursor trained on years of Next.js Pages Router code. For App Router projects, it sometimes defaults to getServerSideProps, useRouter from next/router, or pages in the wrong directory.
Fix: This project uses Next.js App Router. Do not use Pages Router patterns. Check the existing app/ directory structure before creating new files.
3. It claims done when it isn't
Cursor says "I've implemented X" without running tests. If tests don't pass, you find out when you run them yourself.
Fix: Do not say work is complete until you have run the tests and confirmed they pass. Show the test output.
4. It uses string concatenation for SQL
For projects without an ORM, Cursor occasionally uses f-strings or string formatting in database queries instead of parameterized queries.
Fix: All database queries must use parameterized queries. Never concatenate user input into SQL strings.
5. It adds console.log statements and forgets to remove them
Debug logging is added mid-implementation and sometimes stays in the final diff.
Fix: Remove all console.log, print(), and debug statements before finalizing. Do not leave debugging output in committed code.
Where to put these rules
In your .cursorrules file at the project root. The file is plain text — one rule per line or short paragraphs. Cursor loads it into context at the start of every conversation.
You can generate a starter .cursorrules file for your stack at builtbyzac.com/tools/cursorrules-generator.html — free, runs in browser.
Top comments (0)