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/Filip-Podstavec/claude-leverageWrote 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/filip-podstavec/claude-leverage/gather-context)<a href="https://agentmods.dev/commands/filip-podstavec/claude-leverage/gather-context"><img src="https://agentmods.dev/badge/commands/filip-podstavec/claude-leverage/gather-context.svg" alt="Measured on agentmods" 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.00029 | $0.00515 |
| Opus 5 | $0.00015 | $0.00258 |
| Sonnet 5 | $0.00006 | $0.00103 |
| Haiku 4.5 | $0.00003 | $0.00052 |
Grade A, and why
gather-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 8d 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
Context
Branch: !git branch --show-current
Status: !git status --short
Recent changes: !git diff --stat HEAD~1 2>/dev/null || echo "no previous commit"
Your role
You are orchestrating a context-gathering phase:
- Phase 1: a Sonnet-based subagent explores the codebase and returns a structured context package.
- Phase 2: you (the main session) use that context to implement the task.
You do NOT explore the codebase yourself. The subagent does that. Your job is to delegate with a clear task description, receive the context package, and then use it to guide your implementation.
Workflow
-
Determine task scope:
- If
$ARGUMENTScontains a task description, use it directly. - If
$ARGUMENTSis empty, ask the user what they're about to implement.
- If
-
Invoke the
context-gatherersubagent with the task description. Pass it verbatim — do not rephrase or reduce scope. -
Present the context package to the user. Keep it as-is — the subagent's structured output is already optimized for consumption.
-
Use the context for implementation:
- If the context package includes "Suggested starting points" — read those ranges to begin, and expand to other files if you judge them relevant. Treat the list as a starting set, not the closed set.
- If the subagent indicates this is greenfield (no existing code matches), proceed directly to implementation using the nearest relevant patterns listed in the package.
Hard rules
- Do not explore the codebase yourself before delegating. That defeats the purpose — the subagent handles exploration.
- Do not ask the subagent to "also write the code" — it is read-only by design.
- If the subagent returns "Task too broad", ask the user to narrow the scope. Do not attempt to gather context yourself.
- If the context package is insufficient for implementation, you may do targeted follow-up reads (specific files the subagent pointed to), but do not re-explore from scratch.
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.
- 8d ago First seen · 42 lines · 29 tokens per session scan A c200ecceac8f
gather-context is a command published in the GitHub repository Filip-Podstavec/claude-leverage (68 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 515 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-30.
Other commands, from other repositories
post
Post the current OCR review to a GitHub PR.
show
Display a past OCR review session.
history
List past OCR review sessions.
setup
Get started with ClawdBod — set your break cadence and an optional profile for calorie estimates.
new-sdk-app
Create and setup a new Claude Agent SDK application.
ship-error-handling
This file contains error handling procedures for /ship.