Global .cursor/rules directory

It would be nice to have the possibility of defining user-level Cursor Rules, not tied to any project but available in all of them.

For example, I just wrote a rule to explain Cursor how to autonomousy create a branch, commit, push and open a PR. I would like to have it in my home directory, and not commit it in every GitHub project I work on.

This would also help people to create custom workflows without polluting the repos that might be used by other people.

2 Likes

have you tried saving these in the Rules for AI section in cursor settings? it is meant to work as user-level cursor rules only

It works, but that is a free text field, not separate rule files. Therefore, that rule is loaded in the context of every session. It would be nice to have separate files for separate use cases, also in a global context.

1 Like

hmm I can understand. maybe they’ll add this in a future update. Till then you could just copy the ones over which are required for each project!

We don’t currently have a global rules directory feature, but you may be able to create a local .cursor/rules directory in your home folder as a workaround, and then just create symlinks to that directory in each of your projects - I haven’t tried this, so it may not work!

even if this works its undesireable. the idea is to have some shared global rules (eg: rule to assist making new rules) and a folder for rules relevant to the project

2 Likes