ClaudeCodeMod

All shelves / Mods / Usage

usage-stats

By omeerdvrn

usage-stats is a Claude Code usage mod by omeerdvrn.

Opens a /usage-stats pane of this machine's Claude Code tokens over 7 days, 30 days, or all time, by day, project, and model, with Linear issues closed.

Draws

Install

The marketplace name is o-mods.

In your shell
claude plugin marketplace add omeerdvrn/o-mods
claude plugin install usage-stats@o-mods
Open the repo

It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.

Version
0.1.0
License
MIT
Repo stars
6
Last change
2026-10-15

What it can reach

  • Draws in the session
  • Reads usage or context figures
  • Reaches the network or an outside service
  • Calls another program on this machine

Needs Python 3 as python3, and Linear connected to Claude for the issues closed section; set linearServer in /config to use another server, or leave it empty to hide the section. It never opens on its own, and where no pane can be shown the same receipt is printed into the conversation. The first scan reads every log and takes a few seconds; after that only new or changed logs are read, and the results are cached in ~/.claude/usage-stats/cache.json. Claude Code removes old session logs, so all time goes back as far as the logs on this machine. claude --plugin-dir runs it from a clone.

The marketplace name is o-mods. The marketplace also holds heat, linear, usage-bar, persona, themes, and other mods. This one installs on its own. Token counts from the session logs are why this page files it under usage. heatmap draws a GitHub-style grid of your Claude Code time in a pane, one square per day, with your streak, peak hours, and top projects. session-receipt opens a pane of every turn's tokens in this session, with the five that spent the most. This one reads every session log on the machine, subagents included, counts each API response once, counts a worktree toward its repository, and adds the busiest day and hour of the week and the issue with the most tokens. Nothing leaves the machine except the Linear request. In the source, the pane is opened with $.ui.open and brought to the front.

Demo

The author's recording of /usage-stats: the command opens a Usage pane beside the chat with 371.8M tokens in the last 30 days, 483 prompts, 69 sessions and 15 issues closed, a bar chart by day, tokens by project and by model, the busiest day and hour, the top issue, and points closed, read from 98 session logs. The figures are the author's sample.
From the author's repo.

What it hooks into

  • session.startWhen a session starts
  • command.runWhen you run its slash command/usage-stats/usage-stats:usage-stats
  • ui.renderDraws into the sessionPane

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Slash commands 1

  • /usage-statsShow your Claude Code usage on this machine: tokens, prompts, sessions, issues closed

Files

The author's README and source, 4 files. They load when you open them.

Facts

Author
omeerdvrn
Category
Usage
Marketplace
o-mods
Repo
omeerdvrn/o-mods
Folder
mods/usage-stats
Version
0.1.0
License
MIT
Repo stars
6
Last change
2026-10-15
Language
TypeScript
Files
19

Other mods in Usage

claujev-modCivalskiHolds a commandDraws a status line of the checks and actions TypeSafe's Jev made today for the ClauJev plugin, with the effort Jev suggests, and can apply that effort.jev-orchestratorhiyokuSends each subagent's task to TypeSafe's Jev, which picks its model, effort, and tool profile, and draws the picks, tokens, and cost on the status line.vitalsnaicudDraws a framed live dashboard above the prompt: model, effort, context, plan limits with a forecast, cost, tokens and cache, subagents, shells, and tools.dispatch-gatewdsewdser-bitHolds a commandRefuses one tool call once the main session has made 8 requests in a row itself, and a subagent past 3 an hour, so Claude hands work out. A retry goes through.usage-baromeerdvrnDraws your 5-hour and 7-day plan limits under the prompt, used or left, with the git branch and file counts, the model, context, and the session's cost.limitsRyan-LTDraws a band above the prompt with the 5-hour and weekly limits, a pace warning, and context fill, and toasts at 75%, 90%, and 100%.context-guardmelodic-softwareShows a toast when the session's context crosses into a worse zone, smart, acceptable, or dumb, and can draw the zone and percent in a row above the prompt.rate-limit-guardmelodic-softwareShows a toast when the account's 5-hour or 7-day rate-limit window reaches 90% or 95% and when it resets, and can draw both windows in a row above the prompt.orca-quotamutlumehmetDraws the 5-hour and 7-day usage of every Claude account on this machine in one band above the prompt, and warns once before the current account hits its limit.context-keepermishgoldenbergOpens a pane of what fills the context window with tips to trim it, and saves a handoff note of the goal, decisions, files, and TODOs to .claude/checkpoints/.usage-metermishgoldenbergOpens a pane of the 5-hour and 7-day plan limits with reset countdowns, burn rate and when a limit fills, session cost, cache hit ratio, and tokens per turn.usage-quotaanantraghunathDraws the 5-hour and weekly limits with a forecast at reset and the context window above the prompt, with a Compact button and Auto compact at a set percent.
All 183 in Usage