One live line above the prompt per running subagent: time, tool count and what it's doing. /radar shows every agent and its messages.

<h1 align="center">Claude Code mods</h1>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT"></a> <a href="https://github.com/hamzafer/claude-code-mods/actions/workflows/ci.yml"><img src="https://github.com/hamzafer/claude-code-mods/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
<a href="#-install">Install</a> · <a href="#-the-mods">All mods</a> · <a href="docs/mods.md">Docs</a> · <a href="https://claude.dev/blog/getting-started-with-claude-code-mods/">What are mods?</a>
<table> <tr> <td align="center" width="33%"><a href="docs/mods.md#-context-bar"><img src="images/context-bar.png" alt="context-bar: Claude Code context window usage as a stacked bar, a color per category" width="260"></a><br>📊 <b>context-bar</b><br>what fills your context</td> <td align="center" width="33%"><a href="docs/mods.md#-review-watch"><img src="images/review-watch.png" alt="review-watch: live lines for running Codex and subagent code reviews in Claude Code" width="260"></a><br>🔍 <b>review-watch</b><br>running code reviews, live</td> <td align="center" width="33%"><a href="docs/mods.md#-md-preview"><img src="images/md-preview.png" alt="md-preview: Markdown that Claude Code edits, rendered like GitHub next to the diff" width="260"></a><br>📝 <b>md-preview</b><br>Markdown rendered like GitHub</td> </tr> <tr> <td align="center" width="33%"><a href="docs/mods.md#-blast-radius"><img src="images/gallery/blast-radius.png" alt="blast-radius: a Claude Code hook holds rm -rf and lists the files it would delete" width="260"></a><br>💥 <b>blast-radius</b><br>see what <code>rm -rf</code> would delete</td> <td align="center" width="33%"><a href="docs/mods.md#-now-playing"><img src="images/now-playing.png" alt="now-playing: Spotify track, progress bar and synced lyrics inside Claude Code" width="260"></a><br>🎵 <b>now-playing</b><br>Spotify and its lyrics, live</td> <td align="center" width="33%"><a href="docs/mods.md#-reels-and-snake"><img src="images/reels-demo.gif" alt="reels: YouTube Shorts in a Claude Code pane while it works" width="260"></a><br>📱 <b>reels</b><br>Shorts while Claude works</td> </tr> <tr> <td align="center" width="33%"><a href="docs/mods.md#-where-am-i"><img src="images/gallery/where-am-i.png" alt="where-am-i: the session goal, current step and what waits on you, above the Claude Code prompt" width="260"></a><br>📍 <b>where-am-i</b><br>goal, now, waiting on you</td> <td align="center" width="33%"><a href="docs/mods.md#-lines-above-the-prompt"><img src="images/gallery/lines.png" alt="token-weather, usage-meter and other Claude Code status lines stacked above the prompt" width="260"></a><br>🌦️ <b>token-weather and friends</b><br>lines above the prompt</td> <td align="center" width="33%"><a href="#mission-control"><img src="images/gallery/mission-control.png" alt="mission-control: Claude Code subagents, tool calls and the files they touch, live" width="260"></a><br>🛰️ <b>mission-control</b><br>agents and the code they touch</td> </tr> </table>
Add the marketplace once, then install any mod by name:
claude plugin marketplace add hamzafer/claude-code-mods
claude plugin install context-bar@claude-code-mods
Or install the general-purpose set in one go:
for m in context-bar token-weather usage-meter where-am-i next-steps agent-radar review-watch replay-theater md-preview blast-radius mission-control; do
claude plugin install "$m@claude-code-mods"
done
Restart Claude Code after installing. To try one without installing:
git clone https://github.com/hamzafer/claude-code-mods && cd claude-code-mods
claude --plugin-dir mods/context-bar
Needs Claude Code 2.1.287+. A few mods need more (Chrome,
gh, a connector); the tables say which.
| Mod | What it does | Command | |
|---|---|---|---|
| 🛰️ | mission-control | Live map of agents, tool calls and the code they touch | /mission |
| 📊 | context-bar | Your context window as one stacked bar, a color per category, with token counts and where it compacts | /context-bar |
| 🌦️ | token-weather | Context fill from Clear to Compact soon, plus a prompt-cache countdown | |
| ⏱️ | cache-clock | A prompt-cache line under your status line, from Claude Code's own figures: time left, hit rate and misses, and the tokens your next message re-caches once it goes cold. Needs Node and Claude Code 2.1.251+ | /cache-clock setup |
| 📍 | where-am-i | Goal, doing now, waiting on you, next step | /where |
| ➡️ | next-steps | 2 or 3 likely next prompts after each turn, one key to draft one | 1 2 3, 0 hides |
| 💰 | usage-meter | 5-hour and 7-day plan usage, the reset countdown and the session's cost | |
| 💳 | openai-balance | Your OpenAI API credit: an estimated balance with a gauge, today's spend, where the money mostly went, and the last call. Needs an OpenAI organization Admin key | /openai-balance |
| 📡 | agent-radar | One live line per running subagent | /radar |
| 🔍 | review-watch | One live line per running code review (Codex or a review subagent) with the model, target, elapsed time and Codex's latest output. A toast lists the findings when it ends | |
| 🌐 | browser-lanes | Whether this session has a browser, and who holds it | /browser |
| 🕌 | prayer-times | The current prayer and how long is left, the next one, and zawal. Computed on your computer, Hanafi or standard Asr | /prayers |
| 🎬 | replay-theater | Steps through the last turn's edits, one diff at a time | /replay |
| 📝 | md-preview | Renders the Markdown files Claude edits like GitHub does, with before and after side by side. Needs Chrome and a terminal that shows images | /md |
| Mod | What it does | Command | |
|---|---|---|---|
| 💥 | blast-radius | Holds rm -r, force pushes and migrations, shows what they'd delete, cancels after 60 s with no answer |
| Mod | What it does | Command | |
|---|---|---|---|
| 🔀 | switchboard | Picks the model for each subagent that doesn't name one, with OpenAI's Decisions API or Jev, from its short label only. Shows what every subagent cost | /route |
These are built around my own tools and rules. Fork them and change the rules to yours.
| Mod | What it does | Command | |
|---|---|---|---|
| 👀 | glance | One line with what needs you: next meeting, PRs, Linear issues, Slack DMs. Needs gh and the Google Calendar, Linear and Slack connectors | /glance |
| 🚦 | merge-gate | Holds gh pr merge until CI is green and Codex reviewed once. Needs gh and the Codex CLI. Reviews run on one fixed model; change it to yours | /gate |
| 📏 | rulebook-guard | Enforces my writing and git rules: rewrites em dashes, asks before --amend, unformatted pushes, emails and phone numbers in notes | |
| 💾 | session-saver | Saves where you left off, shows it on resume. Needs unpause | /park [note] |
| Mod | What it does | Command | |
|---|---|---|---|
| 📱 | reels | YouTube Shorts while Claude works, pauses when it's done | /reels |
| 🐍 | snake | Snake while Claude works | /snake |
| 🎵 | now-playing | What Spotify is playing, with a progress bar, the lyric being sung, and ⏮ ⏸ ⏭ buttons. Needs macOS and the Spotify app | /music |
<a id="mission-control"></a>
Every subagent, every tool call and every file they touch, in a pane next to the chat. Shown at 4x: two subagents building a logout feature across four files.

