cursor rules

Using Cursor well = fast, clean code.
Using it wrong = Al spaghetti you'll be cleaning up all week.
Here's how to actually use it right:

  1. Set 5-10 clear project rules upfront so Cursor knows yourstructure
    and constraints. Try/generate rules for existing codebases.
  2. Be specific in prompts. Spell out tech stack, behavior, and constraints
    like a mini spec.
  3. Work file by file;generate, test, and review in small, focused cchunks
  4. Write tests first, lock them, and generate code until all teests pass
  5. Always review Al output and hard-fix anything that breaks, then tell
    Cursor to use them as examples.
  6. Use @file, @folders, @git to scope Cursor's attention to theright
    parts of your codebase.
  7. Keep design docs and checklists in cursor/sor/so the agent has full
    context on what to do next.
  8. If code is wrong, just write it yourself. Cursor learns faster from edits
    than explanations.
  9. Use chat history to iterate on old prompts without starting over.
  10. Choose models intentionally. Gemini for precision, Claaude for
    breadth.
  11. In new or unfamiliar stacks, paste in link to documentaation. Make
    Cursor explain all errors and fixes line by line.
    12.Let big projects index overnight and limit context scope to Ikeep
    performance snappy.
    Structure and control wins (for now)
    Treat Cursor agent like a powerful junior-it can go far, fast, if you show
    it the way.
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容