Cursor Rules (.mdc files) are automatically recognized by the AI to provide context-aware instructions. Unlike global settings, these files can be scoped to specific folders or file types, ensuring the AI only follows certain rules when they are relevant to your current task.
- Open the Cursor application on your computer.
- Open the .mdc file and check that it begins with a valid YAML frontmatter block (the section between the --- dashes).
- Set alwaysApply: true in the frontmatter if you want the rule to be active in every Chat or Composer session by default.
- Open the Composer (Cmd+I) or Chat (Cmd+L) and start typing your request.
- Cursor will automatically generate the corresponding .mdc file in your




