Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/shakestzd/contextune/contextune-usagegit clone --depth 1 https://github.com/shakestzd/contextuneWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00014 | $0.01588 |
| Opus 5 | $0.00007 | $0.00794 |
| Sonnet 5 | $0.00003 | $0.00318 |
| Haiku 4.5 | $0.00001 | $0.00159 |
Grade A, and why
contextune:usage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Usage Tracking & Optimization
Contextune integrates with Claude Code's /usage command to provide intelligent context optimization, cost savings, and proactive warnings.
Quick Start
Option 1: Manual Paste (Most Accurate - Recommended)
-
Run Claude Code's usage command:
/usage -
Copy the entire output
-
Run this command and paste when prompted:
/contextune:usage
Option 2: Automatic Estimation
Contextune automatically estimates usage based on tracked operations (~85% accurate for Contextune tasks only).
View current estimates:
/contextune:stats
What You Get
Intelligent Recommendations
Based on your current usage, Contextune provides:
- Model Selection: Auto-switch to Haiku when approaching limits (87% cost savings)
- Parallel Task Limits: Recommended max concurrent tasks based on remaining quota
- Proactive Warnings: Alerts when approaching session or weekly limits
- Opus Opportunities: Suggestions to use Opus when quota is available for complex tasks
Example Output
📊 Current Usage Analysis
═══════════════════════════════════════
📈 Usage Metrics:
Session: 19% (resets 1:00am America/New_York)
Weekly: 90% (resets Oct 29, 10:00pm America/New_York) ⚠️ CRITICAL
Opus: 0%
🎯 Status: CRITICAL
⚠️ Warnings:
• CRITICAL: 90% weekly usage (resets Oct 29, 10:00pm)
• You have ~10% capacity until Oct 29, 10:00pm
💡 Recommendations:
• Switch research tasks to Haiku (87% cost savings)
• Recommended max parallel tasks: 2
• Consider deferring non-critical tasks until weekly reset
• ✨ Opus available (0% used) - great for complex architecture tasks
📊 Historical Trends:
• Average daily usage: 12.9% (7-day trend)
• Projected usage to limit: [calculation]
• Cost savings from Haiku: $0.42 this week
Usage Thresholds
| Weekly Usage | Status | Automatic Actions |
|---|---|---|
| 0-70% | ✅ Healthy | Normal operation, all models available |
| 71-85% | ⚠️ Warning | Suggest Haiku for research tasks |
| 86-95% | 🚨 Critical | Auto-switch to Haiku, limit parallel tasks |
| 96-100% | 🛑 Limit | Defer all tasks until reset |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 240 lines · 14 tokens per session scan A 981c8659e7a7
contextune:usage is a command published in the GitHub repository shakestzd/contextune (5 stars, last pushed 8mo ago), licensed MIT. It adds 14 tokens to every session and 1,588 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
opsx-bulk-apply
Apply multiple OpenSpec changes concurrently in isolated worktrees.
opsx-propose
Propose a new change - create it and generate all artifacts in one step.
opsx-apply
Implement tasks from an OpenSpec change (Experimental).
opsx-sync
Sync delta specs from a change to main specs.
opsx-archive
Archive a completed change in the experimental workflow.
opsx-verify
Verify implementation matches change artifacts before archiving.