Home / Claude Code mods / Security / context-budget

context-budget

context-budget is a Claude Code mod by MichaelP17 that measures what every session starts with, warns when CLAUDE.md, rules, memory or skill descriptions outgrow their budget, and asks for a context audit when a new model arrives.

Updated 2026-11-30

What is context-budget?

context-budget is a Claude Code mod by MichaelP17 that measures what every session starts with, warns when CLAUDE.md, rules, memory or skill descriptions outgrow their budget, and asks for a context audit when a new model arrives. It is listed under Security and has 2 GitHub stars.

TypeClaude code mod
AuthorMichaelP17
RepositoryMichaelP17/claude-mods
Popularity2 GitHub stars
CategorySecurity
SecurityReview before installing (72/100)
Rank#2,985 of 9,397 Claude Code mods; #380 in Security
LicenseMIT
Last commit2026-11-30
Hooks3 events
Seesonly the events it hooks
Draws onnothing

Is context-budget safe to install?

context-budget scores 72/100 on the MCPMods security check: Review before installing. Things to review: writes files or config; reads environment variables. It passed 5 of 8 checks.

Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.

CheckResult
No network accessPass
Starts no processesPass
Writes files or configReview
Reads environment variablesReview
Only sees the events it hooksPass
Drives Claude (model calls, prompts)Note
Passes claude plugin validatePass
Has an open-source licensePass

API calls in its code

CallWhat it means
$.clock.now
$.env.getreads env vars
$.fs.readreads files
$.fs.writewrites files
$.hub.set
$.prompt.submitdrives Claude
$.session.model
$.session.root
$.session.usage
$.store.getkeeps its own state
$.store.setkeeps its own state
$.ui.toastdraws interface

How do I install context-budget?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. Read its footprint. This lists every event it hooks and every API call it makes, without running it.
    git clone https://github.com/MichaelP17/claude-mods
    claude plugin validate ./claude-mods/context-budget
  3. Install it. Run this in your terminal, then /reload-plugins in an open session.
    git clone https://github.com/MichaelP17/claude-mods && claude --plugin-dir ./claude-mods/context-budget

Or ask Claude to set it up

Paste this into Claude Code and it installs context-budget for you:

Install the "context-budget" Claude Code mod from https://github.com/MichaelP17/claude-mods/tree/main/context-budget. Run claude plugin validate on it first and show me what it can access before you enable it.

More from MichaelP17/claude-mods

This repository has at least 9 Claude Code mods on MCPMods.

  • cache-watch: Shows how long the prompt cache stays warm (Low risk)
  • compact-shaper: Summarizes compactions as a handoff, and cuts re-readable tool output instead on /compact prune (Low risk)
  • concurrency-guard: Caps parallel subagents and monitors; more need a stated reason and the user's approval (Low risk)
  • config-snapshots: Snapshot and roll back the Claude Code configuration through claude-config (Review before installing)
  • context-rollover: Tells subagents and the orchestrator to hand off once their context passes a share of its window or they run too long, i (Low risk)
  • grill-panel: Answers Claude's numbered question rounds one by one in a panel, keeps confirmed answers across restarts, and sends them (Low risk)
  • idea-shell: Captures ideas per folder with /idea while Claude keeps working, and hands them to Claude later (Review before installing)
  • machine-guard: Puts every command that changes the machine in front of the user before it runs (Low risk)