anantraghunath/claude-code-usage-quota-mod

Know your Claude limits before they hit you (Live band above the Claude Code prompt): 5 Hour and Weekly usage (whole account) with a live usage forecast against limit resets, context window usage, one-click Compact and per-session Auto compact (30% default).

TypeScript

1

43 commits

updated Oct 4, 2026

See the code

See what people are saying

SourceMessageScoreDate

I made a Mod that shows your 5h/weekly usage live, a reset forecast and context % above the prompt box, with optional auto compact and a manual compact button (r/ClaudeAI)

I used to keep checking my usage way too often. Settings, the usage page, `/usage`, or the little circle for the Context usage. I also kept forgetting to compact until the context was huge and my limits were draining faster. When I found out yesterday that Claude Mods have landed, I built a small…

2

Oct 4, 2026

README

Claude Code Usage Quota Mod with Auto Compact

Version: v0.1.3 Auto compact: 30% default Compact: one click 5 Hour + Weekly: whole account Forecast: before reset Works in: Desktop + Terminal License: MIT

Know your Claude limits before they hit you. A live band above the Claude Code prompt that shows your plan limits, forecasts whether you'll run out before they reset, and shows how full your context window is. Compact in one click, or let it compact automatically.

The 5 Hour and Weekly limits are your whole Claude account's, including what you use in Claude chat and Cowork. The band itself shows in Claude Code: the desktop app and the terminal.

Type /quota to turn the band off and on.

Expanded

The band, expanded, above the prompt in the Claude desktop app

Collapsed

One row that still shows the time left until each limit resets:

The band, collapsed, above the prompt in the Claude desktop app

[!TIP] Never hit a full context again: Auto compact, on by one click. With Auto compact on, the band compacts your session once the context reaches 30% (the default; set 15 to 99). A long context costs more on every reply, so compacting early keeps replies cheaper and your limits lasting longer. Auto compact never interrupts a reply. Want to compact right now? The Compact button runs /compact in one click.

