Status line with context %, session cost and rate limits; warns before you hit the wall.

Eleven mods for Claude Code. Install the ones you want; each is independent.

repo-radar draws your repo as a live map of rectangles, one per folder. Reads glow cyan, edits amber, failures red, and each subagent gets its own colour, so you can watch parallel agents work across your codebase. Glows fade like a radar trace; files touched this session keep a faint tint. /radar opens it. More →
/plugin marketplace add lakmadev/claude-mods
/plugin install repo-radar@claude-mods
![]()
| Mod | What it does |
|---|---|
| pixel-pet | A tiny animated pixel pet above your prompt. It sleeps (snoring) when things are quiet and wakes slowly when you type. It narrates what Claude is doing with a sliding status line, hatches half-size helpers in their own colours for each subagent that slide into the meter line one by one and wave bye when done. It watches you type, and you click it to pet it. A gradient context meter with your 5-hour and weekly usage sits beside it, details on hover. 28 colours via /pet color <name>. |
| code-wrapped | /wrapped opens your Claude Code Wrapped: a GitHub-style activity heatmap, hours, lines, streaks, top files and tools, your coding personality (Night Owl 🦉, Refactorer 🧹, Shell Wizard 🧙…) and 14 unlockable achievements that pop as toasts. Copy share text puts a one-line brag on your clipboard. |
| lofi-mode | Soft lo-fi beats start when Claude has been working for a few seconds and stop when it finishes. The loop is original and synthesized for this mod. /lofi toggles it. macOS audio. |
| Mod | What it does | |
|---|---|---|
| context-meter | A plain status line: ctx 62% · 5h 85% resets 1h52m · week 40% on a Claude plan (the reset shows once a window passes 70%), or ctx 62% · $1.84 billed (API) when you pay per token. Toasts when context passes 80% or a plan window passes 90%. | |
| safety-net | Refuses catastrophic commands (rm -rf ~, mkfs, dd of=/dev/disk, fork bombs). Asks before risky ones (force-push, reset --hard, `curl \ | sh, DROP TABLE, terraform destroy, sudo, …) and before edits to .env, keys, ~/.ssh, .git/` or shell rc files. |
| changes-pane | Side pane listing every file Claude changed this session with +/- line counts. /changes opens it. | |
| done-notifier | Chime, toast and desktop notification when a turn longer than 30s finishes or Claude is waiting for you. | |
| prompt-booster | Short prompts ("fix it") get your branch, changed files and recent commits as hidden context. Adds /fix-tests, /explain-code, /review-changes, /write-tests, /commit-msg. | |
| session-journal | Logs each turn (project, prompt, files touched) across sessions. /journal [days] lists it; /standup [days] writes a Done / In progress / Blockers update. | |
| secrets-redactor | Replaces API keys, tokens, private keys and connection-string passwords with [REDACTED:kind] in your prompts and in tool output before the model sees them, and blocks writing a placeholder back over a real secret. |
Requires Claude Code 2.1.293 or later: mods are an early-access feature and gain events with each release. Check with claude --version; update with claude update.
In a Claude Code terminal session:
/plugin marketplace add lakmadev/claude-mods
/plugin install pixel-pet@claude-mods
The first line adds this repo as a plugin marketplace (once); the second installs a mod from it. Repeat the second line with any other mod name from the table.
Each mod's options show in /config once it is installed:
contextWarnPercent (80), rateLimitWarnPercent (90)strict (off). Turns every "ask" into a refusal. Turn it on if you run in auto or bypass-permissions mode, where an ask can be approved without you.autoOpen (on). The pane opens on its own only in terminals 144+ columns wide.minSeconds (30), sound (on), desktop (on)autoContext (on), maxWords (15)retentionDays (30), model (haiku)aggressive (off). Also redacts quoted password = "…"-style assignments.name (Bit), color (teal)volume (0.35), delaySeconds (4)eval, base64, aliases) get through.osascript (macOS) or notify-send (Linux)./standup sends the log to the model you configure.Each mod lives in plugins/<name>/: hooks/register.ts(x) is the code and tests/ holds its tests.
claude plugin validate plugins/<name>
claude plugin test plugins/<name>
claude --plugin-dir plugins/<name>
MIT, see LICENSE.
hooks/register.ts 104 lines1import type { Register, SessionMeasureInput } from 'claude-code'
2
3type Reading = Pick<SessionMeasureInput, 'context' | 'rateLimits' | 'cost'>
4type Source = 'plan' | 'gateway' | 'api' | 'bedrock' | 'vertex' | 'foundry'
5
6// A Claude plan meters usage in a rolling 5-hour window and a weekly one; a gateway may set a spend
7// limit. Neither comes back on the API or a cloud provider, which bill per token instead.
8const LIMIT_NAMES: Record<string, string> = { five_hour: '5h limit', seven_day: 'weekly', seven_day_opus: 'weekly (Opus)', spend_limit: 'spend limit' }
9const SHORT_NAMES: Record<string, string> = { five_hour: '5h', seven_day: 'week', seven_day_opus: 'week (Opus)', spend_limit: 'spend' }
10const SOURCE_NAMES: Record<Source, string> = { plan: 'Claude plan', gateway: 'gateway', api: 'API', bedrock: 'Bedrock', vertex: 'Vertex AI', foundry: 'Foundry' }
11
12
13// "1h52m", "38m", "3d4h": how long until a window resets.
14export function resetIn(resetsAt: string | undefined, now: number): string | undefined {
15 if (!resetsAt) return undefined
16 const ms = Date.parse(resetsAt) - now
17 if (!(ms > 0)) return undefined
18 const m = Math.round(ms / 60_000)
19 if (m < 60) return `${m}m`
20 if (m < 24 * 60) return `${Math.floor(m / 60)}h${String(m % 60).padStart(2, '0')}m`
21 const h = Math.round(m / 60)
22 return `${Math.floor(h / 24)}d${h % 24 ? `${h % 24}h` : ''}`
23}
24
25export function sourceOf({ context, rateLimits }: Reading, provider: Source): Source | undefined {
26 if (rateLimits.some(r => r.kind === 'five_hour' || r.kind.startsWith('seven_day'))) return 'plan'
27 if (rateLimits.some(r => r.kind === 'spend_limit')) return 'gateway'
28 return context.percent !== undefined ? provider : undefined
29}
30
31// "ctx 62% · 5h 85% resets 1h52m · week 40%": plain words and numbers, which read the same in any
32// font (block gauges don't line up in the desktop's). A window's reset shows once it's past 70%.
33// On a plan the $ is only an API-rate estimate, so it's left out; elsewhere it's the bill.
34export function formatMeter({ context, rateLimits, cost }: Reading, source: Source | undefined, now: number): string {
35 const parts: string[] = []
36 if (context.percent !== undefined) parts.push(`ctx ${context.percent}%`)
37 for (const limit of rateLimits) {
38 const reset = limit.percentUsed >= 70 ? resetIn(limit.resetsAt, now) : undefined
39 parts.push(`${SHORT_NAMES[limit.kind] ?? limit.kind} ${Math.round(limit.percentUsed)}%${reset ? ` resets ${reset}` : ''}`)
40 }
41 if (cost && source && source !== 'plan') parts.push(`$${cost.usd.toFixed(2)} billed (${SOURCE_NAMES[source]})`)
42 else if (cost && !source) parts.push(`$${cost.usd.toFixed(2)}`)
43 return parts.join(' · ')
44}
45
46// Warns once per crossing; a reading back under the threshold (after /compact, a window reset) re-arms it.
47export function warnings(
48 { context, rateLimits }: Reading,
49 thresholds: { context: number; rateLimit: number },
50 warned: Set<string>,
51 now = Date.now(),
52): string[] {
53 const out: string[] = []
54 const check = (key: string, value: number, limit: number, message: string) => {
55 if (value < limit) warned.delete(key)
56 else if (!warned.has(key)) {
57 warned.add(key)
58 out.push(message)
59 }
60 }
61 if (context.percent !== undefined) {
62 check('ctx', context.percent, thresholds.context, `Context is ${context.percent}% full. Consider /compact or a fresh session.`)
63 }
64 for (const limit of rateLimits) {
65 const reset = resetIn(limit.resetsAt, now)
66 const name = LIMIT_NAMES[limit.kind] ?? limit.kind
67 check(`rl:${limit.kind}`, limit.percentUsed, thresholds.rateLimit, `Your Claude plan's ${name} is at ${Math.round(limit.percentUsed)}%${reset ? `; it resets in ${reset}` : ''}.`)
68 }
69 return out
70}
71
72export const register: Register = (on, options) => {
73 const thresholds = {
74 context: Number(options.contextWarnPercent ?? 80),
75 rateLimit: Number(options.rateLimitWarnPercent ?? 90),
76 }
77 const warned = new Set<string>()
78 let provider: Source = 'api'
79 let source: Source | undefined
80
81 on('session.start', async ($, e, next) => {
82 const started = await next(e)
83 // Which provider bills the tokens, from the switches Claude Code reads (never a key).
84 if (await $.env.get('CLAUDE_CODE_USE_BEDROCK').catch(() => undefined)) provider = 'bedrock'
85 else if (await $.env.get('CLAUDE_CODE_USE_VERTEX').catch(() => undefined)) provider = 'vertex'
86 else if (await $.env.get('CLAUDE_CODE_USE_FOUNDRY').catch(() => undefined)) provider = 'foundry'
87 const reading = await $.session.usage()
88 const now = await $.clock.now()
89 source = sourceOf(reading, provider) ?? source
90 $.ui.status(formatMeter(reading, source, now) || undefined)
91 for (const message of warnings(reading, thresholds, warned, now)) $.ui.toast(message)
92 return started
93 })
94
95 on('session.measure', async ($, e, next) => {
96 const measured = await next(e)
97 const now = await $.clock.now()
98 source = sourceOf(e, provider) ?? source
99 $.ui.status(formatMeter(e, source, now) || undefined)
100 for (const message of warnings(e, thresholds, warned, now)) $.ui.toast(message)
101 return measured
102 })
103}
104