Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
agentworkforce avatar

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)
At a glance

creating-claude-rules capabilities & compatibility

Capabilities
rules authoring · config migration
Use cases
documentation
From the docs

What creating-claude-rules says it does

Rules in `.claude/rules/` are modular instructions scoped to specific files via glob patterns.
SKILL.md
npx skills add https://github.com/agentworkforce/relay --skill creating-claude-rules

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs42
repo stars784
Last updatedAugust 4, 2026
Repositoryagentworkforce/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

SKILL.mdMarkdownGitHub ↗

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 (globs instead of paths)
  • Migrating Cursor rules to Claude format
  • Organizing project-specific conventions

Quick Reference

FieldClaudeCursor
Path patternspathsglobs
Always applyOmit pathsalwaysApply: true
DescriptionNot documenteddescription

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.md

Files discovered recursively. Use subdirectories to organize.

Glob Patterns

PatternMatches
**/*.tsAll .ts files anywhere
src/**/*Everything under src/
*.mdMarkdown 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.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.