Skip to content

About

🧾 Claude Code plugin: your Claude Pro/Max usage limits with a pace forecast, billing period, session cost in tokens and $/€, and whether your plan pays off, right above the prompt.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

🧾 Quanta Costa: Claude Code usage limits and session cost, right above the prompt

License: MIT Claude Code plugin

Quanta Costa: Claude Code usage limits, pace forecast and session cost, shown right above the prompt

How much of your Claude plan is left, and what is this session costing you? Quanta Costa is a Claude Code plugin that answers both at a glance. It shows your billing period, your weekly usage limit with a pace forecast, the cost of the current session in tokens and dollars or euros, and whether your plan pays off, as a compact band right above the prompt. It works in the terminal and in the Claude desktop app.

🧾 Period   ████░░░░░░░░  1.4 of 4.3 weeks gone · 2.9 wk left · renews in 20 days
   Week     ██████░░░░░░  50% used · 50% free · on track (resets Oct 12)
   Session  3.3M tokens · $4.95 · last prompt $0.07 · 85k tokens   [Help]
   Value    ████████████  $412.30 API value vs $200.00 plan (2.1×)

Features

  • Weekly limit bar for Claude Pro and Max: how much is used, how much is free, when it resets. Green, yellow from 70%, red from 90%. Without a weekly limit it shows a spend limit or the 5-hour window instead.
  • Pace forecast: know before you hit the limit. "on track" if your week lasts until the reset, otherwise "runs out Fri 14:00".
  • Plan value: the API value of all your sessions this period against your plan price, e.g. 2.1×. Above 1× your subscription has paid for itself. If counting began after the period started, the row says since when.
  • Billing period bar: how many weeks of the month you paid for are gone and how many are left.
  • Session cost in tokens and in dollars or euros, plus the cost of your last prompt. Updates live after every tool call.
  • 5-hour limit warning: the short-term window only shows up when it passes 80%, with the time it frees up again.
  • Notices, each shown once: when the week passes 80% and 90% (with the pace forecast), when a fresh week starts, and at the end of each billing period a look back at its API value against your plan.
  • Built-in help: press h or click Help, and it explains every number, including whether the costs are real. Its last line shows the active settings and the version. More in the FAQ with examples.
  • Also on your phone: send /quanta-costa in a session you follow in the Claude mobile app, and Claude answers with the numbers in one line. The mobile app shows no band and no pane, so Quanta Costa hands Claude the numbers to reply with. In the terminal and the desktop app, /quanta-costa opens the view in a pane and prints the same line.
  • English or German: switch the language with one setting, numbers and dates follow (4,42 €, 12.10.).
  • Private by design: no network calls. All numbers come from Claude Code itself; the Value row keeps a small local record of cost readings in ~/.claude/quanta-costa/, shared by all your sessions, with a backup copy written every ten minutes, so even a computer crash costs at most the last minutes. Besides those files it only reads its own entry in Claude's settings file (see FAQ).

Install

In a shell, in one line, with your settings:

claude plugin install quanta-costa --marketplace wukonigcom/quanta-costa --config billingDay=29 --config currency=EUR --config planPrice=180

Put in your own billing day, currency (USD or EUR) and monthly plan price, or leave the --config parts out and set them later (see Settings).

Or inside Claude Code:

/plugin marketplace add wukonigcom/quanta-costa
/plugin install quanta-costa@quanta-costa

Then start a new Claude Code session. Claude desktop app: quit it completely (from the tray icon, closing the window is not enough) and open it again. A plugin installed for the user scope runs there too, in the Code tab.

Check: the band appears above the prompt. Press h: the last line of the help shows your settings and the version.

Update

claude plugin marketplace update quanta-costa
claude plugin update quanta-costa@quanta-costa

Then start a new session, or quit and reopen the desktop app. /reload-plugins alone can keep the old version running.

Uninstall

claude plugin uninstall quanta-costa@quanta-costa

The ledger stays in ~/.claude/quanta-costa/; delete that folder too if you want it gone.

Settings

Setting What it does Default
language en (English) or de (German): labels, help, number and date formats en
billingDay Day of the month your subscription renews (1 to 31). It is on your Anthropic receipt. 0 hides the Period row. 0
currency USD or EUR USD
eurRate Euros per US dollar, used with EUR 0.89238 (ECB, 2026-10-09)
planPrice Your monthly plan price in your currency, as on your receipt. Turns on the Value row. 0 hides it. 0
openPane Opens the Quanta Costa pane beside the chat at every start. false keeps it closed; /quanta-costa still opens it. true

