Track and optimize context usage with intelligent recommendations
Track your Claude Code usage and get intelligent recommendations for cost optimization. Use it when you want to monitor session/weekly limits and receive suggestions like switching to Haiku for research tasks.
/plugin marketplace add Shakes-tzd/contextune/plugin install contextune@ContextuneTrack your Claude Code usage and get intelligent recommendations for cost optimization.
# 1. Run Claude Code's built-in command:
/usage
# 2. Then run this command to log it:
/ctx:usage
Claude will ask you to paste the /usage output, then provide:
Contextune automatically estimates your token usage based on:
📊 Context Usage Analysis
Current Status:
Session: 7% (resets 12:59am)
Weekly: 89% (resets Oct 29, 9:59pm)
Opus: 0% available
⚠️ Warnings:
• 89% weekly usage - approaching limit
• Reset in: [time remaining]
💡 Recommendations:
• Switch research tasks to Haiku (87% cost savings)
• Max parallel tasks: 2 (based on remaining context)
• ✨ Opus available (0% used) - great for complex architecture
• Defer non-critical tasks until weekly reset
📈 Estimated Savings:
• Using Haiku for next 5 tasks: ~$0.45 saved
• Waiting until reset: +11% weekly capacity
Automatically uses Haiku when weekly usage > 80%
Limits parallel tasks based on available context
Defers execution if approaching session limits
If you want to manually log usage data:
/ctx:usage --update
Then paste your /usage output when prompted.
View historical trends:
marimo edit notebooks/contextune_metrics_dashboard.py
The dashboard shows: