Show context budget visibility and usage analysis
Analyzes context budget usage and provides optimization recommendations to prevent context cliff.
/plugin marketplace add cyberbloke9/pmp-gywd/plugin install pmp-gywd@pmp-gywdgywd/Shows:
Analyze context sources:
Planning Files:
Estimate token usage:
Calculate budget breakdown:
Claude Code context window: ~200,000 tokens
Breakdown:
- System prompts & tools: ~15,000 tokens (reserved)
- Conversation history: Variable
- Available for project: ~185,000 tokens
Generate visual output:
## Context Budget Analysis
**Estimated Usage:**
[████████░░░░░░░░░░░░] 42% (~78,000 / 185,000 tokens)
**Breakdown:**
| Source | Lines | Est. Tokens | % |
|--------|-------|-------------|---|
| PROJECT.md | 45 | 540 | 0.3% |
| ROADMAP.md | 120 | 1,440 | 0.8% |
| STATE.md | 80 | 960 | 0.5% |
| Phase Plans | 450 | 5,400 | 2.9% |
| Codebase Maps | 2,100 | 21,000 | 11.4% |
| Code Files (est.) | 4,000 | 48,000 | 26.0% |
**Status:** ✅ Healthy
**Recommendations:**
- None needed at current usage
Show warnings if needed:
If high usage, suggest actions:
<output_format> Clean, visual output with:
Keep output concise - this is a quick check, not a report. </output_format>
<success_criteria>
/contextLoad living docs context for a topic into the current conversation. Use before implementation to get relevant specs, ADRs, and architecture docs. Keywords - context, load context, get context, living docs context, inject context.
/contextGet full project context including tasks, learnings, and decisions. Use at session start or when needing complete project state.