agentleFS
HKTITANHKTITAN/cursor-best-practices/.cursor/rules/content-patterns.md

cursor-best-practices / rules

Cursor rule5 starsChanged 10 months agoMITView on GitHub

Content patterns and conventions for cursor-best-practices skill. Writing rules, creating commands, organizing content, following patterns, maintaining consistency, content structure, examples format, linking strategy, enhancement patterns.

The file

We split this content-patterns.md into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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:

    All rules enhanced with:

    line 81
  2. Distinctive:

    User-focused: - Write for users, not systems

    line 213
  3. Distinctive:

    Use code blocks with language specified

    line 217
  4. Distinctive:

    Keep examples focused and relevant

    line 220

≈ “Common” is an estimate: at least 1 in 5 of the 7,324 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
content-patterns.md

Content Patterns and Conventions

Content patterns and conventions used throughout the cursor-best-practices skill.

Rule File Patterns

Frontmatter Pattern

---
description: "Keyword-rich description with multiple phrasings, synonyms, common queries. Include how-to, what-is, when-to patterns. Example: 'Agent Mode: autonomous exploration, multi-file edits, tool usage. Use for complex features, refactoring, bug fixes. When to use Agent Mode: complex coding tasks, multi-file features. How to use Agent Mode: enable in chat, provide specific requests.'"
tags: [base-tag, related-tag, how-to-use-X, what-is-X, when-to-use-X, query-variation, synonym]
globs: ["**/*.ts", "**/*.tsx"]  # Optional, for file-specific rules
alwaysApply: false  # Optional, default false
---

Key Points:

  • Description: Multiple phrasings, synonyms, common queries
  • Tags: Base tags + query variations + synonyms
  • Globs: Only for file-specific rules
  • alwaysApply: Use sparingly

Body Structure Pattern

# Rule Title

Brief introduction explaining the practice and its importance.

## Do: [Pattern Name]

Explanation of the correct approach.

**Why:** Benefits and rationale.

**When to use:**
- Specific scenario 1
- Specific scenario 2

**Example:**
```code
// Correct code example

Don't: [Anti-pattern Name]

Explanation of what to avoid.

Why: Problems with this approach.

Example:

// Incorrect code example

Related Queries

Users might ask:

  • "How to [action]?"
  • "When to [use pattern]?"
  • "What is [concept]?"
  • "[Feature] vs [other feature]"
  • "How to set up [feature]?"

See Also


### Enhancement Pattern

All rules enhanced with:
1. **Keyword-rich description** - Multiple phrasings, synonyms
2. **Enhanced tags** - Query variations, synonyms
3. **Related Queries** - Common user questions
4. **See Also** - Links to related content

## Command File Patterns

### Structure Pattern

```markdown
# Command Name

Brief description of what the command does.

## Overview

When the user runs `/command-name`, [what happens].

## Step-by-Step Process

### 1. [Step Name]

**Action**: [What to do]

**Check**: [What to verify]

### 2. [Step Name]

[Continue pattern...]

## Output Format

- **Category 1**: Description
- **Category 2**: Description

## Usage Examples

/command-name @file.ts /command-name parameter


## Apply Project Rules

When executing, apply any existing project rules or conventions.

## See Also

- [Related command](commands/other-command.md)
- [Cursor docs](https://cursor.com/docs/...)

Reference File Patterns

Structure Pattern

# Reference Title

Comprehensive guide to [topic].

## Overview

High-level explanation of the topic.

## Key Concepts

### Concept 1

Detailed explanation with examples.

### Concept 2

[Continue pattern...]

## Patterns

### Pattern Name

Description and examples.

## Best Practices

- Practice 1
- Practice 2

## Examples

### Example 1

[Detailed example]

## See Also

- [Related rule](rules/path/to/rule.md)
- [Cursor docs](https://cursor.com/docs/...)

Index File Patterns

Structure Pattern

# Index Title

Navigation index for [purpose].

## Category 1

- **[Rule Name](path/to/rule.md)** - Brief description
- **[Rule Name](path/to/rule.md)** - Brief description

## Category 2

[Continue pattern...]

## Quick Reference

| Query | Rule |
|------|------|
| "How to X?" | [rule](path/to/rule.md) |
| "When to Y?" | [rule](path/to/rule.md) |

Content Guidelines

Writing Style

  • Clear and concise - Get to the point
  • Actionable - Provide specific guidance
  • Examples - Include code examples
  • User-focused - Write for users, not systems

Examples Format

  • Use code blocks with language specified
  • Show both correct and incorrect examples
  • Include context when helpful
  • Keep examples focused and relevant

Linking Strategy

  • Link to related rules in "See Also"
  • Link to Cursor docs for official information
  • Link to references for deep dives
  • Avoid broken links

Consistency

  • Follow established patterns
  • Use consistent terminology
  • Maintain consistent structure
  • Keep formatting consistent

Enhancement Guidelines

Description Enhancement

Include:

  • Multiple phrasings of the same concept
  • Common user questions/queries
  • Synonyms and alternative terminology
  • Both technical and non-technical terms
  • Natural language variations
  • "How to", "What is", "When to" patterns

Tag Enhancement

Include:

  • Base tags (existing)
  • Query variations (how-to-use-X, what-is-X, when-to-use-X)
  • Alternative terminology
  • Related concepts
  • Common misspellings/alternatives

Related Queries

Include:

  • "How to [action]?"
  • "When to [use pattern]?"
  • "What is [concept]?"
  • "[Feature] vs [other feature]"
  • "How to set up [feature]?"
  • "[Feature] not working"
  • "How to enable [feature]?"

Quality Checklist

Before committing content:

  • Follows established patterns
  • Has keyword-rich description
  • Includes Related Queries
  • Has See Also links
  • Examples are clear and relevant
  • Links are valid
  • Formatting is consistent
  • Under 500 lines (for rules)
  • Added to indexes if needed

See Also

  • Rule Template
  • Skill Maintenance
  • Codebase Structure
  • Architecture and Design

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.