On complex tasks and deep questions, Claude first asks you 2-4 high-leverage multiple-choice questions, then works to that spec. Everyday prompts pass…

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.ts 107 lines1import type { EngineInterface, Register } from 'claude-code'
2
3type Mode = 'on' | 'off' | 'always'
4
5// Origins that are a person typing: the terminal, Remote Control (phone), an app host.
6const PERSON = new Set(['composer', 'bridge', 'sdk'])
7
8const BUILD = /\b(build|implement|design|architect|create|develop|set ?up|migrate|refactor|integrate|automate|launch|plan|roadmap|strategy|optimi[sz]e|scale|overhaul|rewrite)\b/i
9const ARTIFACT = /\b(app|system|service|pipeline|api|backend|frontend|platform|feature|architecture|database|schema|workflow|website|dashboard|product|business|model|course|curriculum)\b/i
10const DEEP = /\b(why|how should|trade-?offs?|best (way|approach|practice)|compare|versus|vs\.?|pros and cons|should (i|we)|which (one|approach|option)|evaluate|what would it take|long[- ]term)\b/i
11const VAGUE = /\b(something like|some kind of|etc\.?|whatever|kind of|sort of|maybe|not sure|ideas?)\b/i
12const TRIVIAL = /^(fix (the |this )?typo|rename|format|lint|run |what (is|are|does) \S+\??$|show |list |open |commit|push|thanks|ok\b|yes\b|no\b|continue|go ahead|explain this (line|error))/i
13
14// Zero-token score: 3 or more is complex, 2 is borderline, less is everyday.
15function score(text: string): number {
16 let s = 0
17 if (text.length > 400) s += 2
18 else if (text.length > 150) s += 1
19 if (BUILD.test(text) && ARTIFACT.test(text)) s += 2
20 else if (BUILD.test(text)) s += 1
21 if (DEEP.test(text)) s += 1
22 if (VAGUE.test(text)) s += 1
23 if ((text.match(/[.?!](\s|$)/g)?.length ?? 0) >= 3 || /\n\s*([-*•]|\d+\.)\s/.test(text)) s += 1
24 if (/```|\bat .+:\d+:\d+|Traceback|Error:/.test(text)) s -= 1
25 if (TRIVIAL.test(text.trim()) || text.length < 40) s -= 3
26 return s
27}
28
29function brief(max: number): string {
30 return [
31 'clarify-first: this request looks complex. Before doing the work:',
32 '1. Do a quick, cheap look (repo files, earlier messages) for anything you can learn yourself. Never ask what you can find or confidently infer.',
33 `2. If missing information would materially change the result (goal, scope, constraints, audience, success criteria, environment, priorities, edge cases), call AskUserQuestion ONCE with up to ${max} questions. Ask only the questions whose answers would change what you produce. Make them multiple choice, recommended option first and marked "(Recommended)".`,
34 '3. If nothing material is missing, skip the questions and proceed.',
35 '4. After the answers, state the agreed spec in at most 3 lines, do the work to it, and before finishing check the result against it.',
36 ].join('\n')
37}
38
39async function classify($: EngineInterface, text: string): Promise<boolean> {
40 const label = await $.model
41 .classify(
42 `Does answering this well need clarifying questions about goals, scope or constraints, because it is a complex task or a deep, open-ended question (not a routine or factual one)?\n\n${text.slice(0, 2000)}`,
43 ['complex', 'routine'],
44 )
45 .catch(() => undefined)
46 return label === 'complex'
47}
48
49export const register: Register = (on, options) => {
50 const detector = String(options.detector ?? 'hybrid')
51 const max = Math.min(4, Math.max(1, Number(options.maxQuestions ?? 4)))
52 let mode: Mode = 'on'
53 let asked = 0
54 let skipped = 0
55
56 on('session.start', async ($, e, next) => {
57 await $.command.register({
58 name: 'clarify',
59 description: 'Clarifying questions before complex tasks: /clarify on | off | always | now <task> | status',
60 argumentHint: '[on | off | always | now <task> | status]',
61 })
62 const saved = await $.store.get('mode')
63 if (saved === 'on' || saved === 'off' || saved === 'always') mode = saved
64
65 return next(e)
66 })
67
68 on('command.run', { command: 'clarify' }, async ($, e) => {
69 const args = e.args.trim()
70 const [word = '', ...rest] = args.split(/\s+/)
71 if (word === 'on' || word === 'off' || word === 'always') {
72 mode = word
73 await $.store.set('mode', word)
74 const said = { on: 'Questions only on complex tasks and deep questions.', off: 'Off: no clarifying questions.', always: 'Questions before every task.' }
75 return { text: `clarify-first: ${said[word]}` }
76 }
77 if (word === 'now' && rest.length > 0) {
78 const task = rest.join(' ')
79 $.clock.after(100, () => void $.prompt.submit({ text: task, asUser: true }))
80 return { text: 'Asking clarifying questions first.', context: [brief(max)] }
81 }
82
83 return { text: `clarify-first is ${mode} (detector: ${detector}). This session: ${asked} prompt${asked === 1 ? '' : 's'} got questions, ${skipped} passed straight through.` }
84 })
85
86 on('prompt.submit', async ($, e, next) => {
87 if (mode === 'off' || e.command || e.isMeta || !PERSON.has(e.origin.kind) || e.turnId !== undefined) return next(e)
88 const text = e.text.trim()
89
90 let isComplex: boolean
91 if (mode === 'always') isComplex = text.length >= 20
92 else if (detector === 'model') isComplex = text.length > 60 && (await classify($, text))
93 else {
94 const s = score(text)
95 isComplex = s >= 3 || (s === 2 && detector === 'hybrid' && (await classify($, text)))
96 }
97
98 if (!isComplex) {
99 skipped += 1
100 return next(e)
101 }
102 asked += 1
103
104 return next({ ...e, context: [...(e.context ?? []), brief(max)] })
105 }).catch(($, e, next) => next(e))
106}
107