How this skill is triggered — by the user, by Claude, or both
Slash command
/code-quality:hierarchical-docsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
---
Use this skill when CLAUDE.md files become too large (>5KB) or contain detailed implementation specifics that bloat context when working on unrelated parts of the codebase.
Claude Code automatically loads CLAUDE.md files from all parent directories when reading any file. A monolithic CLAUDE.md means every file read loads the entire documentation, wasting context on irrelevant details.
Split documentation hierarchically so context is only loaded when relevant:
Plugin/
├── CLAUDE.md # Lean: architecture overview only
└── Source/Module/
├── CLAUDE.md # Module: APIs, types, patterns
└── Public/Subsystem/
└── CLAUDE.md # Subsystem: detailed examples, extension patterns
Identify natural split points:
GridForge, GridForgeGeneration)Placement/, Preview/, Jobs/)Keep only:
Target size: 3-5KB
Place in Source/<Module>/CLAUDE.md. Include:
Target size: 3-6KB per module
Place in Public/<Subsystem>/CLAUDE.md. Include:
Target size: 3-8KB per subsystem
Critical: Add this section to the root CLAUDE.md:
## Updating Documentation
This plugin uses hierarchical CLAUDE.md files. When updating documentation:
- **This root file**: Architecture overview, core class list, high-level concepts only
- **Module-specific details**: Update the CLAUDE.md in the relevant `Source/<Module>/` directory
- **Subsystem-specific details**: Update the CLAUDE.md in the relevant subdirectory
Do NOT add detailed code examples or implementation specifics to this root file.
Place them in the appropriate subdirectory CLAUDE.md so context is only loaded
when working on relevant files.
Before (45KB monolithic):
Plugin/CLAUDE.md
├── Overview
├── Architecture (detailed)
├── Handler patterns (15KB of examples)
├── Preview system (10KB of examples)
├── Generation module (20KB of examples)
└── Everything else
After (hierarchical):
Plugin/CLAUDE.md (4KB)
├── Overview, architecture diagram, class table
└── Links to sub-docs
Source/GridForge/CLAUDE.md (5KB)
├── Module APIs, types, utilities
Source/GridForge/Public/Placement/CLAUDE.md (8KB)
├── Handler patterns, extension examples
Source/GridForge/Public/Preview/CLAUDE.md (4KB)
├── ISM system, sessions, materials
Source/GridForgeGeneration/CLAUDE.md (5KB)
├── Generation architecture, thread safety
Source/GridForgeGeneration/Public/Passes/CLAUDE.md (5KB)
├── Custom pass creation examples
After restructuring:
Typical context savings: 60-80% reduction vs monolithic approach.
npx claudepluginhub rickym-h/jadefall-marketplace --plugin code-qualityRefactors large CLAUDE.md files into a hierarchical directory-scoped structure for optimized Claude Code context delivery.
Initializes or migrates repositories to nested CLAUDE.md structure for progressive disclosure and contextual Claude guidance. CLI: /init-deep with --fresh and --max-depth flags.
Provides best practices for creating, updating, and auditing CLAUDE.md files including constraints, commands, architecture overviews, and bloat reduction for projects.