agentleFS
HKTITANHKTITAN/cursor-best-practices/.cursor/rules/architecture-and-design.md

cursor-best-practices / rules

Cursor rule7 starsChanged 10 months agoMITView on GitHub

Architecture and design decisions for cursor-best-practices skill. Understanding design choices, structure rationale, organization patterns, content relationships, file dependencies, standards compliance, performance considerations, maintenance workflow. How the codebase is organized, why decisions were made, what patterns are used, how content relates.

The file

We split this architecture-and-design.md into the rules it gives an agent

9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    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
  1. Distinctive:

    Every aspect of Cursor usage is covered

    line 25
  2. Distinctive:

    All content designed to:

    line 47
  3. Distinctive:

    Use-case index - Find by task

    line 103
  4. Distinctive:

    All rules enhanced with:

    line 120
  5. Distinctive:

    Only relevant rules included

    line 194
  6. Distinctive:

    Create rule in appropriate category

    line 209
  7. Distinctive:

    Use template for structure

    line 210
  8. Distinctive:

    Update indexes if needed

    line 218
  9. Distinctive:

    Verify links still work

    line 220

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
architecture-and-design.md

Architecture and Design

Understanding the architecture and design decisions of the cursor-best-practices skill codebase.

Design Principles

1. Standards Compliance

The skill follows three standards simultaneously:

  • Agent Skills Specification - Official open standard
  • skills.sh - Skill discovery and installation platform
  • Cursor Skills - Cursor's skill system

This ensures maximum compatibility and usability.

2. Comprehensive Coverage

250+ rules ensure:

  • Every aspect of Cursor usage is covered
  • Users can find guidance for any question
  • Multiple discovery paths (indexes, categories, queries)

3. Atomic Rules

One practice per file:

  • Easy to find and reference
  • Clear scope and purpose
  • Can be enhanced independently
  • Efficient loading (only relevant rules load)

4. Progressive Enhancement

Content loads progressively:

  • SKILL.md provides overview
  • Rules provide specific guidance
  • References provide deep dives
  • Indexes enable discovery

5. User-Focused

All content designed to:

  • Help users understand Cursor
  • Provide actionable guidance
  • Include practical examples
  • Enable effective usage

Structure Rationale

Nested Folder Structure

cursor-best-practices/
└── cursor-best-practices/  # Skill folder
    └── SKILL.md

Why:

  • Repository name must match skill name for npx skills add
  • Skills.sh expects this structure
  • Allows direct GitHub installation

Category Organization

Rules organized by category:

  • agent/ - Agent-related content
  • context/ - Context management
  • features/ - Cursor features
  • integrations/ - External integrations
  • configuration/ - Configuration options
  • cookbook/ - Examples and patterns
  • troubleshooting/ - Problem solving
  • get-started/ - Getting started

Why:

  • Logical grouping by topic
  • Easy navigation
  • Clear mental model
  • Scalable structure

Separate References

References separate from rules:

  • Rules: Concise, atomic practices
  • References: Comprehensive deep dives

Why:

  • Keeps rules under 500 lines
  • Avoids duplication
  • Enables focused reading
  • Links maintain relationships

Multiple Indexes

8 different indexes:

  • Query index - Find by question
  • Feature index - Find by feature
  • Use-case index - Find by task
  • Setup index - Find setup guides
  • Pattern index - Find patterns
  • Integration index - Find integrations
  • Configuration index - Find config
  • Troubleshooting index - Find solutions

Why:

  • Different discovery paths
  • Multiple entry points
  • User flexibility
  • Comprehensive coverage

Content Patterns

Rule Enhancement Pattern

All rules enhanced with:

  • Keyword-rich descriptions (multiple phrasings)
  • Enhanced tags (query variations)
  • Related Queries section
  • See Also links

Why:

  • Better relevance matching
  • Improved discoverability
  • Multiple query paths
  • Clear relationships

Do/Don't Pattern

Rules use Do/Don't structure:

  • Clear correct approach
  • Clear incorrect approach
  • Examples for both
  • Easy to understand

Why:

  • Clear guidance
  • Prevents mistakes
  • Practical examples
  • Easy to follow

Template Pattern

Templates provided for:

  • Rules (_template.md)
  • Skills (_template-skill.md)
  • Commands (examples in commands/)

Why:

  • Consistency
  • Easy creation
  • Best practices
  • Quick start

File Relationships

Dependency Graph

SKILL.md
├── links to → rules/_sections.md
├── links to → commands/
├── links to → agents/
├── links to → skills/
└── links to → references/

rules/_sections.md
└── indexes → all rule files

indexes/
└── reference → rule files

references/
└── link to → rule files

Content Flow

  1. User asks question → Skill activates
  2. SKILL.md → Provides overview
  3. Indexes → Help find relevant rules
  4. Rules → Provide specific guidance
  5. References → Provide deep dives

Performance Considerations

Lazy Loading

  • Rules load on demand
  • Only relevant rules included
  • File-specific rules use globs
  • Indexes enable quick discovery

Efficient Structure

  • Atomic rules (small files)
  • Linked content (not duplicated)
  • Organized categories (easy navigation)
  • Multiple indexes (fast discovery)

Maintenance Patterns

Adding Content

  1. Create rule in appropriate category
  2. Use template for structure
  3. Add to _sections.md
  4. Update relevant indexes
  5. Update CHANGELOG.md

Updating Content

  1. Modify rule file
  2. Update indexes if needed
  3. Update CHANGELOG.md
  4. Verify links still work

Tracking Changes

  • CHANGELOG.md for notable changes
  • metadata.json for version
  • SKILL.md frontmatter for version
  • Git history for detailed changes

Standards Compliance

Agent Skills Specification

  • ✅ SKILL.md with proper frontmatter
  • ✅ Correct directory structure
  • ✅ Optional directories (references, indexes)
  • ✅ Standards-compliant format

skills.sh

  • ✅ GitHub repository structure
  • ✅ Installable via npx skills add
  • ✅ Proper metadata.json
  • ✅ README.md with installation

Cursor Skills

  • ✅ Compatible with .cursor/skills/
  • ✅ Works with skill discovery
  • ✅ Supports Cursor features
  • ✅ References Cursor docs

See Also

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.