MIGRATE CLAUDE.md into modular `.claude/rules/` directory structure following Claude Code's rules system. Converts monolithic CLAUDE.md into organized, path-specific rule files with glob patterns. Use when migrating to rules system, modularizing project instructions, splitting CLAUDE.md, organizing memory files. Triggers on "migrate claudemd to rules", "convert claude.md to rules", "modularize claude.md", "split claude.md into rules", "migrate to rules system".
Converts monolithic CLAUDE.md into Claude Code's modular `.claude/rules/` directory structure with path-specific glob patterns. Use when migrating to the rules system, organizing project instructions, or splitting large CLAUDE.md files.
/plugin marketplace add lisaross/claude-code-plugins/plugin install rules-migrate@lisarossThis skill inherits all available tools. When active, it can use any tool Claude has access to.
examples.mdreference.mdConverts a monolithic CLAUDE.md file into Claude Code's modular .claude/rules/ directory structure. This enables better organization, path-specific rules, and progressive disclosure of project instructions.
Users invoke this skill by saying:
Use this skill when:
.claude/rules/ systemActions:
What to expect:
Common Sections to Look For:
Actions:
Decision Points:
Standard Directory Pattern:
.claude/rules/
├── core.md # Core execution rules (orchestration, agents)
├── code-style.md # Language-agnostic code conventions
├── testing.md # Testing requirements
├── security.md # Security protocols
├── git.md # Git and commit standards
├── stack.md # Tech stack defaults
├── frontend/
│ ├── react.md # React conventions (path: src/**/*.tsx)
│ └── styles.md # CSS/styling rules (path: **/*.css, **/*.scss)
└── backend/
├── api.md # API guidelines (path: src/api/**/*.ts)
└── database.md # Database rules (path: src/db/**/*.ts)
Actions:
.claude/rules/ directoryYAML Frontmatter Format:
---
paths: src/api/**/*.ts
---
Glob Pattern Examples:
**/*.ts - All TypeScript filessrc/api/**/* - Everything under src/api/{src,lib}/**/*.tsx - TSX files in src or lib*.md - Markdown files in root onlyContent Organization Tips:
Non-Negotiable Rules:
core.md for critical execution rulesLarge Sections:
frontend/components.md, frontend/hooks.md, frontend/state.mdCross-Cutting Concerns:
security.mdfrontend/security.md and backend/security.md with specific rulesEnvironment-Specific Rules:
development.md and production.md if neededActions:
Validation Checklist:
# Check rules are loaded
ls -la .claude/rules/
# Verify frontmatter syntax (no errors when Claude loads)
# Claude Code will validate on next invocation
# Compare content (line counts should be similar)
wc -l .claude/CLAUDE.md
find .claude/rules/ -name "*.md" -exec wc -l {} + | tail -1
Actions:
.claude/CLAUDE.md.backupCommit Message Format:
refactor(rules): migrate CLAUDE.md to modular rules system
- Split monolithic CLAUDE.md into organized rule files
- Created .claude/rules/ with core, frontend, backend structure
- Added path-specific rules using glob patterns
- Preserved all original content
BREAKING: CLAUDE.md moved to .claude/rules/ directory
Before (CLAUDE.md):
# Claude Code Configuration
## Code Quality Checks
Before marking ANY task complete:
1. Run getDiagnostics on all modified files
2. Fix ALL linting/type errors
## React Guidelines
Use functional components with hooks.
Props should be typed with interfaces.
## API Development
All endpoints must have error handling.
Use Zod for request validation.
After (.claude/rules/):
.claude/rules/
├── core.md
│ ## Code Quality Checks
│ Before marking ANY task complete:
│ 1. Run getDiagnostics on all modified files
│ 2. Fix ALL linting/type errors
│
├── frontend/
│ └── react.md
│ ---
│ paths: src/**/*.tsx
│ ---
│ # React Guidelines
│ Use functional components with hooks.
│ Props should be typed with interfaces.
│
└── backend/
└── api.md
---
paths: src/api/**/*.ts
---
# API Development
All endpoints must have error handling.
Use Zod for request validation.
This skill is successful when:
Before marking complete, verify:
.claude/rules/ directory exists.md extensionSee reference.md for:
See examples.md for:
Works with:
.claude/rules/*.md)Related Skills:
context-management - for managing project contextdocumentation-suite - for documenting the rules structurerules-migration | Created: 2025-12-10 | Updated: 2025-12-10
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.