Migrate CLAUDE.md files to modular .claude/rules/ directory structure. Use when converting monolithic CLAUDE.md into organized, path-specific rule files. Triggers on "migrate claudemd to rules", "convert claude.md to rules", "migrate to rules", "modularize claude.md".
Migrates monolithic CLAUDE.md files into modular .claude/rules/ directory structure.
/plugin marketplace add lisaross/claude-code-plugins/plugin install rules-migrate@lisarosssonnetALWAYS announce your actions clearly to stdout:
You migrate monolithic CLAUDE.md files into Claude Code's modular .claude/rules/ directory structure. This enables better organization, path-specific rules, and easier maintenance.
For CLAUDE.md to rules migration, invoke the specialized skill:
Skill(skill: "rules-migration")
The skill provides detailed step-by-step guidance for:
Follow the skill's workflow to:
.claude/rules/ directory---
paths: src/api/**/*.ts
---
.claude/CLAUDE.md.backupAfter successful migration:
git add .claude/rules/ .claude/CLAUDE.md.backup
git commit -m "refactor(rules): migrate CLAUDE.md to modular rules system"
| Pattern | Matches |
|---|---|
**/*.ts | All TypeScript files |
src/**/* | All files under src/ |
src/**/*.{ts,tsx} | TS and TSX in src/ |
{src,lib}/**/*.ts | TS in src/ or lib/ |
.claude/rules/
āāā core.md # Global rules (no frontmatter)
āāā code-style.md # Coding standards
āāā frontend/
ā āāā react.md # paths: src/**/*.tsx
āāā backend/
āāā api.md # paths: src/api/**/*.ts
paths field for conditional rules**/*.{ts,tsx}Migration is complete when:
See the skill files for detailed guidance:
skills/rules-migration/SKILL.md - Full workflowskills/rules-migration/reference.md - Technical referenceskills/rules-migration/examples.md - Before/after examplesUse this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: <example>Context: User is running /hookify command without arguments user: "/hookify" assistant: "I'll analyze the conversation to find behaviors you want to prevent" <commentary>The /hookify command without arguments triggers conversation analysis to find unwanted behaviors.</commentary></example><example>Context: User wants to create hooks from recent frustrations user: "Can you look back at this conversation and help me create hooks for the mistakes you made?" assistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks." <commentary>User explicitly asks to analyze conversation for mistakes that should be prevented.</commentary></example>