record-credit

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

A command for recording a weekly usage credit: a mid-period reduction in Anthropic’s seven-day usage counter that is not a full reset. It updates cctally’s local record with the lower value.

In plain words
What is it for?
Use it to repair one affected week by specifying the credited value and, optionally, its time range or timestamp. A dry-run option lets you preview the change first.
Why use it?
Without this correction, a stale higher reading can remain in reports and the status display because cctally may treat the lower reading as a delayed or incorrect API response.

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/record-credit
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 record-credit

README.md
[![agentmods](https://agentmods.dev/badge/commands/omrikais/cctally/record-credit.svg)](https://agentmods.dev/commands/omrikais/cctally/record-credit)
Your own site
<a href="https://agentmods.dev/commands/omrikais/cctally/record-credit"><img src="https://agentmods.dev/badge/commands/omrikais/cctally/record-credit.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,824 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.1 $0.00000 $0.02824
Opus 5 $0.00000 $0.01412
Sonnet 5 $0.00000 $0.00565
Haiku 4.5 $0.00000 $0.00282

Measured 5d ago against content hash 1fdde85664e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

record-credit 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 5d 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/record-credit.md · 136 lines

How it starts

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

record-credit

Record an in-place weekly (7d) credit — a case where Anthropic lowered your 7-day usage counter mid-window without a clean reset to zero — and repair the local data so reports and the statusline read the credited value instead of the stale pre-credit high-water mark.

Synopsis

cctally record-credit
    --to TO
    [--from FROM]
    [--at AT]
    [--week WEEK]
    [--dry-run] [--yes] [--force] [--json]

Purpose

cctally already auto-detects two shapes of an in-place weekly credit during record-usage: a big drop (≥25 percentage points, fired immediately) and a reset-to-zero (post-value ≤1%, debounced). A real incident on 2026-06-19 fell between the cracks: the weekly counter changed 46% → 31%, a 15pp drop whose post-value is nowhere near zero. That is below the 25pp threshold and is not a zero-collapse, so neither auto-detector fires — and the write-site monotonicity clamp then treats the lower 31% reading as a lagging-replica regression and refuses to store it, leaving every display pinned at the stale 46%.

The 25pp threshold is deliberate: a slightly-behind API replica reports a marginally-lower number, and a 15pp drop is fundamentally ambiguous from percent-shape alone, so lowering the threshold would reintroduce exactly the false positives it guards against. record-credit is the deterministic, user-asserted escape hatch: you state the credit explicitly (zero false-positive risk), and the command repairs the local data so every current-week surface reads the credited value.

Same week — no re-anchor. A partial credit is not a reset: the week keeps its original boundaries (e.g. 2026-06-13 → 2026-06-20); only the running 7d percent steps down (46 → 31, then climbs again as usage resumes). record-credit records this by writing a row to weekly_credit_floors — a clamp floor for the current week — and does not write a week_reset_events row, so the window-resolution code never re-anchors the week to the credit moment (which would otherwise show a spurious "new week" and corrupt the forecast rate). The four MAX-clamp sites that derive the current 7d percent (the statusline 7d high-water mark, the record-usage write-site monotonic clamp, the --from default helper, and project's per-week usage) consult the union of week_reset_events + weekly_credit_floors and floor the displayed value to the post-credit reading while the window stays put.

Read the full file on GitHub · 136 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. 5d ago First seen · 136 lines · 0 tokens per session scan A 1fdde85664e0

Subscribe to this mod's changes

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