Getting Started
Requirements
Section titled “Requirements”- Node.js 20+
- A CLAUDE.md file (or any markdown instruction file)
Install
Section titled “Install”npm install -g @mcptoolshop/claude-rulesOr run directly with npx:
npx @mcptoolshop/claude-rules analyzeAnalyze your CLAUDE.md
Section titled “Analyze your CLAUDE.md”The analyze command scores each section and proposes extractions:
claude-rules analyzeYou’ll see output like:
File: .claude/CLAUDE.md (258 lines, ~2388 tokens)
Keep inline (core): 4 sections✓ (preamble) 2 lines✓ Role 9 lines✓ Guardian Self-Check 4 lines✓ Document Delight 8 lines
Proposed extractions: 8 sections 1. "GitHub Actions Rules" (L92-149, 58 lines, ~330 tokens) → .claude/rules/github-actions.md keywords: [github, actions, workflow, runner]
Budget estimate: Always loaded: ~208 tokens (23 lines) On-demand: ~2180 tokens (225 lines) Savings: 91% per sessionSplit interactively
Section titled “Split interactively”When you’re ready to extract, run split:
claude-rules splitFor each proposed section, you’ll see a preview and can approve or skip. Approved sections get extracted to .claude/rules/ with frontmatter metadata.
To preview without writing anything:
claude-rules split --dry-runValidate and monitor
Section titled “Validate and monitor”After splitting, use validate to check health and stats to see your budget:
claude-rules validateclaude-rules statsNext steps
Section titled “Next steps”Read How It Works to understand the three-layer architecture and routing system.