weekly

A command that groups Claude usage by subscription week, meaning the quota period set by the service rather than a calendar week.

In plain words
What is it for?
Use it to review weekly usage and cost, filter by dates, sort weeks, or see costs broken down by model.
Why use it?
It aligns the report with Claude’s actual quota window, so usage percentages and cost per percentage point match that period. Cost totals are transcript-based lower-bound estimates.

Command

Install

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.

agentmods
npx agentmods add commands/omrikais/cctally/weekly
Clone the repo
git clone --depth 1 https://github.com/omrikais/cctally
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 922 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 2d ago against content hash 3ecb5ef9df5e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

weekly 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.

docs/commands/weekly.md · 81 lines

How it starts

The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.

weekly

Claude usage grouped by subscription week (anchored to --resets-at), with Used % and $/1% columns daily/monthly don't have.

Cost coverage: Claude dollar and token totals are transcript-derived lower bounds, not exact /usage billing totals.

Canonical form: cctally claude weekly (this flat form remains as an alias).

Synopsis

cctally weekly
    [-s YYYYMMDD] [-u YYYYMMDD]
    [-b] [-o {asc,desc}]
    [-m {auto,calculate,display}]
    [--json]

Purpose

The "what did each subscription week cost me" view. Unlike calendar-week groupings, the boundaries here align with Anthropic's actual quota window so Used % and $/1% are directly meaningful.

Options

Flag Description
-s, --since YYYYMMDD Filter from date (inclusive).
-u, --until YYYYMMDD Filter until date (inclusive).
-b, --breakdown Show per-model cost breakdown sub-rows.
-o, --order {asc,desc} Sort direction by week (default asc).
-m, --mode {auto,calculate,display} Cost source (drop-in for ccusage weekly --mode). auto (default) uses the recorded costUSD from JSONL when present, else computes from embedded pricing — this is the pre-Session-C behavior. calculate always computes from embedded pricing, ignoring any recorded costUSD. display shows the recorded costUSD only, rendering $0.00 when a row has none (ccusage-faithful). Most modern Claude Code JSONL omits costUSD, so under display near-everything reports $0. The pre-snapshot extrapolation tail carries no entries, so its weeks contribute $0 regardless of mode.
--tz TZ Display timezone for this call (local, utc, or IANA, e.g. America/New_York). Overrides config display.tz. See Display timezone for the full contract (parsing scope, JSON UTC invariant).
--json Output JSON.

Examples

cctally weekly
cctally weekly --since 20260101
cctally weekly --breakdown
cctally weekly --json
cctally weekly --order desc

Read the full file on GitHub · 81 lines

Changes

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.

  1. 2d ago First seen · 81 lines · 0 tokens per session scan A 3ecb5ef9df5e

Subscribe to this mod's changes

weekly is a command published in the GitHub repository omrikais/cctally (5 stars, last pushed 3d 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.