prompt-decorators / rules
Cursor rule44 starsChanged 20 months agoApache-2.0View on GitHub
ENSURE careful modifications WHEN changing code TO prevent breakage
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,157 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- .cursor/rules/000-cursor-rules.mdcCursor rule
- .cursor/rules/001-emoji-communication.mdcCursor rule
- .cursor/rules/060-coding-patterns.mdcCursor rule
- .cursor/rules/070-workflow-preferences.mdcCursor rule
- .cursor/rules/400-md-docs.mdcCursor rule
- .cursor/rules/900-software-dev-decorators.mdcCursor rule
The file
We split this 050-careful-code-modification.mdc into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
When modifying existing code in this codebase
- Distinctive: line 12
When fixing bugs or implementing new features
- Distinctive: line 13
When the codebase is fragile or has complex dependencies
- Distinctive: line 18
Consider the scope and potential side effects of all changes
- Distinctive: line 19
Ensure changes are appropriate for the sensitivity level of the codebase
- Distinctive: line 20
Add thorough tests for any modifications made
- Distinctive: line 21
Document changes clearly with comments explaining the rationale
≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: ENSURE careful modifications WHEN changing code TO prevent breakage
globs: **/*.py
---
# Careful Code Modification
<version>1.0.0</version>
## Context
- When modifying existing code in this codebase
- When fixing bugs or implementing new features
- When the codebase is fragile or has complex dependencies
## Requirements
- Make surgical, precise modifications targeting only the specific issue
- Implement proper validation procedures before and after changes
- Consider the scope and potential side effects of all changes
- Ensure changes are appropriate for the sensitivity level of the codebase
- Add thorough tests for any modifications made
- Document changes clearly with comments explaining the rationale
## Examples
<example>
# Good: Targeted fix with validation
def fix_calculation_error(data):
# Validate input before processing
if not isinstance(data, dict) or 'value' not in data:
raise ValueError("Invalid data format")
# Fix specific calculation issue only
corrected_value = data['value'] * 1.05 # Apply 5% correction
# Return with minimal changes to data structure
result = data.copy()
result['value'] = corrected_value
return result
</example>
<example type="invalid">
# Bad: Overly broad changes without validation
def fix_calculation_error(data):
# Completely restructuring data format unnecessarily
new_data = {}
for key, value in data.items():
if key == 'value':
new_data[key] = value * 1.05
else:
new_data[f"modified_{key}"] = process_data(value)
return new_data # Returns completely different structure
</example>
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

