prompt-decorators / rules
Cursor rule44 starsChanged 20 months agoApache-2.0View on GitHub
FOLLOW coding patterns WHEN writing code TO maintain codebase quality
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/050-careful-code-modification.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
Show its rules and text
We split this 060-coding-patterns.mdc into the rules it gives an agent
13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
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 writing new code or modifying existing code
- Distinctive: line 12
When implementing features or fixing bugs
- Distinctive: line 13
When refactoring or optimizing code
- Distinctive: line 16
Prefer simple solutions over complex ones
- Distinctive: line 17
Avoid code duplication by checking for similar functionality elsewhere in the codebase
- Distinctive: line 18
Ensure code complies with pre-commit requirements
- Distinctive: line 19
Only make changes that are explicitly requested or well understood
- Distinctive: line 21
Remove old implementations when introducing new ones to avoid duplicate logic
- Distinctive: line 22
Keep codebase clean and organized
- Distinctive: line 23
Avoid writing scripts in files, especially for one-time operations
- Distinctive: line 25
Use mocking data only for tests, never for dev or prod environments
- Distinctive: line 26
Never add stubbing or fake data patterns affecting dev or prod environments
- Distinctive: line 27
Never overwrite env files without explicit confirmation
≈ “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: FOLLOW coding patterns WHEN writing code TO maintain codebase quality
globs: **/*.py
---
# Coding Pattern Preferences
<version>1.0.0</version>
## Context
- When writing new code or modifying existing code
- When implementing features or fixing bugs
- When refactoring or optimizing code
## Requirements
- Prefer simple solutions over complex ones
- Avoid code duplication by checking for similar functionality elsewhere in the codebase
- Ensure code complies with pre-commit requirements
- Only make changes that are explicitly requested or well understood
- Exhaust all options within existing implementation before introducing new patterns
- Remove old implementations when introducing new ones to avoid duplicate logic
- Keep codebase clean and organized
- Avoid writing scripts in files, especially for one-time operations
- Refactor files exceeding 200-300 lines of code
- Use mocking data only for tests, never for dev or prod environments
- Never add stubbing or fake data patterns affecting dev or prod environments
- Never overwrite env files without explicit confirmation
## Examples
<example>
# Good: Simple solution with no duplication
def calculate_total(items):
"""Calculate total price of items using existing utility function."""
from utils.pricing import apply_discount
base_total = sum(item.price for item in items)
return apply_discount(base_total) # Reusing existing functionality
</example>
<example type="invalid">
# Bad: Duplicating existing functionality
def calculate_total(items):
"""Calculate total with duplicated discount logic."""
base_total = sum(item.price for item in items)
# Reimplementing discount logic that already exists in utils.pricing
if base_total > 100:
return base_total * 0.9
else:
return base_total
</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.

