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/ashlrai/ashlr-plugin/ashlr-budgetgit clone --depth 1 https://github.com/ashlrai/ashlr-pluginWrote 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/ashlrai/ashlr-plugin/ashlr-budget)<a href="https://agentmods.dev/commands/ashlrai/ashlr-plugin/ashlr-budget"><img src="https://agentmods.dev/badge/commands/ashlrai/ashlr-plugin/ashlr-budget.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.00024 | $0.00904 |
| Opus 5 | $0.00012 | $0.00452 |
| Sonnet 5 | $0.00005 | $0.00181 |
| Haiku 4.5 | $0.00002 | $0.00090 |
Grade A, and why
ashlr-budget 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 6d 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 — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Manage a session budget cap that blocks tool calls when the limit is reached.
Usage
/ashlr-budget $X # set USD cap (e.g. /ashlr-budget $2.00 or /ashlr-budget $0.50)
/ashlr-budget tokens=200000 # set token cap (e.g. /ashlr-budget tokens=200000)
/ashlr-budget status # show current usage vs budget
/ashlr-budget off # clear the budget cap
$X and tokens=N are mutually exclusive — setting one clears the other.
Environment variables
The budget guard hook (hooks/pretooluse-budget-guard.ts) reads these env vars:
| Variable | Description |
|---|---|
ASHLR_SESSION_BUDGET_USD |
USD cap as a decimal string (e.g. "2.00") |
ASHLR_SESSION_BUDGET_TOKENS |
Token cap as an integer string (e.g. "200000") |
The status line shows $X / $Y · Z% when ASHLR_SESSION_BUDGET_USD is set, or Nt / Nmax · Z% when ASHLR_SESSION_BUDGET_TOKENS is set.
Steps
$X — set USD cap
- Parse the dollar amount (strip
$, parse as float). Reject if non-positive or non-numeric. - Set environment variable:
ASHLR_SESSION_BUDGET_USD=<amount>via Bash:export ASHLR_SESSION_BUDGET_USD=<amount> unset ASHLR_SESSION_BUDGET_TOKENS - Confirm: "Budget set to $
<amount>. The pretooluse-budget-guard hook will warn at 80%, warn loudly at 95%, and block at 100%."
tokens=N — set token cap
- Parse N as integer. Reject if non-positive.
- Set:
ASHLR_SESSION_BUDGET_TOKENS=<N>via Bash, unset USD cap. - Confirm: "Budget set to
<N>tokens."
status — print current usage
- Read
ASHLR_SESSION_BUDGET_USDandASHLR_SESSION_BUDGET_TOKENSfrom environment. - Read session-log (
~/.ashlr/session-log.jsonl) to compute cumulativeinput_size+output_sizebytes for the current session. - Estimate token usage:
tokens ≈ (input_bytes + output_bytes) / 4. - Estimate USD:
usd ≈ tokens / 1_000_000 * 12(blended $4/Mtok input + $20/Mtok output at typical 60/40 mix). - Print:
If no budget is set: "No budget set. Use /ashlr-budget $X or /ashlr-budget tokens=N to set one."Session budget status ───────────────────── USD cap: $<cap> (or "not set") Token cap: <N> (or "not set") Est. tokens used: ~<N> Est. USD used: ~$<X> Usage: <Z>%
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.
- 6d ago First seen · 77 lines · 24 tokens per session scan A a45cdf3518ed
ashlr-budget is a command published in the GitHub repository ashlrai/ashlr-plugin (3 stars, last pushed 6d ago), licensed MIT. It adds 24 tokens to every session and 904 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
upgrade-webkit
Upgrade Bun's WebKit fork to the latest upstream version of WebKit.
dedupe
Find duplicate GitHub issues.
rp-build-cli
Build with rp-cli context builder → chat → implement.
specsync-create-spec
Create a new spec-sync module spec.
nimbus-embedding-routing
Hybrid 384/1536-dim embedding routing (Phase 5 T6 PR 3): PROSEHEAVYTYPES, EMBEDDINGDIMLOCAL/EMBEDDINGDIMOPENAI, the RoutingEmbeddingPipeline wrapper, dual-table search (vecitems384 + vecitems1536 via vectorSearchChunksDual), the V30 migration (1536-dim table + dim-aware delete triggers), the nimbus index reembed CLI +…
piratebao-help
Show PirateBao command card.