SLOPSHOPPER

context-meter

Shows how full the context window is, warns at 70% and 90% so you can compact or start fresh before quality drops.

newbandcommandtoaststatustimer
v0.1.0MITupdated 2026-10-12wablevaibhav/claude-mods/context-meter
A shopper browsing a rack in a slop shop
Preview · a replayed session in a sandbox
claude · ~/work/app · context-meter
› fix the failing auth test and add an audit log call ⏺ Read(src/auth.ts) ⎿ Read 6 lines ⏺ Update(src/auth.ts) ⎿ Added 2 lines, removed 1 line ⏺ Bash(bun test) ⎿ 3 pass, 1 fail ● Done. refresh now rejects expired claims and logs an audit event. ✻ Worked for 42s · done 4:20 PM › /ctxmeter ⎿ context-meter: Context warning band hidden. ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── › ? for shortcuts ⚠ context-meter: ctx 49%
README

claude-mods

Small, independent mods for Claude Code: a live progress bar, a usage dashboard, a context-window meter, a safety guard, a git status band, and your own notes and todos.

Each mod is a plugin of function hooks. Install only the ones you want; none depends on another.

ModCommandWhat it gives you
task-progress/progressA progress band above the prompt that follows the todo list, with a working timer and your usage.
usage-dashboard/usage-dashboardA pane with 5h and weekly limits, models, tasks, time left and a 7-day chart.
context-meter/ctxmeterContext-window percentage in the status line, with warnings at 70% and 90%.
safety-guard/safeguardBlocks destructive commands and writes to secret or key files before they run.
git-band/gitbandBranch, ahead/behind and change counts on one line above the prompt.
notes-todos/mytodo, /mynoteYour own todo list and notes that persist across sessions.

Install

Run these in a terminal Claude Code session. The desktop app's Code tab does not run /plugin install.

/plugin install task-progress --marketplace wablevaibhav/claude-mods

Answer y to add the marketplace the first time, then pick a scope. Repeat with any other mod name from the table:

/plugin install usage-dashboard --marketplace wablevaibhav/claude-mods
/plugin install context-meter --marketplace wablevaibhav/claude-mods
/plugin install safety-guard --marketplace wablevaibhav/claude-mods
/plugin install git-band --marketplace wablevaibhav/claude-mods
/plugin install notes-todos --marketplace wablevaibhav/claude-mods

Try without installing

Clone the repo and point Claude Code at the mod folders:

git clone https://github.com/wablevaibhav/claude-mods.git
cd claude-mods
claude --plugin-dir ./task-progress --plugin-dir ./usage-dashboard

Add one --plugin-dir per mod.

What it looks like

task-progress is a real screenshot. The other previews are illustrative text with sample numbers; real colours (green / amber / red, orange accents) follow your terminal theme.

task-progress: the band above the prompt

task-progress band: title, smooth bar, step list, 5h / weekly usage and active model

usage-dashboard: the /usage-dashboard pane

Claude usage                                     updated 12s ago
╭──────────────────────────────────────────────────────────────────╮
│ 5-hour session                                  resets in 2h 10m │
│ ██████████████▌░░░░░░░░░░░░░░░░░░░░░░░░░  35%                    │
│ burning 0.40%/min · full in ~2h 5m                               │
╰──────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────╮
│ Weekly                                           resets in 4d 3h │
│ █████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  12%                    │
╰──────────────────────────────────────────────────────────────────╯
● Limit risk green   session cost ~$1.42
╭──────────────────────────────────────────────────────────────────╮
│ Models                                 active: opus-5-5 (3m ago) │
│ ★ opus-5-5    ████████░░   78%    1.2M   34 msgs  ~$0.91         │
│   sonnet-5-5  ██░░░░░░░░   22%    340k   12 msgs  ~$0.18         │
│ tokens: in / out / cache = 80k / 190k / 1.3M                     │
╰──────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────╮
│ Tasks  ▸ 1 in progress   ○ 3 pending   ✓ 2 today                 │
│ ▸ Wire the charts  1m 20s                                        │
│ ○ Add the tasks board                                            │
│ ○ Polish and test                                                │
│ Time left 25m (best case 14m) · confidence medium, 4 finished    │
│ Should finish within the current 5h window.                      │
╰──────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────╮
│ Last 7 days                                                      │
│ Wed 07 ██████████████████░░░░░░░░░░░░░░░░░░░░░░  420k            │
│ Thu 08 ███████████████████████████████░░░░░░░░░  740k            │
│ Fri 09 ██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  240k            │
│ Sat 10 ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  0               │
│ Sun 11 ██████████████████████░░░░░░░░░░░░░░░░░░  530k            │
│ Mon 12 ████████████████████████████████████████  1.0M            │
╰──────────────────────────────────────────────────────────────────╯

context-meter and git-band each add one line above the prompt:

▲ Context 78% ███████████████████░░░░░ 156k / 200k  Getting full: consider /compact soon.   [Hide]
⎇ feature/login ↑2 ↓1 ● 3 staged ✎ 2 changed ? 2 untracked

The mods

task-progress

