lk-token-budget

by connectwithub · ★ 1 · updated 9 days ago

PanesBandsGuardsCommandsPromptwarnings

0

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.

install lk-token-budget

Install

/plugin marketplace add connectwithub/loopkeeper
/plugin install lk-token-budget@loopkeeper

Then run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.

View source on GitHub

What it hooks into

From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.

Events
session.startclassic.SessionStartsession.compactprompt.submitsession.endturn.stepturn.startturn.completeagent.spawntool.callcommand.runui.render
API calls
$.clock.every$.clock.now$.command.register$.env.get$.fs.exists$.fs.read$.model.fork$.session.id$.session.usage$.state.get$.state.set$.store.get$.store.set$.ui.close$.ui.invalidate$.ui.log$.ui.open$.ui.resolve$.ui.toast
Draws
AbovePromptPane
Can see
classic hookscompactionevery promptsubagent spawnsevery tool call
Reach
level 2 of 3 drives Claudereads filesreads env varsreads mod statepersists statedraws

Origin

How it got here
Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
Repository
github.com/connectwithub/loopkeeper
Path in repo
plugins/lk-token-budget
Source commit
99c46cb the exact code the scan read
Author
@connectwithub
License
A license file GitHub could not identify — read it in the repository before reusing code.
First published
Last pushed
First listed here

Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.

More from connectwithub/loopkeeper

lk-agent-map

connectwithub/loopkeeper

See and cap your subagents: cards with cost, tokens, context and progress, spawn caps with an override you approve, tree and team views, idle alerts and a Stop button.

★ 1PanesBandsGuards

lk-attention

connectwithub/loopkeeper

Look away while Claude works: a GNOME notification, a sound, a toast and a band when it needs you or finishes something long, plus an /lk-attention inbox.

★ 1PanesBandsReskins

lk-handoff-guard

connectwithub/loopkeeper

Never lose a session to the context limit: it watches context fill, writes a handoff into .claude/brain/ in time, then clears and resumes from it.

★ 1PanesBandsGuards

lk-pr-watch

connectwithub/loopkeeper

Know when CI breaks without leaving the session: PR and check state above the prompt, a /lk-prs pane, toasts on changes and a note to Claude when a check fails.

★ 1PanesBandsGuards

lk-secret-guard

connectwithub/loopkeeper

A seatbelt for secrets: stops credential-shaped strings and your private deny-list of words before Claude writes them into files or shell commands.

★ 1PanesBandsGuards

lk-where-am-i

connectwithub/loopkeeper

Know where the session is at a glance: repo, branch, worktree, uncommitted and unpushed work, usage windows and the prompt cache in one line above the prompt.

★ 1PanesBandsCommands

loopkeeper

connectwithub/loopkeeper

Keep Claude Code on a plan: stages, approval gates and a plan-scoped file budget enforced by hooks, plus model routing, review loops and a decision log.

★ 1Other