aggregate-logs
Generate LEARNINGS.md from skill execution logs over a configurable time window.
Analyze and optimize context window usage using MECW principles
> /plugin marketplace add athola/claude-night-marketHow it fires
How this command gets triggered: by you, by Claude, or both.
/optimize-contextContext preview
What this command does when you run it.
Analyze and optimize context window usage using MECW principles
name: optimize-context description: Analyze and optimize context window usage using MECW principles usage: /optimize-context [path]
Analyzes context window usage and provides optimization recommendations based on Maximum Effective Context Window (MECW) principles.
# Analyze current session context /optimize-context # Analyze specific skill or directory /optimize-context skills/my-skill # Deep analysis with recommendations /optimize-context --detailed
1. **Context Pressure Assessment**: Evaluates current context utilization 2. **MECW Compliance Check**: Validates against MECW principles 3. **Optimization Recommendations**: Suggests specific improvements 4. **Token Budget Analysis**: Breaks down token usage by component
| Utilization | Status | Action | |-------------|--------|--------| | < 30% | Optimal | No action needed | | 30-50% | Good | Monitor growth | | 50-70% | Warning | Consider optimization | | > 70% | Critical | Immediate action required |
/optimize-context # Output: # Context Optimization Report # ========================== # Current Usage: 45% (Good) # Estimated Tokens: 12,500 # # Recommendations: # - Consider extracting code examples to scripts/ # - 3 skills exceed recommended token budget /optimize-context skills/context-optimization --detailed # Full breakdown with per-module analysis
For reading context in headless/automated Claude Code sessions:
# Get context breakdown with JSON output claude -p "run /context" --verbose --output-format json # Two-call pattern for reliable execution # (Claude doesn't always execute /context on first prompt) SESSION_ID=$(claude -p "ready" --output-format json | jq -r '.session_id') claude --continue "$SESSION_ID" -p "/context" --verbose --output-format json
**Key flags:**
**Example JSON output:**
{
"context": {
"total_tokens": 45000,
"usage_percent": 22.5,
"breakdown": {
"system": 8000,
"conversation": 32000,
"tools": 5000
}
}
}Works with conservation plugin skills:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/growth_analyzer.py "${1:-.}"A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Generate LEARNINGS.md from skill execution logs over a configurable time window.
Analyze skill file complexity metrics and generate modularization recommendations for splitting or progressive loading.
Scaffold new Claude Code skills with brainstorming, TDD methodology, and proper frontmatter and module structure.