Each session keeps its own Auto compact setting, even after a restart, so you can run them differently side by side:

  • Building something big? Set Auto compact higher (say 70%) or turn it off, so Claude keeps the whole picture. Press Compact yourself at a good stopping point. (With it off, Claude Code's built-in compaction still steps in when the context is nearly full.)
  • Everyday sessions? One click turns Auto compact on at 30%. They stay lean, and your 5 Hour and Weekly limits last longer.

What it shows

5 Hour and Weekly limits

  • The % used, matching the app's own Plan usage limits panel.
  • A forecast of where you'll be at reset: a grey tick on the bar and a note, e.g. On pace for about 87% by reset – resets in 23m.
  • A headline at a glance: On track. You should reach Wednesday's reset with room to spare.
  • The forecast starts from your usual pace (learned from your past windows) and shifts to your actual pace as the window goes on, so an early burst doesn't set it off.
  • Bars turn amber at 75% and red at 90%, or sooner if you're on course to run out.

On course to run out, it warns you and says when you'll hit the limit:

The band, expanded, on course to run out before the 5 hour reset

The band, collapsed, on course to run out

Context window

  • The % used and space free, as /context counts it, split into Messages, Tools and Other.
  • Amber at 50%, red at 80%: the point to compact.

Compacting

  • Compact runs /compact in one click.
  • Auto compact runs at your % (30% by default, 15 to 99), never mid-reply. Each session keeps its own setting; a new session starts with it off.

If the session is already past your % when you turn it on, it asks first:

Auto compact asking what to do, with the context already at 72%

The same question with the band collapsed

  • Now compacts straight away.
  • After my next compact waits until the session is compacted some other way (Compact, /compact, or Claude Code's own), then takes over.
  • Only in new chats leaves this session alone until it's next opened.

Works in light and dark themes and at every width down to the narrowest. Collapsed or expanded is shared across all sessions.

MORE SCREENSHOTS

Early in a 5 hour window:

The band, expanded, early in a 5 hour window

The band, collapsed, early in a 5 hour window

Running out on the Weekly limit:

The band, expanded, on course to run out before the weekly reset

The band, collapsed, on course to run out before the weekly reset

Light themeNarrowest window
Light, expandedNarrow, expanded
Light, collapsedNarrow, collapsed

Where it works

  • Claude desktop app, Code tab
  • Claude Code in a terminal

[!NOTE] In the desktop app, the band appears once a session has started. The brand-new Welcome back screen has no session yet, so no mod can draw there. Send your first message and it appears.

In the terminal, ▲/▼ expands and collapses it. The [-] next to it is Claude Code's own control and hides the band; ctrl+x ctrl+a brings it back.

The band in the terminal, expanded

Terminal, collapsed

The band in the terminal, collapsed

Install

Needs a recent Claude Code, signed in with a Pro or Max plan.

Desktop app: in the Code tab, send this as a message, allow the claude plugin command if asked, then quit and reopen the app:

Install the claude-code-usage-quota plugin from the GitHub marketplace anantraghunath/claude-code-usage-quota-mod

Terminal: inside claude, run:

/plugin install claude-code-usage-quota --marketplace anantraghunath/claude-code-usage-quota-mod

Either way installs it for both the desktop app and the terminal.

Update: ask Claude, then restart:

Update the claude-code-usage-quota plugin from its marketplace

Uninstall: in the desktop app, ask Claude:

Remove the claude-code-usage-quota-mod plugin marketplace

or in the terminal:

/plugin marketplace remove claude-code-usage-quota-mod

then restart. This removes it from both. Just want it out of sight? /quota hides it without uninstalling.

From your own shell instead
claude plugin marketplace add anantraghunath/claude-code-usage-quota-mod; claude plugin install claude-code-usage-quota@claude-code-usage-quota-mod

To update:

claude plugin marketplace update claude-code-usage-quota-mod; claude plugin update claude-code-usage-quota@claude-code-usage-quota-mod

To uninstall:

claude plugin marketplace remove claude-code-usage-quota-mod

Privacy

Everything runs on your machine. It reads what Claude Code already has (your context and the limits each reply carries), and about every 2 minutes asks Anthropic's usage service for your limits through your existing Claude login. It never sees your credentials and sends nothing anywhere else. In the desktop app it reads the app's theme setting to match light or dark.

Feedback and contributing

First release: I'd love to hear how it works for you. Open an issue for bugs or ideas. Pull requests welcome.

To work on it, clone the repo, then load it from the folder, or run its tests:

claude --plugin-dir ./claude-code-usage-quota-mod
claude plugin test ./claude-code-usage-quota-mod

If you find it useful, a ⭐ helps others find it.

Credits

Inspired by I'm liking the new mods feature on r/ClaudeCode. Thanks to u/itsxzy for sharing the original prompt that started this project.

License

MIT © 2026 Anant Raghunath

ai-tools
anthropic
claude
claude-code
claude-code-plugin
developer-tools
rate-limit
usage-tracker

anantraghunath/claude-code-usage-quota-mod

Know your Claude limits before they hit you (Live band above the Claude Code prompt): 5 Hour and Weekly usage (whole account) with a live usage forecast against limit resets, context window usage, one-click Compact and per-session Auto compact (30% default).

TypeScript

1

43 commits

updated Oct 4, 2026

See the code

See what people are saying

SourceMessageScoreDate

I made a Mod that shows your 5h/weekly usage live, a reset forecast and context % above the prompt box, with optional auto compact and a manual compact button (r/ClaudeAI)

I used to keep checking my usage way too often. Settings, the usage page, `/usage`, or the little circle for the Context usage. I also kept forgetting to compact until the context was huge and my limits were draining faster. When I found out yesterday that Claude Mods have landed, I built a small…

2

Oct 4, 2026

README

Claude Code Usage Quota Mod with Auto Compact

Version: v0.1.3 Auto compact: 30% default Compact: one click 5 Hour + Weekly: whole account Forecast: before reset Works in: Desktop + Terminal License: MIT

Know your Claude limits before they hit you. A live band above the Claude Code prompt that shows your plan limits, forecasts whether you'll run out before they reset, and shows how full your context window is. Compact in one click, or let it compact automatically.

The 5 Hour and Weekly limits are your whole Claude account's, including what you use in Claude chat and Cowork. The band itself shows in Claude Code: the desktop app and the terminal.

Type /quota to turn the band off and on.

Expanded

The band, expanded, above the prompt in the Claude desktop app

Collapsed

One row that still shows the time left until each limit resets:

The band, collapsed, above the prompt in the Claude desktop app

[!TIP] Never hit a full context again: Auto compact, on by one click. With Auto compact on, the band compacts your session once the context reaches 30% (the default; set 15 to 99). A long context costs more on every reply, so compacting early keeps replies cheaper and your limits lasting longer. Auto compact never interrupts a reply. Want to compact right now? The Compact button runs /compact in one click.

Each session keeps its own Auto compact setting, even after a restart, so you can run them differently side by side:

  • Building something big? Set Auto compact higher (say 70%) or turn it off, so Claude keeps the whole picture. Press Compact yourself at a good stopping point. (With it off, Claude Code's built-in compaction still steps in when the context is nearly full.)
  • Everyday sessions? One click turns Auto compact on at 30%. They stay lean, and your 5 Hour and Weekly limits last longer.

What it shows

5 Hour and Weekly limits

  • The % used, matching the app's own Plan usage limits panel.
  • A forecast of where you'll be at reset: a grey tick on the bar and a note, e.g. On pace for about 87% by reset – resets in 23m.
  • A headline at a glance: On track. You should reach Wednesday's reset with room to spare.
  • The forecast starts from your usual pace (learned from your past windows) and shifts to your actual pace as the window goes on, so an early burst doesn't set it off.
  • Bars turn amber at 75% and red at 90%, or sooner if you're on course to run out.

On course to run out, it warns you and says when you'll hit the limit:

The band, expanded, on course to run out before the 5 hour reset

The band, collapsed, on course to run out

Context window

  • The % used and space free, as /context counts it, split into Messages, Tools and Other.
  • Amber at 50%, red at 80%: the point to compact.

Compacting

  • Compact runs /compact in one click.
  • Auto compact runs at your % (30% by default, 15 to 99), never mid-reply. Each session keeps its own setting; a new session starts with it off.

If the session is already past your % when you turn it on, it asks first:

Auto compact asking what to do, with the context already at 72%

The same question with the band collapsed

  • Now compacts straight away.
  • After my next compact waits until the session is compacted some other way (Compact, /compact, or Claude Code's own), then takes over.
  • Only in new chats leaves this session alone until it's next opened.

Works in light and dark themes and at every width down to the narrowest. Collapsed or expanded is shared across all sessions.

MORE SCREENSHOTS

Early in a 5 hour window:

The band, expanded, early in a 5 hour window

The band, collapsed, early in a 5 hour window

Running out on the Weekly limit:

The band, expanded, on course to run out before the weekly reset

The band, collapsed, on course to run out before the weekly reset

Light themeNarrowest window
Light, expandedNarrow, expanded
Light, collapsedNarrow, collapsed

Where it works

  • Claude desktop app, Code tab
  • Claude Code in a terminal

[!NOTE] In the desktop app, the band appears once a session has started. The brand-new Welcome back screen has no session yet, so no mod can draw there. Send your first message and it appears.

In the terminal, ▲/▼ expands and collapses it. The [-] next to it is Claude Code's own control and hides the band; ctrl+x ctrl+a brings it back.

The band in the terminal, expanded

Terminal, collapsed

The band in the terminal, collapsed

Install

Needs a recent Claude Code, signed in with a Pro or Max plan.

Desktop app: in the Code tab, send this as a message, allow the claude plugin command if asked, then quit and reopen the app:

Install the claude-code-usage-quota plugin from the GitHub marketplace anantraghunath/claude-code-usage-quota-mod

Terminal: inside claude, run:

/plugin install claude-code-usage-quota --marketplace anantraghunath/claude-code-usage-quota-mod

Either way installs it for both the desktop app and the terminal.

Update: ask Claude, then restart:

Update the claude-code-usage-quota plugin from its marketplace

Uninstall: in the desktop app, ask Claude:

Remove the claude-code-usage-quota-mod plugin marketplace

or in the terminal:

/plugin marketplace remove claude-code-usage-quota-mod

then restart. This removes it from both. Just want it out of sight? /quota hides it without uninstalling.

From your own shell instead
claude plugin marketplace add anantraghunath/claude-code-usage-quota-mod; claude plugin install claude-code-usage-quota@claude-code-usage-quota-mod

To update:

claude plugin marketplace update claude-code-usage-quota-mod; claude plugin update claude-code-usage-quota@claude-code-usage-quota-mod

To uninstall:

claude plugin marketplace remove claude-code-usage-quota-mod

Privacy

Everything runs on your machine. It reads what Claude Code already has (your context and the limits each reply carries), and about every 2 minutes asks Anthropic's usage service for your limits through your existing Claude login. It never sees your credentials and sends nothing anywhere else. In the desktop app it reads the app's theme setting to match light or dark.

Feedback and contributing

First release: I'd love to hear how it works for you. Open an issue for bugs or ideas. Pull requests welcome.

To work on it, clone the repo, then load it from the folder, or run its tests:

claude --plugin-dir ./claude-code-usage-quota-mod
claude plugin test ./claude-code-usage-quota-mod

If you find it useful, a ⭐ helps others find it.

Credits

Inspired by I'm liking the new mods feature on r/ClaudeCode. Thanks to u/itsxzy for sharing the original prompt that started this project.

License

MIT © 2026 Anant Raghunath

ai-tools
anthropic
claude
claude-code
claude-code-plugin
developer-tools
rate-limit
usage-tracker

Languages

TypeScript

100.0%