Workflow booster: a focus goal band, a ping when long turns finish, a daily work log with /eod, and /handoff to resume tomorrow where you stopped.

Claude Code mods (hooks-module plugins) for subagent visibility, task tracking, token savings and daily workflow. Needs Claude Code 2.1.304 or newer (built and tested on 2.1.304; the mod API is early access and can change between releases).
At the prompt of a Claude Code terminal session:
/plugin install agent-monitor --marketplace samarthsh-git/claude-mods
/plugin install task-inbox --marketplace samarthsh-git/claude-mods
/plugin install token-saver --marketplace samarthsh-git/claude-mods
/plugin install daily-driver --marketplace samarthsh-git/claude-mods
/plugin install clarify-first --marketplace samarthsh-git/claude-mods
/plugin install mod-scout --marketplace samarthsh-git/claude-mods
Answer y to add the marketplace, then pick the user scope. From a shell: claude plugin install <mod> --marketplace samarthsh-git/claude-mods.
In the desktop app, where /plugin does not run: click + next to the prompt box, then Plugins, Add marketplace with samarthsh-git/claude-mods, then Add plugin.
If this repository is private, the machine needs a git credential for github.com (gh auth login, then gh auth setup-git); the install never prompts for one.
/subagents) that opens by itself when the first subagent starts.$ npm test, reading auth.ts, searching "TODO")./subagents clear wipes the history.⚙ N subagents running, and a toast appears when one fails.The Tasks pane (/todo or /inbox) has three parts:
/todo <text> adds, /todo done 2 ticks, /todo rm 2 removes, /todo clear drops finished ones./inbox <text>, then press Send (or /inbox send). Claude spawns one background subagent per task, in parallel, on the cheapest model that fits. You keep working while they run, and agent-monitor shows their progress.| Feature | What it does | Setting |
|---|---|---|
| Subagent model routing | balanced: search and lookup subagents (Explore, guides) run on Haiku. aggressive: general-purpose and Plan subagents spawned from an Opus-class session also run on Sonnet. A model Claude or you set explicitly is never changed, and neither are forks or plugin agents. | routing |
| Lean-output rules | Adds about 150 tokens to the system prompt: no preamble or recaps, locate before reading, batch tool calls, delegate broad searches, prefer Edit, never trade correctness for brevity. It sits in the cached part of the prompt. | leanRules |
| Duplicate-read guard | Refuses once a Read of a file Claude already read with the same range in the same context while the file is unchanged on disk. Repeating the exact call goes through, so the worst case is one extra round trip. It resets on compaction. | dedupeReads |
| Usage HUD | Status line: ctx 42% · $1.23 · 5h 37%. Toasts at 70% context (suggests /compact or /clear) and at 80% of a rate limit. | always on |
| Model advisor | A toast when a prompt looks trivial for an Opus-class model, or hard for Haiku. Pure regex, costs no tokens, at most once per 15 min. | advisor |
/tokens | Report: fresh, cached and output tokens, cache hit rate, subagent share, what token-saver saved, and concrete tips. |
Change settings with /config (or pluginConfigs in settings.json).
What saves the most, from experience: /clear between unrelated tasks, keeping the prompt cache warm (no model switches mid-thread), delegating read-heavy searches to subagents, and using Sonnet as the default with Opus only for hard problems. The mod nudges toward these; it cannot measure your exact savings.
/aim <goal> sets a focus goal (/aim auto <goal> sets one only when none is set), shown above the prompt with time spent and today's file and commit counts. Press Done or run /aim done to log it.notifyAfterSeconds), you get a desktop or phone notification with Claude's answer. Hand Claude long work and switch tasks./eod (or /eod yesterday) prints a zero-token work log: Claude time, prompts, files changed, commits, test runs, subagents and goals done. Paste it into a standup./handoff has Claude write .claude/handoff.md (goal, done, state, next steps, gotchas). /pickup in the next session continues from it, and a toast reminds you when one exists.On a complex task or a deep, open-ended question, Claude first checks the repo and the chat for what it can learn itself. If something that would change the result is still missing, it asks you up to 4 multiple-choice questions in one round, with a recommended option on each. It then states the agreed spec in 3 lines or fewer, does the work, and checks the result against that spec. Everyday prompts ("fix the typo", "what is X") pass straight through.
Cost:
detector to heuristic for zero detection tokens.Commands: /clarify on (default) · off · always · now <task> (force questions for one task) · /clarify alone shows status. Settings: detector (hybrid / heuristic / model), maxQuestions (1 to 4).
It reads each prompt locally, with no model call and zero tokens, and never changes what Claude sees:
/tokens, a list of 3 or more tasks suggests /inbox, and "wrapping up for today" suggests /handoff. It knows every mod here plus Podium and Grounded Engineering, and stays quiet about mods you have not installed./aim) from your first real task of the session, unless you already set one./run-test, say). This costs no tokens to make or to use beyond the prompt itself. /scout rm <name> removes one./scout build <idea> has Claude write, validate and test a new mod, with zero run-time token cost wherever the feature allows. This is the one part that spends tokens, and only when you ask./scout shows recent suggestions and your macros. /scout off pauses it. Settings: autoMacros, autoFocus.
The mods above run only in Claude Code: the chat app has no plugin system. For chat, chat/ holds the closest equivalents, and both work on every device once set up:
chat/preferences.txt: paste it into Settings → Profile → personal preferences. It holds the lean-output rules, clarifying questions on complex tasks only, and a model-fit hint. It is about 200 words, shorter than a typical preferences block, and preferences ride on every message, so shorter is cheaper.chat/deep-work-skill.zip: upload it in Settings → Capabilities → Skills. It is a gather → ask → spec → deliver → self-check procedure that Claude loads only for complex work, so everyday chats pay just its one-line description.Chat habits that save the most: start a new chat per topic (each message resends the whole chat), put reference files in a Project instead of pasting them again, and use a lighter model for simple asks.
.claude/settings.json registers this marketplace and enables the six mods, so a Claude Code session opened on this repository (from claude.ai/code or the phone app) offers to install them with no commands typed.
These are other people's projects. Install them from their own repositories:
| Mod | What it is | Install |
|---|---|---|
| Podium | Hands jobs to other agent CLIs (Codex, Gemini, other Claude models) and tracks them in one pane, with sprints and PRs. Needs Node 22+, git 2.28+ and at least one other agent CLI. | /plugin marketplace add madjagstudios/plugins, then /plugin install podium@madjagstudios |
| Grounded Engineering | /grounded pane: engineering practices that fit your repo, with sources, plus a reviewed shelf of skill repositories. | /plugin marketplace add madjagstudios/grounded-engineering, then /plugin install grounded-engineering@grounded-engineering |
| claude-ui-mod | Not a Claude Code plugin. It patches the files of the Claude Desktop app on Windows: subagent HUD, task rail, usage meters, provider routing. | Windows only. Quit Claude Desktop, then git clone https://gitlab.com/blockshooter/claude-ui-mod && cd claude-ui-mod && npm ci && node scripts/verify-frontend.cjs && node patch.js apply. Read its SECURITY.md first: it rewrites your Claude Desktop install, and app updates can break it. node patch.js revert undoes it. |
The "optimaizr" and "inbox monitor" mods mentioned in the thread had no links. task-inbox and token-saver cover the same ground.
claude plugin validate mods/<mod>
claude plugin test mods/<mod>
To run a working copy, add "env": { "CLAUDE_CODE_PLUGIN_DIRS": "/abs/path/mods/agent-monitor:/abs/path/mods/task-inbox" } to ~/.claude/settings.json, or start with claude --plugin-dir mods/<mod>.
MIT
hooks/register.tsx 198 lines1import { atom, read, update } from 'claude-code'
2import type { EngineInterface, Register } from 'claude-code'
3
4import type { DayLog, Focus } from '../types'
5
6const focus = atom({ plugin: 'daily-driver', key: 'focus' } as const, null)
7const today = atom({ plugin: 'daily-driver', key: 'today' } as const, null)
8const isBandHidden = atom({ plugin: 'daily-driver', key: 'isBandHidden' } as const, false)
9
10const HANDOFF = '.claude/handoff.md'
11const TESTS = /\b((npm|pnpm|yarn|bun)( run)? test|pytest|go test|cargo test|jest|vitest|mvn test|gradle test|dotnet test|rspec|phpunit)\b/
12const COMMIT = /\bgit commit\b/
13const MSG = /-m\s+(?:"([^"]+)"|'([^']+)')/
14
15function dayOf(ms: number): string {
16 const d = new Date(ms)
17 const p = (n: number) => String(n).padStart(2, '0')
18 return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())}`
19}
20
21function blank(day: string): DayLog {
22 return { day, prompts: 0, turns: 0, activeMs: 0, files: [], commits: [], testsPassed: 0, testsFailed: 0, agents: 0, goalsDone: [] }
23}
24
25function dur(ms: number): string {
26 const m = Math.round(ms / 60000)
27 return m >= 60 ? `${Math.floor(m / 60)}h${String(m % 60).padStart(2, '0')}m` : `${m}m`
28}
29
30function clip(text: string, n: number): string {
31 const one = text.replace(/\s+/g, ' ').trim()
32 return one.length > n ? one.slice(0, n - 1) + '…' : one
33}
34
35// Applies a change to today's log, rolling over at midnight, and saves it.
36async function log($: EngineInterface, fn: (d: DayLog) => DayLog) {
37 const day = dayOf(await $.clock.now())
38 let current = await read($, today)
39 if (current === null || current.day !== day) {
40 const saved = await $.store.get(`log:${day}`)
41 current = saved && typeof saved === 'object' ? { ...blank(day), ...(saved as DayLog) } : blank(day)
42 }
43 const next = fn(current)
44 await update($, today, () => next)
45 await $.store.set(`log:${day}`, next)
46}
47
48function handoffPrompt(): string {
49 return [
50 `Write a handoff note to ${HANDOFF} (create the folder if needed, overwrite the file) so a fresh session can resume this work with no other context.`,
51 'Keep it under 40 lines, in this order: Goal; Done so far (with file paths); Current state (what works, what is broken, failing tests);',
52 'Next steps (numbered, concrete); Open questions and decisions; Gotchas learned. No prose padding.',
53 'Reply with one line confirming it is written.',
54 ].join(' ')
55}
56
57export const register: Register = (on, options) => {
58 const notifyAfterMs = Number(options.notifyAfterSeconds ?? 60) * 1000
59 let cwd = ''
60
61 on('session.start', async ($, e, next) => {
62 cwd = e.cwd
63 await $.command.register({ name: 'aim', description: 'Set the goal you are working on (shown above the prompt); /aim done marks it finished', argumentHint: '[goal | done]' })
64 await $.command.register({ name: 'eod', description: "Today's work log: time, files, commits, tests, subagents, goals done. Costs no tokens", argumentHint: '[yesterday]' })
65 await $.command.register({ name: 'handoff', description: `Have Claude write ${HANDOFF} so the next session resumes exactly here` })
66 await $.command.register({ name: 'pickup', description: `Continue from ${HANDOFF} left by an earlier session` })
67 const saved = await $.store.get(`focus:${cwd}`)
68 if (saved && typeof saved === 'object') await update($, focus, () => saved as Focus)
69 await log($, d => d)
70 if (await $.fs.exists(`${cwd}/${HANDOFF}`).catch(() => false)) {
71 $.ui.toast(`A handoff note from an earlier session is in ${HANDOFF}. /pickup continues from it.`)
72 }
73
74 return next(e)
75 })
76
77 on('command.run', { command: 'aim' }, async ($, e) => {
78 const args = e.args.trim()
79 const current = await read($, focus)
80 if (args === '' || args === 'done') {
81 if (current === null) return { text: 'No focus set. /aim <goal> sets one.' }
82 if (args === 'done') await log($, d => ({ ...d, goalsDone: [...d.goalsDone, current.goal] }))
83 await update($, focus, () => null)
84 await $.store.delete(`focus:${cwd}`)
85 return { text: args === 'done' ? `Done: ${current.goal}` : `Focus cleared (was: ${current.goal}).` }
86 }
87 const isAuto = args.startsWith('auto ')
88 if (isAuto && current !== null) return { text: `Focus kept: ${current.goal}` }
89 const goal = isAuto ? args.slice(5).trim() : args
90 const next: Focus = { goal, setAt: await $.clock.now() }
91 await update($, focus, () => next)
92 await update($, isBandHidden, () => false)
93 await $.store.set(`focus:${cwd}`, next)
94
95 return { text: `Focus: ${goal}` }
96 })
97
98 on('command.run', { command: 'eod' }, async ($, e) => {
99 const now = await $.clock.now()
100 const day = e.args.trim() === 'yesterday' ? dayOf(now - 86_400_000) : dayOf(now)
101 const saved = await $.store.get(`log:${day}`)
102 const d: DayLog = day === dayOf(now) ? ((await read($, today)) ?? blank(day)) : saved ? { ...blank(day), ...(saved as DayLog) } : blank(day)
103 const f = await read($, focus)
104 const lines = [
105 `Work log ${d.day}: ${dur(d.activeMs)} of Claude time over ${d.turns} turns from ${d.prompts} prompts`,
106 `Goals done: ${d.goalsDone.length === 0 ? 'none marked (/aim done)' : d.goalsDone.join('; ')}`,
107 ...(f ? [`In progress: ${f.goal}`] : []),
108 `Files changed (${d.files.length}): ${d.files.slice(-15).map(p => p.replace(`${cwd}/`, '')).join(', ') || 'none'}`,
109 `Commits (${d.commits.length}): ${d.commits.slice(-10).join('; ') || 'none'}`,
110 `Test runs: ${d.testsPassed} passed, ${d.testsFailed} failed · Subagents: ${d.agents}`,
111 ]
112
113 return { text: lines.join('\n') }
114 })
115
116 on('command.run', { command: 'handoff' }, async $ => {
117 $.clock.after(100, () => void $.prompt.submit({ text: handoffPrompt() }))
118 return { text: `Asking Claude to write ${HANDOFF}.` }
119 })
120
121 on('command.run', { command: 'pickup' }, async $ => {
122 if (!(await $.fs.exists(`${cwd}/${HANDOFF}`).catch(() => false))) return { text: `No ${HANDOFF} here. /handoff writes one.` }
123 $.clock.after(100, () => void $.prompt.submit({ text: `Read ${HANDOFF} and continue the work from its Next steps. Confirm the current state with a quick check before changing anything.` }))
124 return { text: `Resuming from ${HANDOFF}.` }
125 })
126
127 on('prompt.submit', async ($, e, next) => {
128 if (!e.command && !e.isMeta) await log($, d => ({ ...d, prompts: d.prompts + 1 }))
129 return next(e)
130 }).catch(($, e, next) => next(e))
131
132 on('agent.spawn', async ($, e, next) => {
133 const started = await next(e)
134 if (started.deny === undefined) await log($, d => ({ ...d, agents: d.agents + 1 }))
135 return started
136 }).catch(($, e, next) => next(e))
137
138 on('tool.call', async ($, e, next) => {
139 const ran = await next(e)
140 if (ran.deny !== undefined) return ran
141 const isOk = ran.isError !== true
142 if ((e.tool === 'Edit' || e.tool === 'Write') && isOk) {
143 const path = e.file_path
144 await log($, d => (d.files.includes(path) ? d : { ...d, files: [...d.files, path].slice(-200) }))
145 } else if (e.tool === 'Bash') {
146 const cmd = e.command
147 if (COMMIT.test(cmd) && isOk) {
148 const m = MSG.exec(cmd)
149 const msg = clip(m?.[1] ?? m?.[2] ?? 'commit', 70)
150 await log($, d => ({ ...d, commits: [...d.commits, msg].slice(-100) }))
151 }
152 if (TESTS.test(cmd)) await log($, d => (isOk ? { ...d, testsPassed: d.testsPassed + 1 } : { ...d, testsFailed: d.testsFailed + 1 }))
153 }
154 return ran
155 }).catch(($, e, next) => next(e))
156
157 on('turn.complete', async ($, e, next) => {
158 if (e.agentId === undefined) {
159 await log($, d => ({ ...d, turns: d.turns + 1, activeMs: d.activeMs + e.durationMs }))
160 if (notifyAfterMs > 0 && e.durationMs >= notifyAfterMs && !e.isAborted) {
161 const f = await read($, focus)
162 void $.ui.notify(clip(e.answer || 'Turn finished.', 140), { title: `Claude finished (${dur(e.durationMs)})${f ? `: ${clip(f.goal, 40)}` : ''}` })
163 }
164 }
165 return next(e)
166 })
167
168 on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
169 const f = await read($, focus)
170 if (f === null || e.props.hasSurvey || (await read($, isBandHidden))) return next(e)
171 const d = await read($, today)
172 const now = await $.clock.now()
173 const { Box, Text, Button } = $.ui.resolve(e)
174 const width = Math.max(20, (e.props.bodyColumns ?? 80) - 24)
175
176 return (
177 <Box flexDirection="row" gap={1}>
178 <Text color="claude">◎</Text>
179 <Text bold wrap="truncate">{clip(f.goal, Math.floor(width * 0.6))}</Text>
180 <Text dimColor wrap="truncate">
181 {dur(now - f.setAt)} on it{d ? ` · ${d.files.length} files · ${d.commits.length} commits today` : ''}
182 </Text>
183 <Button
184 key="done"
185 label="Done"
186 onPress={async () => {
187 await log($, x => ({ ...x, goalsDone: [...x.goalsDone, f.goal] }))
188 await update($, focus, () => null)
189 await $.store.delete(`focus:${cwd}`)
190 $.ui.toast(`Done: ${f.goal}`)
191 }}
192 />
193 <Button key="hide" plain dimColor label="✕" onPress={() => void update($, isBandHidden, () => true)} />
194 </Box>
195 )
196 })
197}
198types/index.d.ts 21 lines1export type Focus = { goal: string; setAt: number }
2
3export type DayLog = {
4 day: string
5 prompts: number
6 turns: number
7 activeMs: number
8 files: string[]
9 commits: string[]
10 testsPassed: number
11 testsFailed: number
12 agents: number
13 goalsDone: string[]
14}
15
16declare module 'claude-code' {
17 interface PluginState {
18 'daily-driver': { focus: Focus | null; today: DayLog | null; isBandHidden: boolean }
19 }
20}
21