five-hour-blocks

five-hour-blocks is a command for coding agents from omrikais/cctally. It costs 0 tokens per session (2,062 once invoked), scanned A, original, Apache-2.0.

A report of five-hour usage periods anchored to recorded API resets, with totals grouped by model or project. It also shows how each period differs from the comparable period seven days earlier.

In plain words
What is it for?
Use it to review five-hour usage, inspect model or project totals, filter by date, and investigate periods where a reset crossed the reporting boundary.
Why use it?
It separates recorded reset periods from estimated windows, so you can distinguish measured usage from heuristic results. The report also makes week-to-week changes easier to spot.

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/five-hour-blocks
Clone the repo
git clone --depth 1 https://github.com/omrikais/cctally

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

agentmods badge for five-hour-blocks

README.md
[![agentmods](https://agentmods.dev/badge/commands/omrikais/cctally/five-hour-blocks.svg)](https://agentmods.dev/commands/omrikais/cctally/five-hour-blocks)
Your own site
<a href="https://agentmods.dev/commands/omrikais/cctally/five-hour-blocks"><img src="https://agentmods.dev/badge/commands/omrikais/cctally/five-hour-blocks.svg" alt="Measured on agentmods" height="20"></a>
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 2,062 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.02062
Opus 5 $0.00000 $0.01031
Sonnet 5 $0.00000 $0.00412
Haiku 4.5 $0.00000 $0.00206

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

Security

Grade A, and why

five-hour-blocks 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 4d 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/five-hour-blocks.md · 165 lines

How it starts

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

five-hour-blocks

List API-anchored 5-hour blocks with rollup totals plus 7d-drift columns.

Cost coverage: Stored Claude block costs are transcript-derived lower bounds, not exact /usage billing totals.

Which 5h command? blocks is the ccusage-compatible per-window view (includes ~-prefixed heuristic rows when no recorded reset covers a window); five-hour-blocks (this page) is the API-anchored analytics view with model/project rollups and 7d drift; five-hour-breakdown drills into per-percent milestones inside one block.

Synopsis

cctally five-hour-blocks
    [-s YYYYMMDD] [-u YYYYMMDD]
    [--breakdown {model,project}]
    [-m {auto,calculate,display}]
    [--json] [--no-color] [--tz TZ]

Purpose

Analytics view on the five_hour_blocks table populated by record-usage each tick. Distinct from cctally blocks (the upstream-parity drop-in that also shows heuristic-anchored windows): five-hour-blocks is API-anchored only, and adds 7d-drift columns plus a reset-crossing marker.

Options

Flag Description
-s, --since YYYYMMDD Filter from date (inclusive).
-u, --until YYYYMMDD Filter until date (inclusive).
--breakdown {model,project} Add per-model OR per-project rollup-child rows under each parent block (single value, not multi).
-m, --mode {auto,calculate,display} Accepted as a no-op for surface parity with the sibling cctally blocks --mode. Unlike blocks/daily/etc. — which recompute per-entry cost from session_entries at query time and so honor the mode — five-hour-blocks reports the authoritative materialized five_hour_blocks.total_cost_usd, computed at record-time (always auto semantics) by _compute_block_totals. There is no query-time per-entry cost path to re-source, so the flag changes nothing. Output is byte-identical across auto/calculate/display.
--json Emit camelCase JSON (schemaVersion: 1).
--no-color Disable ANSI color (currently a no-op — table is plain text).
--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).

Read the full file on GitHub · 165 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. 4d ago First seen · 165 lines · 0 tokens per session scan A 9a1d5dc015f5

Subscribe to this mod's changes

five-hour-blocks is a command published in the GitHub repository omrikais/cctally (5 stars, last pushed 6d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,062 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.