claude-mods

skill
Security Audit
Warn
Health Warn
  • No license — Repository has no license file
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 9 GitHub stars
Code Pass
  • Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Claude Code mods that keep context use, plan quota and per-turn cost on screen, plus a guard that stops a session once it goes over budget.

README.md

claude-mods

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.

The three mods updating after a turn, then the /ledger and /quota panes

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

Install

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.

Requirements

  • Claude Code 2.1.269 or newer, in an interactive terminal.
  • 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.
  • The pane docks beside the transcript from 110 columns wide and opens above the prompt on narrower terminals.

Try one from source

git clone https://github.com/Arunjay4213/claude-mods
cd claude-mods
CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude --plugin-dir plugins/token-ledger

Development

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.

License

MIT

Reviews (0)

No results found