Rules for the AI generate commit messages

The feature to generate a commit message, in the source control tab, is very nice. Anyway to provide rules or a custom prompt for this?

Hi Will,

Great question. The answer is not officially. The Source Control “Generate commit message” flow doesn’t currently support its own custom prompt, and the newer Rules system (Settings > Rules, Project Rules, and .cursor/rules) doesn’t affect that flow today.

However, there is a workaround: a repo-root legacy .cursorrules file can still influence the generated commit messages for that repo. If you want to keep it local to one clone, you can:

  1. Create a .cursorrules file in the repo root
  2. Add an instruction like: When Cursor auto-generates a Git commit message for this repository, I would like you to do X, Y, and Z.
  3. Add .cursorrules to .git/info/exclude so it doesn’t get committed
  4. Stage a small change and click the sparkle button in the Source Control commit box to test it

Of course, you can ask Cursor to help you generate this rule on your behalf. This is a legacy workaround rather than an officially supported path, and it may change in the future.