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/rhan1/crewline/budget-checkgit clone --depth 1 https://github.com/rhan1/crewlineWrote 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/rhan1/crewline/budget-check)<a href="https://agentmods.dev/commands/rhan1/crewline/budget-check"><img src="https://agentmods.dev/badge/commands/rhan1/crewline/budget-check.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.00016 | $0.00730 |
| Opus 5 | $0.00008 | $0.00365 |
| Sonnet 5 | $0.00003 | $0.00146 |
| Haiku 4.5 | $0.00002 | $0.00073 |
Grade A, and why
budget-check 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Before executing a planned task list, estimate whether it will fit in the remaining 5h window. Report fits/tight/won't-fit with concrete options.
Task
$ARGUMENTS
Procedure
1. Read current session state
Read ~/.claude/.session-state.json — the statusline writes this every ~10s. You want:
rate_limits.five_hour.used_percentage— how much of the 5h window is usedrate_limits.five_hour.resets_at— Unix epoch of next resetcost.total_cost_usd— informational
If the cache file is missing or >60s stale (compare timestamp field to current Unix epoch), tell the user and stop — don't proceed with stale data.
2. Determine what to estimate
- If
$ARGUMENTSis an existing file path, read its contents. - If
$ARGUMENTSstarts with/or~but the file doesn't exist, stop and ask the user to confirm the path. - Otherwise treat the argument as an inline plan description.
3. Estimate plan token cost
Count discrete action steps (bullet points, numbered items, subheaders that imply an action). Classify each:
| Step shape | Cost |
|---|---|
| Small edit / single-file change / targeted tool call | ~8k tokens |
| Multi-file change / requires exploration before editing | ~20k tokens |
| Subagent dispatch or complex search/research | ~35k tokens |
| Bash command sequence / verification / smoke test | ~5k tokens |
| External dispatch to Codex/Gemini (Claude pays only for spec+smoke-test) | ~5k tokens |
Sum steps, then add 30% overhead for turn-to-turn conversation and unexpected tool iterations.
4. Compute fit
- Assume the 5h window budget is ~2,000,000 tokens (Opus Max approximation; tune later if needed).
plan_percent = round((estimate / 2_000_000) * 100)projected_total = current_used_percentage + plan_percent
5. Report one of three verdicts
Format:
<✅/⚠️/❌> <verdict headline>
current 5h: X% · plan est: ~Yk tokens (Z%) · projected total: W%
- ✅ Fits comfortably — projected total < 80%. Say "go ahead."
- ⚠️ Tight — 80 ≤ projected < 100%. List 2–3 specific steps that could be dispatched to Codex/Gemini to cut Claude cost.
- ❌ Won't fit — projected ≥ 100%. Offer three numbered options:
- Split: run the first N steps that fit, defer the rest
- Wait: reset is at
<local HH:MM from resets_at>— suggest/execute-at-reset <plan-path> - Keep planning: refine further; execute later
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.
- 5d ago First seen · 67 lines · 16 tokens per session scan A 95ca80525bb8
budget-check is a command published in the GitHub repository rhan1/crewline (2 stars, last pushed 12d ago), licensed MIT. It adds 16 tokens to every session and 730 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
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.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.