A progress band above the prompt, visible while you type.

  • Follows your todo list by itself. No setup: when Claude writes a todo list, the bar, step count and current step follow it.
  • A progress tool. Claude can report title, total, done, note, items and finished explicitly (the tool is mcp__task-progress__progress), for work that doesn't use a todo list.
  • A working timer (⠹ Working 12s) whenever a turn is running and no job is shown.
  • Footer: your 5h and weekly usage with time to reset, plus the active model.
  • Controls: Collapse / Expand hides the step list, Hide or /progress hides the band. A finished job clears when you send your next prompt.

usage-dashboard

Open it with /usage-dashboard. (/usage is Claude Code's own built-in panel; this mod uses a different name so the two don't collide.)

  • Limits: 5-hour and weekly gauges coloured green below 60%, amber from 60–85%, red above 85%, with reset times.
  • Burn rate and limit risk: percent per minute over the last 30 minutes, when the 5h window would fill, and whether your open tasks are likely to finish first.
  • Models: tokens by model (input, output, cache), share, messages and a rough cost, with the top consumer starred and the active model shown.
  • Tasks: in progress, pending and done today, with a time-left estimate from the median time of tasks that finished.
  • Last 7 days: daily tokens as bars.
  • Status line: 5h 34% · wk 12% · opus-5-5 after your first reply.

context-meter

  • Status line: ctx 43%, the share of the context window in use.
  • Warning band from 70%, with the token count and advice. It stays out of the way below that.
  • Toasts once each time usage climbs into 70% and into 90%, so you compact or start fresh before quality drops.
  • /ctxmeter hides or shows the band.

safety-guard

Stops a call before it runs and tells Claude why, so it asks you first.

BlocksExamples
Recursive deletes of root, home or wildcardsrm -rf /, rm -r ~, rm -rf *, rm -rf /etc
Force pushes without a leasegit push --force, git push -f (--force-with-lease is allowed)
Piping a download into a shell`curl … \sh, wget … \sudo bash`
Disk and filesystem damagedd … of=/dev/sda, mkfs.*, > /dev/sda, fork bombs, chmod -R 777
Writing secrets.env, .env.production (not .env.example), *.pem, *.key, id_rsa, service-account JSON, .npmrc, .aws/credentials, .git/ internals
Reading private keysid_rsa, *.pem, *.key, .ssh/, .aws/credentials

/safeguard shows status and how many calls it blocked. /safeguard pause and /safeguard resume turn it off and on for the session. If the guard itself errors, it blocks the call rather than letting it through.

git-band

  • One line: branch (or detached HEAD), ↑ahead ↓behind against the upstream, staged, changed and untracked counts, conflicts, or ✓ clean.
  • Refreshes after every turn and every 15 seconds. Hidden outside a git repository.
  • /gitband hides or shows it.

notes-todos

Your own lists, separate from Claude's todo list, stored locally and kept across sessions. The open-todo count shows in the status line.

/mytodo add Renew the domain      add a todo (a bare /mytodo <text> also adds)
/mytodo                           list todos
/mytodo done 2     /mytodo undo 2     /mytodo rm 2     /mytodo clear

/mynote Wifi password is on the fridge     save a note
/mynote                                    list notes
/mynote find wifi     /mynote rm 3

Notes and limits

  • Usage figures come from the rate-limit windows Anthropic reports on each reply (five_hour, seven_day). Accounts without those windows (some API-key setups) show "No reading yet".
  • Model totals, daily tokens and finished-task durations count only turns the mod has seen since you installed it, and are kept per machine.
  • Cost is a rough per-model price table, not a bill.
  • Task tracking follows Claude's TodoWrite list. If your session uses another task tool, task-progress can still be driven through its progress tool.
  • safety-guard is a pattern-based safety net, not a security boundary. It catches common destructive commands and secret-file writes; an unusual command can get past it.
  • Command names avoid Claude Code built-ins such as /usage, /context and /todos.
  • Everything runs locally and nothing is sent anywhere. git-band runs git status.

Troubleshooting

ProblemWhat to try
/usage shows "Session limit / Breakdown"That is Claude Code's built-in panel. Use /usage-dashboard.
A mod's command isn't foundThe mod isn't loaded. Install it, or start Claude with --plugin-dir ./<mod>.
Gauges say "No reading yet"Send one message; the reading arrives with the first reply.
Band shows the old layout after an updateClose the pane and reopen it, or restart Claude.
A command was blocked unexpectedlyRun /safeguard to see why, /safeguard pause if you really want it.
/plugin install isn't availableUse a terminal Claude Code session, not the desktop app's Code tab.

Develop

claude plugin validate .                 # the marketplace
claude plugin validate ./<mod>           # one mod
claude plugin test ./<mod>               # its tests

Each mod is a folder with .claude-plugin/plugin.json, hooks/hooks.json, a hooks module, pure logic with *.test.ts files, and (where it keeps state) a types/index.d.ts contract. The marketplace file is .claude-plugin/marketplace.json.

Releases are git tags: v0.2.0 added context-meter, safety-guard, git-band and notes-todos.

License

MIT, see LICENSE.

