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/omrikais/cctally/record-usagegit clone --depth 1 https://github.com/omrikais/cctallyWhat 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.00000 | $0.00922 |
| Opus 5 | $0.00000 | $0.00461 |
| Sonnet 5 | $0.00000 | $0.00184 |
| Haiku 4.5 | $0.00000 | $0.00092 |
Grade A, and why
record-usage 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 2d 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 — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Optional: status-line integration (no OAuth API calls)
record-usage is now an opt-in alternative to the default hook-based
integration installed by cctally setup. Use it if you specifically want to
avoid OAuth API roundtrips and prefer your usage data to come from the
status-line stdin Claude Code already provides.
To wire it up, add this snippet to your ~/.claude/statusline-command.sh
(after parsing week_pct/week_resets/five_pct/five_resets from the
status-line JSON):
if [ -n "$week_pct" ] && [ -n "$week_resets" ]; then
record_args="--percent $week_pct --resets-at ${week_resets%.*}"
if [ -n "$five_pct" ] && [ -n "$five_resets" ]; then
record_args="$record_args --five-hour-percent $five_pct --five-hour-resets-at ${five_resets%.*}"
fi
cctally record-usage $record_args &
fi
Trailing & matters — record-usage runs in the background so it never blocks
the status-line render.
Both paths (status-line snippet and the default hook integration) can run
simultaneously; the record-usage funnel dedupes correctly.
record-usage
Record a usage-percent snapshot from the Claude Code status-line rate_limits
data. Writes to weekly_usage_snapshots and, if the snapshot crosses a new
integer percent, also to percent_milestones.
Cost coverage: Cumulative Claude costs stored on percent and five-hour milestones are transcript-derived lower bounds, not exact
/usagebilling totals.
Synopsis
cctally record-usage
--percent PERCENT
--resets-at RESETS_AT
[--five-hour-percent FIVE_HOUR_PERCENT]
[--five-hour-resets-at FIVE_HOUR_RESETS_AT]
Purpose
This is the ingestion end of the data pipeline. It is not meant to be called interactively — your status-line script calls it after every status render so the SQLite snapshot history stays fresh.
When to use it
- Wired into
~/.claude/statusline-command.sh. See installation.md. - Manually replaying a missed snapshot if your status-line script crashed (rare; the cost is one missing data point).
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.
- 2d ago First seen · 102 lines · 0 tokens per session scan A a14f056b88b1
record-usage is a command published in the GitHub repository omrikais/cctally (5 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 922 tokens. 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
git
Git operations with intelligent commit messages and workflow optimization.
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.
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.