What is lk-token-budget?
lk-token-budget is a Claude Code mod by connectwithub that stop runaway token spend: budgets per session and per subagent with warn, deny-agents or stop actions, plus a prompt-cache countdown, cold-cache pings and keep-warm. It is listed under Security and has 1 GitHub stars.
| Type | Claude code mod |
|---|---|
| Author | connectwithub |
| Repository | connectwithub/loopkeeper |
| Popularity | 1 GitHub stars |
| Category | Security |
| Security | Review before installing (64/100) |
| Rank | #3,456 of 9,397 Claude Code mods; #431 in Security |
| Last commit | 2026-11-12 |
| Hooks | 12 events |
| Sees | classic hooks, compaction, every prompt, every tool call, subagent spawns |
| Draws on | AbovePrompt, Pane |
Is lk-token-budget safe to install?
lk-token-budget scores 64/100 on the MCPMods security check: Review before installing. Things to review: reads environment variables; watches every prompt or event. It passed 3 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.
| Check | Result |
|---|---|
| No network access | Pass |
| Starts no processes | Pass |
| Writes no files or config | Pass |
| Reads environment variables | Review |
| Watches every prompt or event | Review |
| Drives Claude (model calls, prompts) | Note |
| Validator reported problems | Note |
| No license detected | Note |
API calls in its code
| Call | What it means |
|---|---|
$.clock.every | |
$.clock.now | |
$.command.register | |
$.env.get | reads env vars |
$.fs.exists | reads files |
$.fs.read | reads files |
$.model.fork | drives Claude |
$.session.id | |
$.session.usage | |
$.state.get | |
$.state.set | |
$.store.get | keeps its own state |
$.store.set | keeps its own state |
$.ui.close | draws interface |
$.ui.invalidate | draws interface |
$.ui.log | draws interface |
$.ui.open | draws interface |
$.ui.resolve | draws interface |
$.ui.toast | draws interface |
How do I install lk-token-budget?
- Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
claude --version
- Read its footprint. This lists every event it hooks and every API call it makes, without running it.
git clone https://github.com/connectwithub/loopkeeper claude plugin validate ./loopkeeper/plugins/lk-token-budget
- Install it. Run this in your terminal, then /reload-plugins in an open session.
claude plugin marketplace add connectwithub/loopkeeper && claude plugin install lk-token-budget@loopkeeper
Or ask Claude to set it up
Paste this into Claude Code and it installs lk-token-budget for you:
Install the "lk-token-budget" Claude Code mod from https://github.com/connectwithub/loopkeeper/tree/main/plugins/lk-token-budget. Run claude plugin validate on it first and show me what it can access before you enable it.
More from connectwithub/loopkeeper
This repository has 8 Claude Code mods on MCPMods.
- lk-agent-map: See and cap your subagents: cards with cost, tokens, context and progress, spawn caps with an override you approve, tree (Review before installing)
- lk-attention: Look away while Claude works: a GNOME notification, a sound, a toast and a band when it needs you or finishes something (High risk)
- lk-handoff-guard: Never lose a session to the context limit: it watches context fill, writes a handoff into .claude/brain/ in time, then c (High risk)
- lk-pr-watch: Know when CI breaks without leaving the session: PR and check state above the prompt, a /lk-prs pane, toasts on changes (High risk)
- lk-secret-guard: A seatbelt for secrets: stops credential-shaped strings and your private deny-list of words before Claude writes them in (Low risk)
- lk-where-am-i: Know where the session is at a glance: repo, branch, worktree, uncommitted and unpushed work, usage windows and the prom (Review before installing)
- loopkeeper: Keep Claude Code on a plan: stages, approval gates and a plan-scoped file budget enforced by hooks, plus model routing, (Low risk)