claudemd-router

Restructure bloated CLAUDE.md into a lean router delegating to .claude/rules files.

4|1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/m2ai-portfolio/m2ai-skills-pack --skill claudemd-router
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claudemd-router
Source: https://github.com/m2ai-portfolio/m2ai-skills-pack/tree/main/skills/claudemd-router
Command: npx skills add https://github.com/m2ai-portfolio/m2ai-skills-pack --skill claudemd-router

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Restructure bloated CLAUDE.md into a lean router that delegates to compartmentalized .claude/rules files.

Core Features & Use Cases

  • On-demand routing: CLAUDE.md references only the relevant rule files in .claude/rules.
  • Domain isolation: each domain rule can be edited independently without touching the main document.
  • Governance: preserves project intent while keeping CLAUDE.md concise.

Quick Start

Run the router to reorganize your CLAUDE.md by extracting rules into .claude/rules and replacing the original content with pointers.

Frequently Asked Questions about claudemd-router

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I modularize a bloated CLAUDE.md file into separate rules?

A CLAUDE.md router delegates instruction loading by replacing inline rules with pointers to separate .claude/rules files. This modularization approach enables on-demand loading and domain-specific iteration without bloating the main document.

When should I split CLAUDE.md into modular rule files?

Split CLAUDE.md into modular rule files when it exceeds approximately 80 lines or when adding new instruction domains. This restructuring maintains project governance while keeping the main document lean.

What is the workflow for restructuring CLAUDE.md into a router?

Restructuring CLAUDE.md follows a four-phase workflow: audit existing content, extract rules into .claude/rules files, rewrite CLAUDE.md as a lean router, and apply local overrides for domain-specific instructions.

Can I edit individual domain rules independently after modularizing CLAUDE.md?

Yes, domain isolation allows each rule file in .claude/rules to be edited independently without touching the main CLAUDE.md document. This enables safe domain-specific iteration and governance.

Does modularizing CLAUDE.md preserve original project intent and governance?

Modularizing CLAUDE.md preserves project intent and governance by retaining all original rules in .claude/rules files. The router delegates to these compartmentalized files, ensuring no instructions are lost during restructuring.