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/Fmarzochi/EGCWrote 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/fmarzochi/egc/cost-report)<a href="https://agentmods.dev/commands/fmarzochi/egc/cost-report"><img src="https://agentmods.dev/badge/commands/fmarzochi/egc/cost-report/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/fmarzochi/egc/cost-report"><img src="https://agentmods.dev/badge/commands/fmarzochi/egc/cost-report.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.00025 | $0.01244 |
| Opus 5.5 | $0.00010 | $0.00498 |
| Sonnet 5.5 | $0.00005 | $0.00249 |
| Haiku 4.5 | $0.00003 | $0.00124 |
Grade A, and why
cost-report 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 1mo 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.
This is a copy
89% identical to cost-report — 130 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cost Report
Present a spending and usage report from metrics/costs.jsonl, the file EGC's
stop:cost-tracker hook (scripts/hooks/cost-tracker.js) appends one JSON line
to at every session stop. EGC keeps no cost database. The cost-tracking skill
covers the file in depth; this command is the short report.
What This Command Does
- Find
metrics/costs.jsonland check thatjqis available. - Summarize today, yesterday, the total, the rows and the sessions.
- Break the estimate down by model and by session, and list the last seven days.
- With the
csvargument, export the most recent rows.
Find the Ledger
for dir in "${EGC_DIR:-}" ~/.claude ~/.cursor ~/.gemini ~/.codeium/windsurf ~/.config/opencode ~/.config/zed \
~/.agents ~/.amp ~/.continue ~/.github ~/.kiro ~/.trae ~/.trae-cn ~/.codebuddy; do
[ -n "$dir" ] || continue
[ -f "$dir/metrics/costs.jsonl" ] && echo "costs: $dir/metrics/costs.jsonl"
done
test -f ~/.egc/metrics/costs.jsonl && echo "costs: ~/.egc/metrics/costs.jsonl"
command -v jq >/dev/null && echo "jq available" || echo "jq missing"
Set COSTS to the file found: EGC_DIR first, then the directory of the tool
you are running in, then ~/.egc. If there is none, tell the user cost tracking
is not active for this tool (Claude Code and Cursor run the cost tracker, and
EGC_DISABLED_HOOKS can turn it off) and stop: do not invent figures. The
queries below read the file with cat and pipe it into jq, because the
Guardian lets the agent read ~/.egc/metrics but refuses jq naming a path
there.
Each line holds timestamp (ISO 8601, UTC), session_id, model,
input_tokens, output_tokens and estimated_cost_usd.
Summary
cat "$COSTS" | jq -s '(now | strftime("%Y-%m-%d")) as $today
| ((now - 86400) | strftime("%Y-%m-%d")) as $yesterday
| {
today: (map(select(.timestamp | startswith($today)) | .estimated_cost_usd) | add // 0),
yesterday: (map(select(.timestamp | startswith($yesterday)) | .estimated_cost_usd) | add // 0),
total: (map(.estimated_cost_usd) | add // 0),
rows: length,
sessions: (map(.session_id) | unique | length),
rows_without_tokens: (map(select(.input_tokens == 0 and .output_tokens == 0)) | length)
}'
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.
- 1mo ago Changed · +6 lines · +10 tokens per session 55db1b4992df
- 2mo ago First seen · 108 lines · 15 tokens per session scan A 48f48ebb5f3e
cost-report is a command published in the GitHub repository Fmarzochi/EGC (70 stars, last pushed yesterday), licensed Apache-2.0. It adds 25 tokens to every session and 1,244 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 89% identical to cost-report, differing in 130 lines, and is treated as a copy.
cost-report compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cost-reportFmarzochi/EGC | Command | 70 | yesterday | Apache-2.0 | A | 25 | Claude Code |
| checklistgithub/spec-kit | Command | 153k | 3d ago | MIT | A | 13 | Claude Code |
| clarifygithub/spec-kit | Command | 153k | 3d ago | MIT | A | 27 | Claude Code |
| analyzegithub/spec-kit | Command | 153k | 3d ago | MIT | A | 26 | Claude Code |
| specifygithub/spec-kit | Command | 153k | 3d ago | MIT | A | 13 | Claude Code |
| convergegithub/spec-kit | Command | 153k | 3d ago | MIT | A | 35 | Claude Code |
| implementgithub/spec-kit | Command | 153k | 3d ago | MIT | A | 14 | Claude Code |