Install it like any mod, restart, and type /mission (or /mission code to open the code map). q closes it.
w shows the agents and every tool call, livec shows the code map, with import arrowsThe Code view also needs macOS, Google Chrome and a terminal that shows images (Ghostty, kitty, iTerm2). The Who view works everywhere.
hooks/register.tsx 204 lines1// Agent Radar: what are my subagents cooking?
2// The band above the prompt has one live line per running subagent: status, time, tool
3// count and what it is doing right now; a finished one shows a check for 30 s. A toast
4// says when each finishes. /radar opens a pane with every agent and its messages.
5import { atom, read, update } from 'claude-code'
6import type { EngineInterface, Register } from 'claude-code'
7
8import type { RadarAgent } from '../types'
9
10const PANE = 'agent-radar'
11const SHOW_DONE_MS = 30_000 // a finished agent stays in the band this long
12const BAND_ROWS = 4
13
14// Held by the host, so the radar survives a hot reload of this file.
15const agents = atom({ plugin: 'agent-radar', key: 'agents' } as const, [] as RadarAgent[])
16const selected = atom({ plugin: 'agent-radar', key: 'selected' } as const, null as string | null)
17const now = atom({ plugin: 'agent-radar', key: 'now' } as const, 0)
18
19export const register: Register = on => {
20 on('session.start', async ($, e, next) => {
21 const r = await next(e)
22 await $.command.register({ name: 'radar', description: 'Show what each subagent is doing, in the Agent Radar pane' }).catch(() => {}) // a name Claude Code already has is refused: start anyway
23 // A clock for the elapsed times, ticking only while something runs.
24 $.clock.every(1000, () => {
25 void (async () => {
26 // A few seconds past the 30 s too, so the redraw that drops a finished line happens.
27 if ((await read($, agents)).some(a => isShown(a, Date.now() - 3_000))) await update($, now, () => Date.now())
28 })().catch(() => {})
29 })
30 return r
31 })
32
33 on('agent.spawn', async ($, e, next) => {
34 const r = await next(e)
35 if (r.agentId) {
36 const id = r.agentId
37 const one: RadarAgent = { id, description: e.description || e.name || e.subagentType, type: e.subagentType, status: 'running', startedAt: Date.now(), tools: 0, last: 'starting' }
38 await update($, agents, list => [one, ...list.filter(a => a.id !== id)].slice(0, 30))
39 }
40 return r
41 })
42
43 on('tool.call', async ($, e, next) => {
44 if (e.agentId) {
45 const id = e.agentId
46 const line = describe(e as unknown as Record<string, unknown>)
47 await update($, agents, list => list.map(a => (a.id === id ? { ...a, tools: a.tools + 1, last: line } : a)))
48 }
49 return next(e)
50 })
51
52 on('turn.complete', async ($, e, next) => {
53 const r = await next(e)
54 if (e.agentId) {
55 const id = e.agentId
56 const failed = e.reason === 'error' || e.reason === 'aborted'
57 const list = await update($, agents, all =>
58 all.map(a => (a.id === id ? { ...a, status: failed ? 'failed' : 'done', endedAt: Date.now(), last: failed ? `stopped: ${e.reason}` : 'finished' } : a)),
59 )
60 const one = list.find(a => a.id === id)
61 if (one) $.ui.toast(`${failed ? '✗' : '✓'} ${one.description} ${failed ? 'failed' : 'done'} (${elapsed(one)} · ${one.tools} tools)`)
62 }
63 return r
64 })
65
66 on('command.run', { command: 'radar' }, async $ => {
67 await adopt($)
68 await update($, selected, () => null)
69 await $.ui.open({ id: PANE, title: 'Agent Radar', focus: true })
70 const list = await read($, agents)
71 const running = list.filter(a => a.status === 'running').length
72 return { text: `${running} running, ${list.length - running} finished` }
73 })
74
75 // The band: one live line per running agent, and a ✓ for 30 s once one finishes.
76 on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
77 const rest = await next(e) // what other mods and Claude Code draw here stays
78 await read($, now) // subscribes the band to the clock
79 const shown = (await read($, agents)).filter(a => isShown(a))
80 if (e.props.hasSurvey || shown.length === 0) return rest
81 const { Box, Text } = $.ui.resolve(e)
82 return (
83 <Box flexDirection="column">
84 {shown.slice(0, BAND_ROWS).map(a => (
85 <Text wrap="truncate-end">
86 <Text color={color(a)} bold>{` ${icon(a)} ${a.description}`}</Text>
87 <Text dimColor>{` ${elapsed(a)} · ${a.tools} tools`}</Text>
88 {a.status === 'running' && <Text>{` · ${a.last}`}</Text>}
89 {a.status === 'failed' && <Text color="red">{` · ${a.last}`}</Text>}
90 </Text>
91 ))}
92 {shown.length > BAND_ROWS && <Text dimColor>{` +${shown.length - BAND_ROWS} more · /radar`}</Text>}
93 {rest}
94 </Box>
95 )
96 })
97
98 on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
99 const { Box, Text, Button } = $.ui.resolve(e)
100 await read($, now) // subscribes the pane to the clock
101 const list = await read($, agents)
102 const pick = await read($, selected)
103 const one = list.find(a => a.id === pick)
104
105 if (one) {
106 const found = await $.session.messages({ agentId: one.id })
107 const messages = 'deny' in found ? [] : found.slice(-6)
108 return (
109 <Box flexDirection="column">
110 <Text>
111 <Text color={color(one)} bold>{`${icon(one)} ${one.description}`}</Text>
112 <Text dimColor>{` ${one.type} · ${elapsed(one)} · ${one.tools} tools`}</Text>
113 </Text>
114 <Text dimColor wrap="truncate-end">{`now: ${one.last}`}</Text>
115 <Text dimColor>{'─'.repeat(Math.max(10, e.props.bodyColumns - 2))}</Text>
116 {messages.length === 0 && <Text dimColor>No messages yet.</Text>}
117 {messages.map(m => (
118 <Text wrap="truncate-end">
119 <Text color={m.role === 'assistant' ? 'cyan' : undefined} bold>{m.role === 'assistant' ? 'agent: ' : 'task: '}</Text>
120 <Text>{m.text.replace(/\s+/g, ' ').slice(0, 400) || '(tool calls)'}</Text>
121 </Text>
122 ))}
123 <Box flexDirection="row" gap={1}>
124 <Button key="back" label="Back" hotkey="b" variant="primary" onPress={() => update($, selected, () => null)} />
125 <Button key="close" label="Close" hotkey="q" role="dismiss" onPress={() => $.ui.close({ id: PANE })} />
126 </Box>
127 </Box>
128 )
129 }
130
131 const running = list.filter(a => a.status === 'running').length
132 return (
133 <Box flexDirection="column">
134 <Text bold>{`${running} running · ${list.length - running} finished`}</Text>
135 {list.length === 0 && <Text dimColor>No subagents yet this session.</Text>}
136 {list.slice(0, 9).map((a, i) => (
137 <Button
138 key={`agent-${a.id}`}
139 plain
140 hotkey={String(i + 1)}
141 dimColor={a.status !== 'running'}
142 label={`${icon(a)} ${a.description} · ${elapsed(a)} · ${a.tools} tools${a.status === 'done' ? '' : ` · ${a.last}`}`}
143 onPress={() => update($, selected, () => a.id)}
144 />
145 ))}
146 {list.length > 9 && <Text dimColor>{`… ${list.length - 9} older`}</Text>}
147 <Box flexDirection="row" gap={1}>
148 <Button key="clear" label="Clear finished" hotkey="c" onPress={() => update($, agents, all => all.filter(x => x.status === 'running'))} />
149 <Button key="close" label="Close" hotkey="q" role="dismiss" onPress={() => $.ui.close({ id: PANE })} />
150 </Box>
151 </Box>
152 )
153 })
154}
155
156// Agents that started before this mod loaded: take them from the engine's own list.
157async function adopt($: EngineInterface) {
158 const known = new Set((await read($, agents)).map(a => a.id))
159 const fresh = (await $.agent.list())
160 .filter(a => !known.has(a.id))
161 .map((a): RadarAgent => ({
162 id: a.id,
163 description: a.description,
164 type: a.type,
165 status: a.status === 'running' ? 'running' : a.status === 'completed' ? 'done' : 'failed',
166 startedAt: Date.now(),
167 tools: 0,
168 last: a.status === 'running' ? 'running (started before the radar)' : a.status,
169 }))
170 if (fresh.length > 0) await update($, agents, list => [...list, ...fresh])
171}
172
173// Running, or finished in the last 30 s.
174export function isShown(a: RadarAgent, at = Date.now()) {
175 return a.status === 'running' || (a.endedAt !== undefined && at - a.endedAt < SHOW_DONE_MS)
176}
177
178function icon(a: RadarAgent) {
179 return a.status === 'running' ? '●' : a.status === 'done' ? '✓' : '✗'
180}
181
182function color(a: RadarAgent) {
183 return a.status === 'running' ? 'yellow' : a.status === 'done' ? 'green' : 'red'
184}
185
186export function elapsed(a: Pick<RadarAgent, 'startedAt' | 'endedAt'>, at = Date.now()) {
187 const s = Math.max(0, Math.round(((a.endedAt ?? at) - a.startedAt) / 1000))
188 return s < 60 ? `${s}s` : `${Math.floor(s / 60)}m ${String(s % 60).padStart(2, '0')}s`
189}
190
191// A short label for one tool call: what a person would say the agent is doing.
192export function describe(e: Record<string, unknown>): string {
193 const tool = String(e.tool)
194 const s = (k: string) => (typeof e[k] === 'string' ? (e[k] as string) : '')
195 const file = (p: string) => p.split('/').slice(-2).join('/')
196 if (tool === 'Bash') return `running ${s('description') || s('command').slice(0, 50)}`
197 if (tool === 'Edit' || tool === 'Write') return `editing ${file(s('file_path'))}`
198 if (tool === 'Read') return `reading ${file(s('file_path'))}`
199 if (tool === 'Grep' || tool === 'Glob') return `searching ${s('pattern').slice(0, 30)}`
200 if (tool.includes('playwright')) return `browser: ${tool.split('__').pop()?.replace(/^browser_/, '')}`
201 if (tool.startsWith('mcp__')) return `using ${tool.split('__').slice(1).join(' ')}`
202 return `using ${tool}`
203}
204types/index.d.ts 17 lines1export type RadarAgent = {
2 id: string
3 description: string
4 type: string
5 status: 'running' | 'done' | 'failed'
6 startedAt: number
7 endedAt?: number
8 tools: number
9 last: string
10}
11
12declare module 'claude-code' {
13 interface PluginState {
14 'agent-radar': { agents: RadarAgent[]; selected: string | null; now: number }
15 }
16}
17