github-code-quality-cursorrules-prompt-file
A set of guardrails for the Cursor agent: check facts before asserting them, skip apologies and recaps, change one file at a time.
.cursor/rules/github-code-quality-cursorrules-prompt-file.mdcWhat github-code-quality-cursorrules-prompt-file does
Sixteen patterns each carry their own instruction. When the agent is about to guess without proof, say sorry, summarise its work or suggest edits nobody asked for, the matching message fires and stops it. The marker // MULTI-FILE CHANGE: pushes edits to go file by file, so mistakes surface before the agent moves on.
Another cluster keeps the codebase intact: leave unrelated code alone, skip whitespace advice, don't ask the user to confirm what is already visible in context, point at real files instead of a made-up x.md. It is not switched on for every request, since the frontmatter sets alwaysApply: false.
That density is where it can bite. The bans on apologies and on feedback about understanding are broad enough to muzzle ordinary explanations mid-conversation. Worth trying if chatter and unrequested refactors annoy you. Run it on a couple of tasks first and see whether the replies turn too terse.
What it helps with
- make the agent verify facts instead of guessing
- split a multi-file edit into reviewable steps
- cut apologies and recaps out of responses
- keep the agent from touching code outside the task
- stop references to invented files
Example prompts for the agent
- Check the library version claim before you put it in the report
- Edit
routes.py, thenmodels.py, one file per step - Skip the summary and show me the diff
How to install github-code-quality-cursorrules-prompt-file
Manually: put the files in place
.cursor/rules/github-code-quality-cursorrules-prompt-file.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/github-code-quality-cursorrules-prompt-file.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/github-code-quality-cursorrules-prompt-file.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/github-code-quality-cursorrules-prompt-file.mdManually: put the files in place
.clinerules/github-code-quality-cursorrules-prompt-file.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about github-code-quality-cursorrules-prompt-file
How do I install github-code-quality-cursorrules-prompt-file in Cursor?
Create the file .cursor/rules/github-code-quality-cursorrules-prompt-file.mdc and paste the rule content into it.
What does github-code-quality-cursorrules-prompt-file do?
It gives the agent a list of behavioural constraints: confirm information, drop apologies, avoid summaries, propose no extra changes, preserve unrelated code.
Does the rule apply automatically?
No. The frontmatter sets alwaysApply: false, so you attach it per task. Its scope is **/*.
Source text
github-code-quality-cursorrules-prompt-file.mdc · CC0-1.0
---
description: "Cursor rules for GitHub development with code quality integration."
globs: **/*
alwaysApply: false
---
{
"rules": [
{
"name": "Verify Information",
"pattern": "(?i)\\b(assume|assumption|guess|speculate)\\b",
"message": "Always verify information before presenting it. Do not make assumptions or speculate without clear evidence."
},
{
"name": "File-by-File Changes",
"pattern": "// MULTI-FILE CHANGE:",
"message": "Make changes file by file and give me a chance to spot mistakes"
},
{
"name": "No Apologies",
"pattern": "(?i)\\b(sorry|apologize|apologies)\\b",
"message": "Never use apologies"
},
{
"name": "No Understanding Feedback",
"pattern": "(?i)\\b(understand|understood|got it)\\b",
"message": "Avoid giving feedback about understanding in comments or documentation"
},
{
"name": "No Whitespace Suggestions",
"pattern": "(?i)\\b(whitespace|indentation|spacing)\\b",
"message": "Don't suggest whitespace changes"
},
{
"name": "No Summaries",
"pattern": "(?i)\\b(summary|summarize|overview)\\b",
"message": "Don't summarize changes made"
},
{
"name": "No Inventions",
"pattern": "(?i)\\b(suggest|recommendation|propose)\\b",
"message": "Don't invent changes other than what's explicitly requested"
},
{
"name": "No Unnecessary Confirmations",
"pattern": "(?i)\\b(make sure|confirm|verify|check)\\b",
"message": "Don't ask for confirmation of information already provided in the context"
},
{
"name": "Preserve Existing Code",
"pattern": "(?i)\\b(remove|delete|eliminate|destroy)\\b",
"message": "Don't remove unrelated code or functionalities. Pay attention to preserving existing structures."
},
{
"name": "Single Chunk Edits",
"pattern": "(?i)\\b(first|then|next|after that|finally)\\b",
"message": "Provide all edits in a single chunk instead of multiple-step instructions or explanations for the same file"
},
{
"name": "No Implementation Checks",
"pattern": "(?i)\\b(make sure|verify|check|confirm) (it's|it is|that) (correctly|properly) implemented\\b",
"message": "Don't ask the user to verify implementations that are visible in the provided context"
},
{
"name": "No Unnecessary Updates",
"pattern": "(?i)\\b(update|change|modify|alter)\\b.*\\bno changes\\b",
"message": "Don't suggest updates or changes to files when there are no actual modifications needed"
},
{
"name": "Provide Real File Links",
"pattern": "(?i)\\b(file|in)\\b.*\\b(x\\.md)\\b",
"message": "Always provide links to the real files, not x.md"
},
{
"name": "No Previous x.md Consideration",
"pattern": "(?i)\\b(previous|earlier|last)\\b.*\\bx\\.md\\b",
"message": "Do not consider any previous x.md files in your memory. Complain if the contents are the same as previous runs."
},
{
"name": "No Current Implementation",
"pattern": "(?i)\\b(current|existing)\\s+(implementation|code)\\b",
"message": "Don't show or discuss the current implementation unless specifically requested"
},
{
"name": "Check x.md Content",
"pattern": "(?i)\\b(file|content|implementation)\\b",
"message": "Remember to check the x.md file for the current file contents and implementations"
}
]
}
© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules