claudemd-refactor

Refactor root CLAUDE.md into directory-scoped files and update cross-references.

11|1|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/Takazudo/claude-resources --skill claudemd-refactor
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: claudemd-refactor
Source: https://github.com/Takazudo/claude-resources/tree/main/skills/claudemd-refactor
Command: npx skills add https://github.com/Takazudo/claude-resources --skill claudemd-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill requires pypdf, pdfplumber, pdf2image, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Refactor CLAUDE.md content to improve context delivery by splitting a monolithic root CLAUDE.md into directory-scoped files and related references, enabling more predictable context loading.

Core Features & Use Cases

  • Analyze and enumerate all CLAUDE.md files across the repository.
  • Propose a directory-scoped structure (root + subdirectory CLAUDE.md) to reduce size and improve maintainability.
  • Provide a migration plan detailing which content moves where, how references are updated, and how to handle anti-patterns.
  • Use cases include large repos with a single massive CLAUDE.md or teams requiring modular CLAUDE.md for collaboration.

Quick Start

Refactor CLAUDE.md by generating directory-scoped CLAUDE.md files and updating references as outlined in the migration plan.

Frequently Asked Questions about claudemd-refactor

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

FAQPage Schema
How do I refactor a large CLAUDE.md file into directory-scoped files?โ–ผ

To refactor a large CLAUDE.md file, this Skill analyzes your repository structure, proposes a migration plan, and generates directory-scoped CLAUDE.md files while updating cross-references to optimize context loading.

When do I need to modularize CLAUDE.md for subdirectories?โ–ผ

You need to modularize CLAUDE.md when your root file becomes too large for predictable context delivery, typically in large repositories where a monolithic file hinders maintainability and team collaboration.

What is the best way to organize CLAUDE.md content across a large repository?โ–ผ

The best way to organize CLAUDE.md content is splitting the root file into directory-scoped files, allowing subdirectories to load relevant context, which this Skill achieves by enumerating existing files and proposing a modular structure.

Can I update cross-references automatically when splitting CLAUDE.md?โ–ผ

Yes, you can update cross-references automatically when splitting CLAUDE.md, as the Skill generates directory-scoped files and updates references according to the proposed migration plan to maintain context integrity.

Does this approach handle anti-patterns found in existing CLAUDE.md files?โ–ผ

Yes, this approach handles anti-patterns by detailing how to resolve them within the generated migration plan, ensuring the refactored directory-scoped CLAUDE.md files follow proper context-loading patterns.