Specialist Persona ยท Cursor
Commit Messages & Pull Requests Cursor Rules (.mdc)
Cursor rules (.mdc) for Commit Messages & Pull Requests, scoped with globs so they load only for matching files.
- Path
- .cursor/rules/commit-pr-writer.mdc
- Loads
- Glob pattern match
- Format
- Frontmatter MDC (.mdc)
- Used by
- Cursor
What this file tells the agent
Commit Messages & Pull Requests projects benefit from glob-scoped Cursor project rules (.cursor/rules/*.mdc) with alwaysApply: false, so the rules load only when matching files are in play. Without them, Cursor's agent falls back on conventions from its training data, which are often a version or two behind, and tends to change more than it needs to. This rule gives it the current Commit Messages & Pull Requests conventions instead.
- Read git status, the staged diff, and recent log style before writing.
- Subject as type(scope): summary, imperative, at most 72 characters.
- Propose separate commits when changes mix unrelated concerns.
- Describe only what the diff contains; never claim unverified tests.
- No commit, amend, or push without approval; never --no-verify or force-push.
Install it in one command
- 01
Go to your project root
The file goes at .cursor/rules/commit-pr-writer.mdc, relative to the root.
- 02
Download the file
Run the command on the right. It downloads this preset and writes the file.
- 03
Make sure it gets used
Cursor picks up rules in .cursor/rules/ automatically. This one attaches when files matching its globs are in the request, or when you @-mention it.
$ mkdir -p ".cursor/rules" && curl -fsSL "https://www.devscratchpad.tech/api/raw/cursor-rules/commit-pr-writer" -o ".cursor/rules/commit-pr-writer.mdc"
writes .cursor/rules/commit-pr-writer.mdc
.cursor/rules/commit-pr-writer.mdc
To write the file from your own code instead, use Read your code or Convert Legacy Rules in the editor above.
More for Commit Messages & Pull Requests
Questions
- Where should this Commit Messages & Pull Requests rule be placed?
- Save it as .cursor/rules/commit-pr-writer.mdc in your project. Cursor finds it automatically and attaches it when files matching its globs are in play.
- Does this rule work in Cursor's Agent and inline edit?
- Yes. Project rules in .cursor/rules/ are used by Cursor's Agent, chat and inline edit (Ctrl+K) when the rule's globs match the files involved, or when you @-mention the rule.