cursor-best-practices / rules
Cursor rule7 starsChanged 10 months agoMITView on GitHub
Maintaining and updating cursor-best-practices skill. Adding rules, updating SKILL.md, maintaining indexes, following patterns, keeping content current. How to contribute, update content, follow structure, maintain consistency.
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 1,533 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 repository5 other files it gives its agents.
- .cursor/AGENTS.mdAGENTS.md
- .cursor/rules/architecture-and-design.mdCursor rule
- .cursor/rules/codebase-structure.mdCursor rule
- .cursor/rules/content-patterns.mdCursor rule
- cursor-best-practicesSkill
The file
Show its rules and text
We split this skill-maintenance.md into the rules it gives an agent
15 rules. About 0 are common, 11 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Choose location: Place in appropriate rules/ subdirectory based on topic
- Distinctive: line 17
Write content: Follow Do/Don't or Incorrect/Correct pattern
- Very specific: line 19
Update index: Add entry to rules/_sections.md
- Distinctive: line 20
Update indexes: Add to relevant index files if needed
- Distinctive: line 36
Do: [Pattern] with explanation
- Distinctive: line 37
Don't: [Anti-pattern] with explanation
- Distinctive: line 47
Maintain links: Ensure all links to rules/, commands/, agents/, skills/, references/ are current
- Distinctive: line 72
Add new rule to appropriate index
- Distinctive: line 106
Update rules when features change
- Distinctive: line 108
Update examples to match current behavior
- Very specific: line 112
Update CHANGELOG.md with notable changes
- Very specific: line 114
Update SKILL.md frontmatter version
- Distinctive: line 143
Make changes: Follow patterns and guidelines
- Distinctive: line 144
Update indexes: Add to relevant index files
- Distinctive: line 145
Update CHANGELOG: Document notable changes
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 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
Skill Maintenance Guidelines
Guidelines for maintaining and updating the cursor-best-practices skill.
Adding New Rules
Process
- Choose location: Place in appropriate
rules/subdirectory based on topic - Use template: Copy
rules/_template.mdas starting point - Write content: Follow Do/Don't or Incorrect/Correct pattern
- Add frontmatter: Include keyword-rich description and tags
- Update index: Add entry to
rules/_sections.md - Update indexes: Add to relevant index files if needed
Frontmatter Requirements
---
description: "Keyword-rich description with multiple phrasings and common queries"
tags: [tag1, tag2, tag3, related-tags]
globs: ["**/*.ts"] # Optional, for file-specific rules
alwaysApply: false # Optional, default false
---Content Structure
- Brief introduction
- Do: [Pattern] with explanation
- Don't: [Anti-pattern] with explanation
- Related Queries section
- See Also section with links
Updating SKILL.md
Guidelines
- Keep under ~500 lines: Link to rules/ and references/ instead of duplicating
- Update when adding major sections: New categories or significant features
- Maintain links: Ensure all links to rules/, commands/, agents/, skills/, references/ are current
- Follow structure: Maintain existing organization and flow
When to Update
- Adding new major category of rules
- Significant changes to command templates
- New reference guides
- Major structural changes
Maintaining Indexes
Index Files
query-index.md- Maps user queries to rulessetup-workflows-index.md- Framework and project setupfeature-index.md- Feature-based organizationintegration-index.md- Integration indexconfiguration-index.md- Configuration indextroubleshooting-index.md- Troubleshooting indexpattern-index.md- Pattern indexuse-case-index.md- Use case index
Update Process
- Add new rule to appropriate index
- Maintain alphabetical or logical ordering
- Include brief description
- Link to rule file
Following Patterns
Rule Files
- One practice per file
- Clear Do/Don't patterns
- Keyword-rich descriptions
- Related queries section
- See also links
Commands
- Clear instructions
- Usage examples
- Output format specification
- Checklist or step-by-step structure
References
- Comprehensive coverage
- Link to rules (don't duplicate)
- Examples and patterns
- Clear organization
Keeping Content Current
Tracking Cursor Docs
- Monitor Cursor docs for changes
- Update rules when features change
- Reflect new features in relevant sections
- Update examples to match current behavior
Version Updates
- Update
CHANGELOG.mdwith notable changes - Update
metadata.jsonversion - Update
SKILL.mdfrontmatter version - Document breaking changes
Consistency Checks
Before Committing
- Rule follows template structure
- Frontmatter has keyword-rich description
- Added to
_sections.md - Updated relevant indexes
- Links are valid
- No duplicate content
- Follows naming conventions
- Under 500 lines (if rule file)
Code Review Checklist
- Content is accurate
- Examples are correct
- Links work
- Follows patterns
- Well-organized
- User-friendly
Contribution Workflow
- Identify need: Outdated info, missing content, or improvement
- Create issue: Discuss approach if major change
- Make changes: Follow patterns and guidelines
- Update indexes: Add to relevant index files
- Update CHANGELOG: Document notable changes
- Submit PR: Include description of changes
Key Principles
- User-focused: Content helps users effectively
- Accurate: Reflects current Cursor behavior
- Organized: Clear structure and navigation
- Consistent: Follows established patterns
- Maintainable: Easy to update and extend
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.

