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-compactgit 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-compact)<a href="https://agentmods.dev/commands/ashlrai/ashlr-plugin/ashlr-compact"><img src="https://agentmods.dev/badge/commands/ashlrai/ashlr-plugin/ashlr-compact.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 | $0.00021 | $0.00676 |
| Opus 5 | $0.00010 | $0.00338 |
| Sonnet 5 | $0.00004 | $0.00135 |
| Haiku 4.5 | $0.00002 | $0.00068 |
Grade A, and why
ashlr-compact 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 3d 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
Read ~/.ashlr/session-history/<sessionId>.jsonl using the ashlr__read tool (or Bash if the path resolves) and then run the following analysis logic:
-
Find the session ID: It is in
~/.ashlr/last-project.jsonunder thesessionIdkey. Read that file first. -
Read the session history: Read
~/.ashlr/session-history/<sessionId>.jsonl. Each line is a JSON object with fields:ts,tool,sizeBytes,contentSha8,turn,sessionId. -
Compute current turn count: Count the total number of lines in the history file — this is
currentTurn. -
Classify entries by staleness:
turnDelta = currentTurn - entry.turn- Fresh:
turnDelta < 5(freshness 1.0) - Stale:
5 ≤ turnDelta < 15(freshness 0.5) - Very stale:
turnDelta ≥ 15(freshness 0.2)
-
Aggregate:
- Total stale results: count of entries where
turnDelta ≥ 5 - Total stale bytes: sum of
sizeBytesfor stale entries - Per-tool breakdown: group by
tool, show count + bytes
- Total stale results: count of entries where
-
Print the report to the user in this format:
ashlr-compact: Stale result analysis ───────────────────────────────────── Session turns: <currentTurn> Stale results: <count> (turnDelta ≥ 5) Stale volume: ~<KB> KB By tool: <tool> <count> results · ~<KB> KB ... Recompression opportunity: ~<staleKB> KB could be freed by re-running these reads now (the fresh results would replace stale ones in context). Suggested actions:Then list the top 5 stale entries (by sizeBytes descending) and suggest re-running the specific tool that produced them (e.g.,
re-run ashlr__read on <implied subject>if tool is ashlr__read or Read). -
Inject recompression hint as your next assistant message context:
"ashlr: The above stale results are from 5+ turns ago. If any are still needed, consider re-running the relevant reads now with fresh context. Stale results from earlier turns remain in the conversation history and count against the context window even when no longer load-bearing."
If the history file does not exist or is empty, tell the user: "No ashlr session history found — the tracker starts recording after the first ashlr__read or ashlr__grep call."
If total stale bytes < 5 KB, tell the user: "Session looks clean — less than 5 KB of stale tool output. No recompression needed yet."
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.
- 3d ago First seen · 55 lines · 21 tokens per session scan A b63dc5db681a
ashlr-compact is a command published in the GitHub repository ashlrai/ashlr-plugin (3 stars, last pushed 3d ago), licensed MIT. It adds 21 tokens to every session and 676 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.
scriptwriter-draw
Draw a random chaos card from the 13-card deck — a plot-twist prompt the user can use as a scene seed, a basistext for an RRR cascade, or a riff for a room contribution.
specsync-create-spec
Create a new spec-sync module spec.
brain-ask
Search the Hamzaish brain — learnings, decisions, playbooks, product docs. Use for "what did we decide about X" / "have we seen this before" recall, or before re-deriving something. Returns ranked citations with snippets.