Catches long unstructured brain dumps, asks clarifying questions with a background model, and rewrites them into a structured prompt.

Nine local Claude Code mods (UI and hook plugins) with a light Star Wars flavor.
| Mod | What it does |
|---|---|
| brain-dump | Intercepts long, unstructured prompts, asks clarifying questions, rewrites them into a structured prompt. !raw prefix skips it. |
| helper-desk | Progress bar from the to-do list, plus a side panel for sub-agents (/helper-desk). |
| cache-clock | Prompt-cache countdown, Keep Warm button, /keep-warm. |
| handoff | Generates a handoff prompt at 250k tokens, on cold cache, or on /handoff. |
| reflect | Offers to save rules/preferences to memory, CLAUDE.md, or a second brain. |
| chat-inventory | Zero-token "In This Chat" panel (/inventory). |
| switchboard | /mods panel to toggle mods and hide panels. |
| power-cells | Gauges above the prompt for context, the 5-hour limit, and a weekly pacing plan: a daily ration, work-day weighting, over/under-plan warnings. /power plan shows the week. |
| droid-console | Restyles the whole UI as a droid console: personality palettes, transmission headers, droid spinner words, status band. /droid switches personality. |
Status: experimental. They pass claude plugin validate and tsc, but have not been tested at runtime. Expect rough edges.
Add the marketplace once, then install the mods you want (user scope makes them load in every session):
claude plugin marketplace add ikentrock/starwars-claude-mods
claude plugin install brain-dump@starwars-claude-mods --scope user
claude plugin install cache-clock@starwars-claude-mods --scope user
claude plugin install chat-inventory@starwars-claude-mods --scope user
claude plugin install droid-console@starwars-claude-mods --scope user
claude plugin install handoff@starwars-claude-mods --scope user
claude plugin install helper-desk@starwars-claude-mods --scope user
claude plugin install power-cells@starwars-claude-mods --scope user
claude plugin install reflect@starwars-claude-mods --scope user
claude plugin install switchboard@starwars-claude-mods --scope user
Or one at a time from a session prompt:
/plugin install <mod> --marketplace ikentrock/starwars-claude-mods
Update later with claude plugin marketplace update starwars-claude-mods.
hooks/register.tsx 93 lines1import type { Register } from 'claude-code'
2
3const MIN_CHARS = 500
4const MAX_QUESTIONS = 4
5const MODEL = 'haiku'
6
7const BULLET = /^\s*([-*•]|\d+[.)]|#{1,4})\s/
8const STRUCTURED = /^#{1,3}\s*(task|why|guardrails|done)\b/im
9
10// A long wall of text with few bullets, headings or numbered lines.
11const isBrainDump = (text: string) => {
12 if (text.length < MIN_CHARS || STRUCTURED.test(text)) return false
13 const lines = text.split('\n').filter(line => line.trim() !== '')
14 const bullets = lines.filter(line => BULLET.test(line)).length
15
16 return bullets < 3 && bullets / lines.length < 0.4
17}
18
19const QUESTIONS = (dump: string) => `A user typed this unstructured brain dump as a prompt for a coding assistant:
20
21<dump>
22${dump}
23</dump>
24
25Ask at most ${MAX_QUESTIONS} short clarifying questions that would most improve a prompt built from it. Cover whichever of these are unclear: the concrete task, why it matters, guardrails (what must not change), and what "done" looks like. Skip anything the dump already answers.
26
27Output one question per line in exactly this form, nothing else:
28question | suggested answer A | suggested answer B`
29
30const REWRITE = (dump: string, answers: string) => `Rewrite this brain dump into a clear, structured prompt for a coding assistant.
31
32<dump>
33${dump}
34</dump>
35
36<clarifications>
37${answers || '(none given)'}
38</clarifications>
39
40Output only the prompt, in markdown, with exactly these sections:
41## Task
42## Why
43## Guardrails
44## What done looks like
45
46Keep every concrete detail, name and constraint from the dump. Do not invent requirements; write "Not specified" where nothing was said.`
47
48export const register: Register = on => {
49 on('prompt.submit', async ($, e, next) => {
50 if (e.command || e.isMeta) return next(e)
51 if (e.text.startsWith('!raw ')) return next({ ...e, text: e.text.slice(5) })
52 if (!isBrainDump(e.text)) return next(e)
53
54 $.ui.toast('Brain Dump: a cluttered mind, this is. Sorting it, I am…')
55
56 const asked = await $.model.complete({
57 model: MODEL,
58 prompt: QUESTIONS(e.text),
59 maxTokens: 600,
60 effort: 'low',
61 })
62 if (!asked.isAnswered) return next(e)
63
64 const questions = asked.text
65 .split('\n')
66 .map(line => line.split('|').map(part => part.trim()))
67 .filter(parts => parts[0] && parts[0].endsWith('?'))
68 .slice(0, MAX_QUESTIONS)
69
70 const answers: string[] = []
71 for (const [question = '', ...options] of questions) {
72 const answer = await $.ui.ask(question, {
73 options: options.filter(Boolean).slice(0, 3),
74 header: 'Brain Dump',
75 })
76 answers.push(`Q: ${question}\nA: ${answer}`)
77 }
78
79 const rewritten = await $.model.complete({
80 model: MODEL,
81 prompt: REWRITE(e.text, answers.join('\n\n')),
82 maxTokens: 2000,
83 })
84 if (!rewritten.isAnswered) return next(e)
85
86 await $.prompt.fill({ text: rewritten.text.trim(), mode: 'replace' })
87
88 return {
89 drop: 'Brain Dump: your thoughts are sorted. The structured prompt is in your prompt box; edit it, then press Enter. (Prefix a prompt with "!raw " to skip Brain Dump.)',
90 }
91 })
92}
93