Share Cursor Project Rules Through GitHub and Review Changes
Putting Cursor project rules in Git lets the team discuss changes to the same guidance the agent reads. Treat a changed glob like a scope change and make the intended files clear in the pull request.
Worked example
Review checklist for a changed Cursor rule
Rule under review: .cursor/rules/sql-migrations.mdc Expected match: db/migrations/0004_add_status.sql Expected nonmatch: src/database/read.ts Review: check the glob, required CLI commands, and path examples. Proof: rule appears in Cursor from a clean checkout.
Steps
- Place a shared rule under .cursor/rules with its .mdc extension. Keep personal instructions outside the project rule and keep secrets out of the file.
- Use git status --short -- .cursor/rules to confirm the file is visible to Git. Include the intended matching and nonmatching paths in the GitHub pull request.
- From a clean checkout of the branch, open Cursor and verify the project rule appears. Attach a matching and nonmatching file in separate chats and compare the included rules.
What to check
- Make sure reviewers can see that the file is tracked and correctly scoped. Files ignored by Git will not appear in a fresh clone.
- Keep the rule tied to conventions the repository already uses. A team reviewing the rule should be able to identify the source for each command or requirement.