Borrowing it
Nothing to install: this file belongs to amusleh-spotware-com/terse-sharp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/amusleh-spotware-com/terse-sharp/main/.claude/commands/mine-sessions.mdgit clone --depth 1 https://github.com/amusleh-spotware-com/terse-sharpWrote 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/amusleh-spotware-com/terse-sharp/mine-sessions)<a href="https://agentmods.dev/commands/amusleh-spotware-com/terse-sharp/mine-sessions"><img src="https://agentmods.dev/badge/commands/amusleh-spotware-com/terse-sharp/mine-sessions/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/amusleh-spotware-com/terse-sharp/mine-sessions"><img src="https://agentmods.dev/badge/commands/amusleh-spotware-com/terse-sharp/mine-sessions.svg" alt="Reviewed on agentmods" width="80" 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.00159 | $0.37540 |
| Opus 5.5 | $0.00064 | $0.15016 |
| Sonnet 5.5 | $0.00032 | $0.07508 |
| Haiku 4.5 | $0.00016 | $0.03754 |
Grade B, and why
mine-sessions scanned grade B with 1 finding 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 7d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
find ~/.claude/projects -name '*.jsonl' -mtime -$((WEEKS*7)) | wc -l How it starts
The opening of the file, as written. The whole thing — 2,053 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🚫 HARD GATE — findings are measured to the character, never impressionistic, and never leak another project's content.
$ARGUMENTS — a number of weeks to scan. Absent or unparseable → 1 week. Nothing else takes
input from the user; do not ask, do not confirm the window.
The six goals this command exists to serve. Every phase feeds at least one; every row logged in M9 is tagged with the one it serves; and M11 proves all six were mined or states what was checked and why that goal came back clean. They are not ranked by taste — they are ranked by what a failure costs:
| Tag | Goal | What a finding for it looks like |
|---|---|---|
[accuracy] |
the agent stops falling into traps that force the user to intervene | an extra user prompt, a rejected edit, a retry with different arguments, a confident wrong answer acted on — measured in section C |
[modern] |
the agent emits modern .NET — latest C# syntax, current APIs | a legacy construct in text the agent wrote, counted per 1000 emitted lines and confirmed against the workspace — section C, confirmed in M5 |
[perf] |
the agent emits code that is not slow | sync-over-async, sync file I/O, an allocation on a per-file/per-line/per-symbol path in emitted text — section C, confirmed in M5 |
[speed] |
the agent finishes the task sooner, in fewer calls | wall time per task, tool calls per task, a serial round trip that had no dependency, a batch parameter that existed and was not used, a blind wait, a re-run of work whose inputs never moved — section B |
[cost] |
the agent pays fewer tokens for the same answer | payload, framing, round trips, surface, cache churn — sections A and B, priced in M3 |
[correctness] |
the tool does what it was asked, and no more | a call that SUCCEEDED and still did the wrong thing — an edit that changed lines nobody named, a resolver refusing a name it should have taken, the fallback the refusal forced — measured in section C's three success-side ledgers |
[accuracy], [correctness] and [speed] are co-primary, and all three outrank [cost]. An intervention costs a whole
turn at the corpus turn p50, plus the tokens of the re-issued work, plus the context already spent on
the wrong path — so a payload row of equal token size is worth less than an intervention row. And a
round trip costs the corpus model gap (tool_result → next tool_use, measured p50 6 097 ms
on 35 967 gaps in the 1-week window of 2026-08-26) plus the tool's own p50 — so a row that
deletes one call per task is worth more than a row that shortens one response, because the wall clock
the user waits through is dominated by how many times the loop turns, not by how wide each answer
is. Rank accordingly in M9.
The four [speed] metrics, and they are the run's headline numbers. Every run reports all four in
M11 against the previous run, and a run that reports none of them has not measured [speed] and says
so as a degraded run:
| Metric | Where it comes from | Baseline, 1 week to 2026-08-26 |
|---|---|---|
| tool calls per task cycle | section B's cycle table — user turn to the next user turn | mean 25.6, p90 84 |
| wall time per task cycle | the same table | p50 1.3 min, p90 51.9 min, mean 44.8 min |
| round-trip latency | model gap p50 + the called tool's p50 | 6 097 ms of model gap, before the tool runs at all |
| parallelism score | section B — calls per assistant message, multi-call share, unspent-parallelism count, unused-batch count, redundant-call share | 1.165 calls/msg, 14.3% multi, redundant 8.3% (3 008 of 36 075) |
Ten gates that outrank everything else in this command:
- A finding without a number is not a finding. "Reads feel wasteful" is banned. "36
Readcalls in one session, 214 KB of tool results, ~53 500 tokens, against 10search_textcalls" is a finding. Every row carries a count, a byte/token/millisecond figure and the corpus it came from. - Nothing is too small to count — but a trim is only real once a tokenizer says so. This
command's reason to exist is the long tail: a two-space column separator, a repeated
(truncated=false), an absolute path, one redundant word in a tool[Description]re-sent on every request of every session. A multi-space run costs exactly 1 token wherever it appears, so a 4-column table pays 3 tokens per row for alignment nobody reads — over 40 000 rows that is 120 000 tokens, and it outranks most new tools. "Too small to log" is a banned phrase here; small findings are aggregated into one row per family, never dropped (M9.4). The mirror rule is equally binding: a trim that measures zero is not a finding either. Blank lines, trailing whitespace and abbreviation each measured ≤0.1% and 19-of-20 exactly zero on real payloads (M3.2). Proposing one of those is the same defect as failing to notice the padding — both spend the reader's attention on a number that is not there. - Never copy content out of another project's transcript. These sessions are from a private
employer codebase (
cTraderDev,ctd-worktrees-*,cTraderAutomateApi, …) andIMPROVEMENTS.mdis pushed to a public repository. A row may name: tool names, call counts, byte sizes, token estimates, millisecond timings, error codes, and a project's directory slug. A row may never contain: source code, file paths inside those repos, type or member names, ticket text, user prompts, or a quoted tool result. When in doubt, state the shape (a 40 KB whole-file read of a test file) not the value. The measurement script enforces a mechanical version of this rule and you enforce the rest by hand in M10.2. - Character economy is a claim about tokens, so state both. Chars are what the script can count;
tokens are what is paid. The measured ratio over real TerseSharp responses is 4.18 chars/token,
which is why section A estimates at
chars // 4— and why an estimate is all it is. Prefer trims that delete whole tokens (a separator, a padded column, a repeated line prefix, a whole field) over trims that shorten one: deleting characters from inside a word usually saves nothing at all, because a common word is already a single token. - Every claim names the instrument that verified it. Four are admissible, in this order:
(a) the corpus — a count from the single-pass scan over the real transcripts; (b) a tokenizer
experiment — an encode-before/encode-after on a real payload, in both
o200k_baseandcl100k_base, labelled directional because neither is Claude's; (c) a primary source — a vendor document or a paper, fetched and quoted, never a summary of a summary; (d) the workspace —analyze,search_regex,get_symbol_source,buildorrun_testsover TerseSharp's own source, which is the only instrument that can confirm a pattern the transcripts show being written rather than being read. Where an outside claim contradicts the corpus, the corpus wins and the row says so. A claim that survived none of the four is writtenUNVERIFIEDin the report and is not allowed intoIMPROVEMENTS.mdat all. This gate exists because a previous run of this command shipped a trim ledger whose three headline classes were each worth ~0.1%, sourced from plausible reasoning that nobody encoded. - The agent's own output is corpus too, and a run that skipped it is incomplete. Section A sees
what the agent read; section C sees what it wrote (
tool_use.inputon the edit family) and the turns the user spent steering it (userrecords carrying text rather than atool_result). All three sections come out of one pass now, so there is no longer a phase that can be quietly dropped when the run is long — a section that prints zeros is a defect in the script, not an absence of data, and M11 says which it was. - A pattern counted in emitted text is HEURISTIC until instrument (d) confirms it. The
emitted-code section is a regex over the characters the agent sent, with no compilation behind it.
It ranks candidates; it never proves one. A
[modern]or[perf]row states whichanalyze/search_regex/get_symbol_sourcecall confirmed the class on real source, or it is not written. And a class this repository deliberately leaves off — an.editorconfigseverity, the app-wide conventions clause inCLAUDE.md— is not a finding; check before logging, because proposing that the codebase fight its own configuration is the same defect as a number nobody encoded. - A call deleted beats a response shortened, and the run must say which it did. The prime
directive is "save tokens, increase speed" — conjunction, not disjunction — and M4.1's baseline
says the second half is where the hours are. A format trim that saves 2 000 tokens and changes no
call count saves zero seconds. So every
[speed]row states its saving in hours or milliseconds per window, and names which of the five levers it pulls:
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.
- 7d ago Changed · +50 lines 4ada513b82a3
- 13d ago Changed · +15 lines a8678b02438c
- 20d ago Changed · +17 lines 716e61b1da5c
- 28d ago Changed · +25 lines c9a01aac0074
- 1mo ago Changed · +20 lines 39de05b6f360
- 1mo ago Changed · +168 lines · +26 tokens per session 26627c3d4370
- 1mo ago Changed · -180 lines · -3 tokens per session 28f9b8a1b986
- 2mo ago First seen · 1,938 lines · 136 tokens per session scan B cfedcae27045
mine-sessions is a command published in the GitHub repository amusleh-spotware-com/terse-sharp (3 stars, last pushed today), licensed MIT. It adds 159 tokens to every session and 37,540 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
new-config
Scaffold strongly-typed configuration with IOptions , validation, and environment-specific overrides.
new-middleware
Scaffold ASP.NET Core middleware with request/response pipeline, DI support, structured logging, and proper ordering.
new-worker
Scaffold a background worker using BackgroundService with PeriodicTimer, structured logging, graceful shutdown, and health checks.
new-dto
Scaffold request/response DTOs with records, validation attributes, and mapping from domain entities.
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.