Source 3 files
hooks/register.tsx 91 lines
1import { atom, read, update } from 'claude-code'
2import type { EngineInterface, Register } from 'claude-code'
3
4import type { ContextReading, Level } from '../types'
5import { advice, bar, formatTokens, levelFor, risen } from './logic'
6
7const reading = atom(
8  { plugin: 'context-meter', key: 'reading' } as const,
9  { percent: null, tokens: null, window: null } as ContextReading,
10)
11const lastLevel = atom({ plugin: 'context-meter', key: 'lastLevel' } as const, 'ok' as Level)
12const isHidden = atom({ plugin: 'context-meter', key: 'isHidden' } as const, false)
13
14/** Reads the live window and warns once each time it climbs into a higher level. */
15async function refresh($: EngineInterface) {
16  const { context } = await $.session.usage()
17  const percent = context.percent ?? null
18  await update($, reading, () => ({
19    percent,
20    tokens: context.tokens ?? null,
21    window: context.window,
22  }))
23
24  if (percent === null) {
25    $.ui.status(undefined)
26    return
27  }
28
29  const prev = await read($, lastLevel)
30  const up = risen(prev, percent)
31  await update($, lastLevel, () => levelFor(percent))
32  if (up === 'warn') $.ui.toast(`Context ${percent}% full: consider /compact soon`)
33  if (up === 'high') $.ui.toast(`Context ${percent}% full: /compact or start fresh now`)
34  $.ui.status(`ctx ${percent}%`)
35}
36
37export const register: Register = on => {
38  on('session.start', async ($, e, next) => {
39    await $.command.register({
40      name: 'ctxmeter',
41      description: 'Show or hide the context-window warning band',
42    })
43    await refresh($).catch(() => undefined)
44    $.clock.every(30_000, () => {
45      void refresh($).catch(() => undefined)
46    })
47
48    return next(e)
49  })
50
51  on('command.run', { command: 'ctxmeter' }, async $ => {
52    const hidden = await update($, isHidden, h => !h)
53    return { text: hidden ? 'Context warning band hidden.' : 'Context warning band shown.' }
54  }).catch(() => ({ text: 'Context meter could not toggle.' }))
55
56  on('turn.complete', async ($, e, next) => {
57    await refresh($).catch(() => undefined)
58    return next(e)
59  }).catch(($, e, next) => next(e))
60
61  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
62    if (e.props.hasSurvey || (await read($, isHidden))) return next(e)
63
64    const r = await read($, reading)
65    if (r.percent === null) return next(e)
66    const level = levelFor(r.percent)
67    if (level === 'ok') return next(e)
68
69    const { Box, Text, Button } = $.ui.resolve(e)
70    const color = level === 'high' ? 'error' : 'warning'
71
72    return (
73      <Box paddingX={1} gap={1}>
74        <Text color={color} bold>
75          {level === 'high' ? '●' : '▲'} Context {r.percent}%
76        </Text>
77        <Text color={color}>{bar(r.percent)}</Text>
78        {r.tokens !== null && r.window !== null && (
79          <Text dimColor>
80            {formatTokens(r.tokens)} / {formatTokens(r.window)}
81          </Text>
82        )}
83        <Text dimColor wrap="truncate-end">
84          {advice(level)}
85        </Text>
86        <Button key="hide" label="Hide" onPress={() => update($, isHidden, () => true)} />
87      </Box>
88    )
89  })
90}
91
hooks/logic.ts 30 lines
1import type { Level } from '../types'
2
3export const WARN_AT = 70
4export const HIGH_AT = 90
5
6const RANK: Record<Level, number> = { ok: 0, warn: 1, high: 2 }
7
8export const levelFor = (pct: number): Level => (pct >= HIGH_AT ? 'high' : pct >= WARN_AT ? 'warn' : 'ok')
9
10/** The level just entered while climbing, or null when the level did not rise. */
11export const risen = (prev: Level, pct: number): Level | null => {
12  const now = levelFor(pct)
13  return RANK[now] > RANK[prev] ? now : null
14}
15
16export const bar = (pct: number, width = 24): string => {
17  const filled = Math.max(0, Math.min(width, Math.round((Math.max(0, Math.min(100, pct)) / 100) * width)))
18  return '█'.repeat(filled) + '░'.repeat(width - filled)
19}
20
21export const formatTokens = (n: number): string =>
22  n >= 1_000_000 ? `${(n / 1_000_000).toFixed(1)}M` : n >= 1000 ? `${Math.round(n / 1000)}k` : String(n)
23
24export const advice = (level: Level): string =>
25  level === 'high'
26    ? 'Almost full: run /compact now, or start a fresh session.'
27    : level === 'warn'
28      ? 'Getting full: consider /compact soon.'
29      : ''
30
types/index.d.ts 18 lines
1export type Level = 'ok' | 'warn' | 'high'
2
3export type ContextReading = {
4  percent: number | null
5  tokens: number | null
6  window: number | null
7}
8
9declare module 'claude-code' {
10  interface PluginState {
11    'context-meter': {
12      reading: ContextReading
13      lastLevel: Level
14      isHidden: boolean
15    }
16  }
17}
18