
Creating Claude Rules
- 42 installs
- 784 repo stars
- Updated August 4, 2026
- agentworkforce/relay
creating-claude-rules is a Claude Code skill that guides authoring and fixing .claude/rules/ files with correct paths frontmatter and glob patterns.
About
creating-claude-rules is a Claude Code skill for authoring and fixing files in .claude/rules/. It explains the correct paths frontmatter, glob patterns, and how to avoid Cursor-specific fields like globs and alwaysApply. A developer uses it when creating project rules, fixing wrong frontmatter, or migrating Cursor rules to Claude format.
- Correct frontmatter for .claude/rules/ files (paths, not globs)
- Glob-pattern reference and directory structure conventions
- Migration guidance from Cursor rule format to Claude format
Creating Claude Rules by the numbers
- 42 all-time installs (skills.sh)
- Ranked #350 of 782 Skill Development skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
creating-claude-rules capabilities & compatibility
- Capabilities
- rules authoring · config migration
- Use cases
- documentation
What creating-claude-rules says it does
Rules in `.claude/rules/` are modular instructions scoped to specific files via glob patterns.
npx skills add https://github.com/agentworkforce/relay --skill creating-claude-rulesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 42 |
|---|---|
| repo stars | ★ 784 |
| Last updated | August 4, 2026 |
| Repository | agentworkforce/relay ↗ |
What it does
Author or fix .claude/rules/ files with correct paths frontmatter and glob patterns.
Who is it for?
Writing project-scoped Claude rules or migrating Cursor rule files.
Skip if: Authoring agents, skills, or slash commands.
When should I use this skill?
When creating or fixing .claude/rules/ files or migrating Cursor rules.
What you get
Rules use the correct paths frontmatter and quoted glob patterns and load like CLAUDE.md.
- Valid .claude/rules/ file
- Migrated Cursor rules
By the numbers
- field comparison table mapping 3 Claude fields to Cursor equivalents
- 6 glob pattern examples
Files
Creating Claude Rules
Overview
Rules in .claude/rules/ are modular instructions scoped to specific files via glob patterns. They load automatically with same priority as CLAUDE.md.
When to Use
- Creating new rules in
.claude/rules/ - Fixing rules that use wrong frontmatter (
globsinstead ofpaths) - Migrating Cursor rules to Claude format
- Organizing project-specific conventions
Quick Reference
| Field | Claude | Cursor |
|---|---|---|
| Path patterns | paths | globs |
| Always apply | Omit paths | alwaysApply: true |
| Description | Not documented | description |
Frontmatter
Path-Scoped Rules
---
paths:
- 'src/api/**/*.ts'
- 'tests/**/*.test.ts'
---Or single pattern:
---
paths: src/**/*.{ts,tsx}
---Global Rules
Omit frontmatter entirely - applies to all files:
# TypeScript Conventions
Use .js extensions in imports.Common Mistakes
# ❌ WRONG - globs is Cursor format
---
globs:
- '**/*.ts'
---
# ✅ CORRECT - Claude uses paths
---
paths:
- '**/*.ts'
---# ❌ WRONG - alwaysApply is Cursor-only
---
alwaysApply: true
---
# ✅ CORRECT - just omit paths for global rules
# (no frontmatter needed)# ❌ WRONG - unquoted patterns
---
paths:
- **/*.ts
---
# ✅ CORRECT - quote glob patterns
---
paths:
- "**/*.ts"
---Directory Structure
.claude/rules/
├── testing.md # Path-scoped or global
├── typescript.md
└── frontend/ # Subdirectories supported
└── react.mdFiles discovered recursively. Use subdirectories to organize.
Glob Patterns
| Pattern | Matches |
|---|---|
**/*.ts | All .ts files anywhere |
src/**/* | Everything under src/ |
*.md | Markdown in root only |
**/*.{ts,tsx} | .ts and .tsx files |
{src,lib}/**/*.ts | .ts in src/ or lib/ |
Reference
https://code.claude.com/docs/en/memory#modular-rules-with-claude/rules/
Related skills
FAQ
What frontmatter key scopes a rule to files?
paths, with quoted glob patterns; Cursor's globs and alwaysApply are not used in Claude format.
How do you make a rule global?
Omit the paths frontmatter entirely so the rule applies to all files.