By arunjay4213
Session trackers and a budget guard for Claude Code, built as mods (function hooks): what fills your context, how fast you burn your plan quota, what each turn costs, and a stop before you pass a limit you set.
Trending marketplaces
7-day visitors to each marketplace page
npx claudepluginhub arunjay4213/claude-modsA live /context: a pinned line under the prompt with the window fill and the growth per turn, and /context-lens for a pane with the per-category bars and how many turns are left before auto-compaction.
Shows the subscription plan limits - the 5-hour window, the 7-day window and a gateway spend limit - as a pinned status line under the prompt, with a reset countdown and a projection of when you would hit 100% at the pace of the last few samples. /quota opens a pane with a bar, the reset clock time and the burn rate for each window.
A per-turn cost and token ledger: a pinned status line with the session cost, the last turn's tokens and the cache hit ratio, and /ledger for a table of the recent turns with their model, tokens, cache reads and writes, duration and cost.
Stops a session before it runs past a budget. Three figures are guarded, each with a limit you set: the session cost in dollars, the 5-hour plan window and the 7-day plan window. It says nothing until a figure nears its limit, then pins a status line and warns once; past the limit it refuses tool calls and asks before sending another prompt. /guard shows the state and changes the limits.
Three session trackers and a budget guard for Claude Code, built as mods. A mod is a Claude Code plugin whose behaviour is TypeScript running inside Claude Code's engine (the feature Anthropic calls function hooks). Each one keeps a number on screen that you would otherwise have to run a command to see.

| Mod | Pinned line under the prompt | Pane command |
|---|---|---|
context-lens | context window used, growth per turn, turns left before compaction | /context-lens |
quota-meter | 5-hour and 7-day plan limits, reset countdown, projected time until the limit | /quota |
token-ledger | session cost, last turn's cost, tokens in and out, cache hit ratio | /ledger |
budget-guard | only while near a limit: cost and plan-window use against the limits you set; past a limit it refuses tool calls and asks before the next prompt | /guard |
Mods are early access.
They only load when function hooks are switched on, so add this to ~/.claude/settings.json first:
{
"env": {
"CLAUDE_CODE_ENABLE_FUNCTION_HOOKS": "1"
}
}
Then add the marketplace and install the ones you want:
claude plugin marketplace add Arunjay4213/claude-mods
claude plugin install context-lens@claude-mods
claude plugin install quota-meter@claude-mods
claude plugin install token-ledger@claude-mods
claude plugin install budget-guard@claude-mods
Restart Claude Code. The pinned lines appear after the first answer of the session.
quota-meter needs a Claude subscription (Pro, Max, Team or Enterprise).
API-key sessions report no plan limits, so it shows a short note instead.git clone https://github.com/Arunjay4213/claude-mods
cd claude-mods
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude --plugin-dir plugins/token-ledger
Each plugin is .claude-plugin/plugin.json, hooks/hooks.json naming the module, and TypeScript under hooks/.
The type declarations in .claude/types/claude-code.d.ts come from the /plugin-types command inside Claude Code, so after an update, regenerate them instead of editing them by hand.
npm install
npx tsc -p tsconfig.json # typecheck every mod
claude plugin validate plugins/quota-meter
The function hooks API is early access and may change between Claude Code releases. These mods follow the structure of Anthropic's own mods, which are at https://github.com/anthropics/claude-code/tree/main/mods.
MIT
7-day visitors to each marketplace page
Anthropic example skills
Anthropic's Claude Code plugins, installed from the claude-plugins-official repository
Ultra-compressed communication mode. Shortens prose while preserving technical terms, code, commands, and exact errors.