Change them later with /plugin configure quanta-costa in Claude Code or claude plugin configure quanta-costa in a shell.

FAQ

The short answers are here. The full FAQ covers every feature with worked examples: Period, Week and pace, the 5-hour limit, Session, Value, notices, the phone pane, language, currency, settings and troubleshooting.

Are the costs real? On a Claude subscription (Pro or Max): no, they are hypothetical. Quanta Costa shows what the session would cost at API list prices, the same figure /cost totals. You do not pay it on top; it only counts against your weekly allowance. You only really pay for extra usage beyond your limit, if you turned it on. On an API key, Claude Code reports no subscription limits, and the help says the costs are real.

What are the weekly limit and the 5-hour limit? Claude plans meter usage in two windows: a weekly allowance and a short 5-hour window. Quanta Costa shows the weekly one as a bar and only warns about the 5-hour one when it gets tight, because that is the one that usually stops you.

How does the pace forecast work? It extrapolates your usage so far in the current week: if you keep going at the same rate, when would you hit 100%? If that is after the reset, you are on track. It waits until a few hours of the week have passed, so it does not guess from too little data.

How is the plan value calculated? Each run of a session (one Claude Code process with Quanta Costa loaded) records its first and its highest API-equivalent cost reading for the current billing period (or calendar month without billingDay) in a small file on your machine (~/.claude/quanta-costa/value.json), shared by all sessions. The Value row adds up what every run added and divides by planPrice. A resumed session counts with every run and never twice, whether Claude Code carries its cost over or starts from zero. If counting began after the period started, the row says since when. Only sessions where Quanta Costa ran are counted, so the real value is usually higher.

Value looked too high before 1.6.1. Versions 1.5.2 to 1.6.0 could count a session's cost twice when several sessions wrote the shared file at the same moment. 1.6.1 fixes it; the FAQ says how to start clean.

My settings do not show up (only two rows, dollars instead of euros). Claude Code hands a plugin the options stored under the name it loaded the plugin by. The Claude desktop app loads a plugin installed from a local folder as quanta-costa@inline, while claude plugin configure stores the options as quanta-costa@<marketplace>, so only defaults arrive. Since 1.3.2 Quanta Costa notices this and reads its own entry from ~/.claude/settings.json (pluginConfigs, under any of its names). The last line of the help shows the active settings and the version, so you can check that they arrived.

Why is there no Period row? Claude Code does not know your billing date. Set billingDay once and the row appears.

Why do the tokens start at zero mid-session? Tokens are summed from the moment the plugin loads. The dollar or euro amount is Claude Code's own total for the session, the same as /cost; a resumed session usually carries its earlier cost over.

Does it send my data anywhere? No. It reads Claude Code's own usage figures through the plugin API and draws them. The value ledger stays in a local file. If Claude Code hands over no settings, it reads its own pluginConfigs entry from Claude's settings file and nothing else. Nothing leaves your machine.

How is it different from ccusage? ccusage analyses Claude Code's log files after the fact, from the command line. Quanta Costa lives inside Claude Code and shows the live numbers while you work.

Requirements

Claude Code 2.1.293 or newer. Quanta Costa uses Claude Code's function-hooks plugin API, which is in early access and may change between releases.

Deutsch

Quanta Costa zeigt in Claude Code direkt über dem Prompt, wie viel von deinem Claude-Abo noch frei ist (Woche und Abrechnungsperiode als Balken), ob deine Woche bei diesem Tempo reicht, was die laufende Sitzung in Tokens und Euro kosten würde und ob sich dein Abo lohnt. Mit Abo sind die Kosten theoretisch: Sie zählen nur gegen dein Wochenkontingent. Installation wie oben. Für die deutsche Oberfläche language auf de stellen, für Euro currency auf EUR, billingDay auf deinen Abrechnungstag und planPrice auf deinen Abo-Preis.

License

MIT, see LICENSE. Made by Jörg Wukonig, Wukonig & Partner.

About

🧾 Claude Code plugin: your Claude Pro/Max usage limits with a pace forecast, billing period, session cost in tokens and $/€, and whether your plan pays off, right above the prompt.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages