Token Quotient

Token Quotient

Know what an AI job costs before it starts.

Today an AI job works like a mechanic who fixes your car without telling you the price: you find out at the till. With a subscription the till is the usage limit, and one big job can use up a whole week. Quotient is a plugin for Claude Code that gives you the price first, lets you choose, measures what the job really cost, and learns from the difference.

MIT licensed · version 0.9.7 · needs Python 3.8 or newer

Animated terminal. The user asks Claude Code for a big job. Quotient shows a quote with three levels: essential 60k, good 150k and max 300k tokens, each with the share of the 5-hour and weekly limits it would take. The user picks good and the work runs. Quotient reports the actual cost, 142k tokens against an estimate of 150k, and updates its correction factor. Then a job too big for this week is split into 4 installments that run nightly at 03:00, with progress going from 25% to 100%.
One loop: a quote before the job, your choice, the real cost after, and a job too big for this week split into nightly installments. Estimates are not guaranteed: at the start they can be quite far off, and they get closer with each finished job.

The price first, the bill after

Quotient does not make the model better at guessing: it measures the miss and corrects the next guess. And it plans big jobs around the limits you actually have.

Before the job

A quote, in a choice window

Above the threshold you set, or when you call it a big job, Claude does not start. A window offers essential, good or max: what each includes, its estimate and, once Quotient knows your limits, the share of them it would take. The pace is yours too: all today, a few days, or your own.

An example quote. 5-hour and Week: the share of each limit a level would take.
LevelIncludesEstimate5-hourWeek
essentialasync client, old tests pass60k5%1%
good (chosen)+ new tests, docs updated150k12%3%
max+ edge cases, full review300k24%6%
After the job

The real cost after

Read from Claude Code's own records and set next to the estimate. Each new quote is corrected by how far off the earlier ones were; until you have five jobs of your own, it starts from the shared average of everyone's real jobs.

Actual: 142k tokens (est. 150k)
factor updated
While you are away

Installments, one a day

A job too big for one go is split into daily pieces. At the time you choose, the PC wakes up, Claude Code does the day's piece, and the PC goes back to sleep; a notification tells you what it did. Waking is for Windows; macOS and Linux get the line to schedule it.

PACE: days=4
Next installment: 03:00
All week

Your limits at a glance

How much of the 5-hour and weekly limits you have used, and what is left, right in Claude Code's status line. Several jobs together never eat the share of the week you keep for yourself.

5-hour: 31% used, 69% left
week: 70% used, 30% left

Install

Two commands, typed in Claude Code.

In Claude Code:

/plugin marketplace add Korvonordico/quotient-claude-tokens
/plugin install token-quotient@token-quotient
/token-quotient:setup
set Quotient up, or change its settings
/token-quotient:report
estimates against real costs, your limits, the weeks (add page for charts)
/token-quotient:rate <job>
split a big job into installments
/token-quotient:share
exactly what is shared, and turning it on or off
/token-quotient:help
every command, with what it does
  • Needs Python 3.8 or newer and sh. On Windows, sh comes with Git for Windows, which Claude Code already uses.
  • The first time, a window asks four settings: from what size a job gets a quote, how much of the week to keep for yourself, the language, and whether Quotient may wake the PC for installments and put it back to sleep.
  • Change them any time with /token-quotient:setup.

Made for Claude Code

Token Quotient (Quotient for short) is a Claude Code plugin. It does not replace anything; it adds a step before a big job and a measurement after it.

In Claude Code

Hooks run its Python script at the start of a session, at each message and at the end of each reply. It reads Claude Code's transcripts only for numbers: token counts, the machine lines Claude writes, and which tools were called. Installments run Claude Code itself, in the background, in the job's folder.

Hermes Agent too

If you use Hermes Agent with your Claude login, its chats spend the same 5-hour and weekly limits. Quotient reads Hermes' token counters (read-only: numbers, model and chat title, never the text) and, with two shell hooks, quotes and measures jobs there as well.

How to add the hooks

What leaves your computer

Everything Quotient records stays on your computer, in ~/.quotient. After each finished job it sends one line of numbers for the shared average, so new users start from real jobs instead of from zero. Exactly this line, and nothing else:

{"v":1,"q":"0.9.7","family":"opus","estimate":225000,"actual":259000}

No dates, no names, no text, no paths, no session or user ids. Turn it off with /token-quotient:share off; you still get the shared average.

Read the full privacy note (PRIVACY.md)

  • Writes in ~/.quotient and, for installments, a report page in the job's folder. Claude Code's settings only when you choose the status line or auto-compaction.
  • Sends one line of numbers per finished job, unless sharing is off.
  • Fetches the shared average once a day, from GitHub (or from the author's service when GitHub does not answer).
  • Schedules Windows tasks for installments only after you choose them in the window.