Agent skill · writing content · aiskillstore

creating-claude-rules

Use when creating or fixing .claude/rules/ files - provides correct paths frontmatter (not globs), glob patterns, and avoids Cursor-specific fields like alwaysApply

Why this skill is useful

Provides specific guidance on creating and fixing Claude rules, including correct paths and glob patterns that the AI wouldn't reliably generate on its own.

What it needs

About 1k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

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 Field Claude Cursor ------------- -------------- ------------------- Path patterns paths globs Always apply Omit paths alwaysApply: true Description Not documented description Frontmatter Path-Scoped Rules Or single pattern: Global Rules Omit frontmatter entirely - applies to all files: Common Mistakes Directory Structure Files 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/

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/creating-claude-rules

View the source on GitHub

Browse the @skills marketplace