creating-claude-rules

Create or fix Claude rule frontmatter in .claude/rules using paths instead of globs.

790|60|Updated Dec 17, 2025
One-click install
npx skills add https://github.com/khaliqgant/agent-relay --skill creating-claude-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: creating-claude-rules
Source: https://github.com/khaliqgant/agent-relay/tree/main/.claude/skills/creating-claude-rules-skill/SKILL.md
Command: npx skills add https://github.com/khaliqgant/agent-relay --skill creating-claude-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps create or fix Claude rules under .claude/rules by using Claude frontmatter fields (paths) instead of globs, and by avoiding Cursor-specific fields like alwaysApply.

Core Features & Use Cases

  • Use Claude frontmatter field "paths" instead of Cursor "globs"
  • Support for global rules (omit frontmatter)
  • Structured directory usage to organize rules
  • Use Case: Convert a Cursor rule with a glob into a Claude rule with explicit paths.

Quick Start

Create a Claude rule at .claude/rules/typescript.md with proper "paths" frontmatter and no "globs".

Frequently Asked Questions about creating-claude-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Cursor rules to Claude format?

Convert Cursor rules to Claude format by replacing the "globs" field with "paths" in your rule frontmatter, removing Cursor-specific fields like "alwaysApply", and organizing rules under .claude/rules directory. Claude uses path-scoped frontmatter for automatic loading instead of glob patterns.

What's the difference between Claude paths and Cursor globs in rules?

Claude rules use "paths" frontmatter to specify file scope, while Cursor uses "globs" for pattern matching. The paths field in Claude enables direct file and directory targeting for more explicit rule application, ensuring compatibility with Claude's rule loading system.

How do I set up frontmatter for Claude rules?

Create Claude rules in .claude/rules with frontmatter containing the "paths" field to define which files the rule applies to. Omit glob patterns and Cursor-specific fields; use only Claude-compatible frontmatter fields to ensure the rule loads automatically with CLAUDE.md priority.

Can I organize multiple Claude rules in one directory?

Yes, organize Claude rules by creating separate .md files within the .claude/rules directory structure. Each file should contain proper "paths" frontmatter to scope the rule to specific files or directories, allowing you to maintain project-specific conventions in a structured format.

What happens if I use glob patterns in Claude rules?

Claude rules don't support glob patterns; they require the "paths" field for file scoping. Using globs from Cursor rules will prevent proper rule loading. Migrate globs to explicit path patterns to ensure your rules apply correctly under Claude's frontmatter requirements.