agentleFS
fws94fws94/product9-token-saver/skills/usage-report/SKILL.md

usage-report

Skill1 starsChanged 56 days agoMITView on GitHub

Use when measuring recorded local usage for an explicit date range or merging device reports while preserving unknown coverage, cached-input subsets and reasoning-output subsets.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the local collector only with an identified log file/directory and device label.

    line 8
  2. Very specific:

    Read coverage, deduplication, totals, automatic_approval, warnings and the report evidence path.

    line 25

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Local usage reports

Use the local collector only with an identified log file/directory and device label. It reads JSONL/JSON/log records; it does not access provider accounts, estimate missing usage or publish prompts. The input source defaults to ~/.codex/sessions only when the parent has not supplied one.

python scripts/token_saver.py usage --start 2026-09-01 --end 2026-09-07 --utc-offset 8 --device laptop --input <log-dir> --output <report.json>
python scripts/token_saver.py usage-merge --inputs laptop.json desktop.json --output all-devices.json

Timestamps must be timezone-aware; malformed or naive records remain unknown. The end date is inclusive in the request and is returned as an explicit half-open interval [start, end_exclusive). Records are deduplicated by response ID across every source date before that interval is filtered. Cached input is included within input tokens; reasoning output is included within output tokens and is reported as a subset. Records marked automatic approval are counted separately from normal totals.

Read coverage, deduplication, totals, automatic_approval, warnings and the report evidence path. Missing logs, unreadable files and unknown coverage remain blocked/unknown; never render them as zero. Mixed formats produce a warning. --hash-receipts stores SHA-256 response receipts without IDs or prompts, but receipts cannot prove a physical device or repair cross-device duplicates.

usage-merge validates schema, timezone-aware increasing periods, non-negative totals and hashed receipts, then sums known device totals, retains every warning and sets cross_device_provable: false. Aggregate totals are not evidence of subscription, credit or account savings. Report only bytes/tokens recorded in the supplied artifacts; unavailable actual usage must remain unavailable rather than an estimate.

See usage report behavior, measurement rules and the result contract.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.