From Dev10x
Audits Claude Code context window utilization across CLAUDE.md files, rules, agent specs, references, and memories. Reports budget compliance, flags oversized files, suggests pruning actions.
npx claudepluginhub dev10x-guru/dev10x-claude --plugin Dev10xThis skill is limited to using the following tools:
Every file loaded into Claude's context window consumes capacity.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Every file loaded into Claude's context window consumes capacity. This skill audits all context sources against documented budgets, identifies bloat, and suggests specific pruning actions.
Complements Dev10x:memory-maintenance (which audits memory
content quality) by covering the structural layer: file sizes,
budget compliance, and cross-file redundancy.
REQUIRED: Create tasks before ANY work. Execute at startup:
TaskCreate(subject="Scan context sources", activeForm="Scanning")TaskCreate(subject="Check budget compliance", activeForm="Checking budgets")TaskCreate(subject="Detect redundancy", activeForm="Detecting redundancy")TaskCreate(subject="Present findings and suggestions", activeForm="Presenting")Set sequential dependencies.
Discover all files that contribute to the context window. Scan both the plugin directory and user-space locations.
| Category | Location | Budget |
|---|---|---|
| CLAUDE.md (project) | <repo>/CLAUDE.md | 100 lines |
| Rules | <repo>/.claude/rules/*.md | 200 lines each |
| Agent specs (internal) | <repo>/.claude/agents/*.md | 50 lines each |
| Agent specs (plugin) | <repo>/agents/*.md | 200 lines each |
| References | <repo>/references/*.md | 200 lines each |
| Category | Location | Budget |
|---|---|---|
| CLAUDE.md (global) | ~/.claude/CLAUDE.md | No strict budget |
| SKILLS.md | ~/.claude/SKILLS.md | 45 lines |
| MEMORY.md (global) | ~/.claude/memory/MEMORY.md | 200 lines |
| Dev10x global config | ~/.claude/memory/Dev10x/** | No per-file budget |
For each discovered file, record:
wc -l)Compare each file against its budget. Classify:
| Usage | Status | Action |
|---|---|---|
| ≤ 60% | OK | No action needed |
| 61-79% | WATCH | Monitor — approaching limit |
| 80-99% | WARNING | Plan a split (per INDEX.md) |
| ≥ 100% | OVER | Must split or prune |
Calculate totals per category:
Check for documented budget overrides in INDEX.md:
Grep for "Budget Overrides" section in .claude/rules/INDEX.md
Files with documented overrides get their override budget instead of the default. Flag overridden files as INFO (not WARNING) when they exceed the default but stay within the override.
Scan for common redundancy patterns across context files:
Check for content that appears in multiple files:
Use targeted grep for common patterns:
Check for references to files or paths that no longer exist:
Identify files in .claude/rules/ that could be moved to
references/ (loaded on-demand by skills instead of every
session). Criteria:
Present a table sorted by usage (highest first):
## Context Budget Report
| File | Lines | Budget | Usage | Status |
|------|-------|--------|-------|--------|
| .claude/rules/INDEX.md | 173 | 200 | 87% | WARNING |
| references/task-orchestration.md | 367 | 200 | 184% | OVER* |
| .claude/agents/reviewer-skill.md | 48 | 50 | 96% | WARNING |
| ... | ... | ... | ... | ... |
* Has documented budget override (cohesion justification)
### Summary
- 45 files scanned, 3,200 total lines
- 2 files OVER budget (1 with override)
- 3 files at WARNING level
- Estimated context: ~12% of window at session start
List each redundancy found with:
For each OVER or WARNING file, suggest specific actions:
| Suggestion Type | Example |
|---|---|
| Split | "Split INDEX.md routing table into a separate file" |
| Move to reference | "Move X from rules/ to references/" |
| Remove duplicate | "Remove git convention from CLAUDE.md (already in rules)" |
| Consolidate | "Merge agent specs A and B (80% overlap)" |
| Prune stale | "Remove memory entry X (references deleted file)" |
REQUIRED: Call AskUserQuestion (do NOT use plain text).
Options:
For each approved fix:
Never modify files without explicit user approval from the decision gate above.