How to create a persistent context file for Cursor AI - similar to README.md but for AI

I’m looking for a way to create a persistent context file that Cursor AI can reference when working in my repository - similar to how README.md provides context for human developers. Currently, I find myself repeatedly copying and pasting code snippets to help Cursor understand my project’s context.

Specifically, I’d like to create a file that contains:

  • Instructions for code generation patterns
  • Database connection patterns and configurations
  • Information about which styling libraries we use
  • Other project-specific conventions

Is there a recommended way to create such a file that Cursor AI will automatically reference when working in the repository? This would help maintain consistency and reduce the need for repetitive context-sharing.

Cursorrules?

1 Like

@ardalangh I think this will help you