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/thelobbi/claude/contextgit clone --depth 1 https://github.com/TheLobbi/claudeWhat 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.00000 | $0.01792 |
| Opus 5 | $0.00000 | $0.00896 |
| Sonnet 5 | $0.00000 | $0.00358 |
| Haiku 4.5 | $0.00000 | $0.00179 |
Grade A, and why
context 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 — 301 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Optimization Command
Manage and optimize context window usage for maximum efficiency.
Usage
/context <action> [options]
Actions
status- Show current context usage breakdownoptimize- Run optimization strategiescheckpoint- Save context checkpointrestore- Restore from checkpointanalyze- Deep analysis of context usagebudget- Configure token budget allocation
Options
| Option | Description | Default |
|---|---|---|
--strategy <s> |
Optimization strategy | balanced |
--threshold <n> |
Warning threshold % | 75 |
--name <name> |
Checkpoint name | Auto-generated |
--force |
Force optimization even below threshold | false |
--dry-run |
Preview optimization without applying | false |
--verbose |
Show detailed breakdown | false |
Examples
View Context Status
# Show current usage
/context status
# Detailed breakdown
/context status --verbose
Optimize Context
# Run balanced optimization
/context optimize
# Aggressive optimization
/context optimize --strategy aggressive
# Preview without applying
/context optimize --dry-run
Checkpointing
# Save checkpoint
/context checkpoint --name "before-refactor"
# List checkpoints
/context checkpoint --list
# Restore checkpoint
/context restore --name "before-refactor"
Budget Configuration
# Set overall budget
/context budget --total 100000
# Set section budgets
/context budget --system 5000 --conversation 60000 --tools 35000
# Set warning threshold
/context budget --threshold 80
Status Output
Context Window Status
══════════════════════════════════════════════════════════════
Total Budget: 100,000 tokens
Current Usage: 67,432 tokens (67.4%)
Available: 32,568 tokens
Breakdown by Section:
├── System Instructions 5,000 tokens (5.0%) ████░░░░░░
├── Conversation History 42,000 tokens (42.0%) ████████░░
│ ├── Recent (keep) 28,000 tokens
│ └── Old (compressible) 14,000 tokens
├── Tool Results 18,432 tokens (18.4%) ████░░░░░░
│ ├── Active 12,000 tokens
│ └── Cached 6,432 tokens
└── Metadata 2,000 tokens (2.0%) █░░░░░░░░░
Status: ✅ HEALTHY (below 75% threshold)
Recommendations:
• 14,000 tokens in old conversation could be summarized
• 6,432 tokens in tool cache could be evicted
• Potential savings: ~18,000 tokens (18%)
══════════════════════════════════════════════════════════════
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 · 301 lines · 0 tokens per session scan A c7f71ab5eb89
context is a command published in the GitHub repository TheLobbi/claude (21 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,792 tokens. 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
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
constitution
Create or update the project constitution from interactive or provided principle inputs.