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.
git clone --depth 1 https://github.com/shakestzd/contextuneWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/shakestzd/contextune/ctx-usage)<a href="https://agentmods.dev/commands/shakestzd/contextune/ctx-usage"><img src="https://agentmods.dev/badge/commands/shakestzd/contextune/ctx-usage/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/shakestzd/contextune/ctx-usage"><img src="https://agentmods.dev/badge/commands/shakestzd/contextune/ctx-usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00012 | $0.00511 |
| Opus 5.5 | $0.00005 | $0.00204 |
| Sonnet 5.5 | $0.00002 | $0.00102 |
| Haiku 4.5 | $0.00001 | $0.00051 |
Grade A, and why
ctx: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 1mo ago.
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.
What it actually says
/ctx:usage - Context Usage Optimization
Track your Claude Code usage and get intelligent recommendations for cost optimization.
Usage
Quick Check (Manual Input)
# 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:
- ✅ Current usage status
- ⚠️ Warnings if approaching limits
- 💡 Recommendations (model selection, parallel tasks, timing)
- 📊 Historical trends
Automatic Tracking
Contextune automatically estimates your token usage based on:
- Prompt lengths
- Response sizes
- Haiku vs Sonnet usage
- Parallel task spawning
Example Output
📊 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
Integration with Other Commands
/ctx:research
Automatically uses Haiku when weekly usage > 80%
/ctx:plan
Limits parallel tasks based on available context
/ctx:execute
Defers execution if approaching session limits
Manual Update
If you want to manually log usage data:
/ctx:usage --update
Then paste your /usage output when prompted.
Dashboard
View historical trends:
marimo edit notebooks/contextune_metrics_dashboard.py
The dashboard shows:
- Usage trends over time
- Cost savings from optimization
- Model selection patterns
- Parallel task efficiency
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.
- 1mo ago First seen · 98 lines · 12 tokens per session scan A eac7e88fa186
ctx:usage is a command published in the GitHub repository shakestzd/contextune (5 stars, last pushed 10mo ago), licensed MIT. It adds 12 tokens to every session and 511 once invoked, about $0.0000 per session on Opus 5.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
memory-list
DEPRECATED: Use Serena listmemories instead. Lists recent memories from Forgetful with optional project filtering.
checkpoint
Save a mid-session checkpoint — for continuity between sessions of the same day.
prompts
Work with MCP prompt templates for memory operations.
comms-import
Back-fill old history from a WhatsApp "Export chat" .txt file — parsed, normalized, and reconciled into this repo's timeline by content fingerprint.
dream
Run a curator pass over the memory dir. Produces a proposal artifact for /dream-apply. Default curator: rot.
opsx-continue
Continue working on a change - create the next artifact (Experimental).