Path-Scoped Rules & Domain Context

•
88
•

Optimizes Claude Code's performance by implementing path-scoped rules that activate instructions only for specific file patterns.

This skill introduces advanced context management for Claude Code by utilizing path-scoped rules within the .claude/rules/ directory. Instead of overloading the global CLAUDE.md file, this approach allows you to define specific instructions, style guides, or architectural patterns that only trigger when Claude interacts with files matching defined glob patterns. This significantly reduces instruction noise, ensures Claude has the right context at the right time, and improves the precision of AI-generated code and summaries across diverse project modules.

Características Principales

01Glob pattern matching for granular file targeting
02Contextual instruction triggering via YAML frontmatter
03Reduction of context window noise in large repositories
04Automatic discovery of rules within the .claude/rules/ directory
05Support for domain-specific coding standards and voice directions
0688 GitHub stars

Casos de Uso

01Applying specific framework conventions only when editing relevant file types (e.g., React vs. Ruby)
02Enforcing documentation requirements for specific directories like /api or /docs
03Managing large-scale project rules without hitting context limits in every session