Help us improve
Share bugs, ideas, or general feedback.
From claudemd
Use when CLAUDE.md files are too large, have duplicated content between root and modules, or the context budget per working directory exceeds limits
npx claudepluginhub jugrajsingh/skillgarden --plugin claudemdHow this skill is triggered — by the user, by Claude, or both
Slash command
/claudemd:optimizingThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Reduce context cost across ALL files while preserving signal. Operates on the full hierarchy: root, module-level, and .claude/rules/.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Designs test strategies and plans with testing pyramid. Covers APIs, frontend, data pipelines, infrastructure; outputs plans including coverage targets, examples, and gaps.
Share bugs, ideas, or general feedback.
Reduce context cost across ALL files while preserving signal. Operates on the full hierarchy: root, module-level, and .claude/rules/.
find . -name 'CLAUDE.md' -not -path '*/node_modules/*' -not -path '*/venv/*' 2>/dev/null | while read f; do echo "$(wc -l < "$f") $f"; done
wc -l .claude/rules/*.md 2>/dev/null
Read all files. Compute per-directory context load (root + all modules loaded for that working directory). If worst-case <100 lines and no anti-patterns: "Hierarchy is already lean. No optimization needed."
Apply the 7 categories from references/optimizations.md:
Full descriptions, before/after examples, and code blocks for each category are in references/optimizations.md.
Show the current worst-case load, target load, and per-file change summary. Use the plan template from references/report-templates.md.
Ask user to confirm before applying: "Apply all", "Cherry-pick", or "Preview only".
For each approved optimization:
Show before/after line counts per file and updated context load map. Use the report template from references/report-templates.md.
| File Level | Ideal | Max |
|---|---|---|
| Root CLAUDE.md | 50-80 | 150 |
| Module CLAUDE.md | 30-50 | 80 |
| Sub-module CLAUDE.md | 15-30 | 50 |
| .claude/rules/ file | 15-30 | 50 |
| Max loaded at once | 100-150 | 250 |