Rewrites a vague draft in the prompt box using the project's instructions, skills and conversation; Send submits it.

Four mods for Claude Code:
Type these at the prompt of a Claude Code session in a terminal:
/plugin install prompt-enhancer --marketplace aravindsriraj/claude-code-mods
/plugin install design-picker --marketplace aravindsriraj/claude-code-mods
/plugin install assumption-tracker --marketplace aravindsriraj/claude-code-mods
/plugin install idea-shelf --marketplace aravindsriraj/claude-code-mods
The first time, Claude Code asks whether to add the marketplace (github:aravindsriraj/claude-code-mods): answer y. Then choose a scope; the user scope is listed first, and Enter picks it. The mod starts working in that session right away, and with the user scope in every session after.
Mods built on Claude Code's hooks API need a recent Claude Code; the API is in early access and may change between releases.
A one-line bar above the prompt box with an ✨ Enhance button.
fix the export bug.ctrl+x tab, then e. The bar shows "Enhancing…", then your draft is replaced with a rewritten prompt.s) or just Enter. Undo (u) puts your original draft back.The rewrite sees what the main model sees: your CLAUDE.md and memory files, the installed skills, and the conversation so far, so "the bug" can become a real file and function. On the first prompt of a new session, before there is a conversation, it reads your instruction files and skill names directly.
Good to know:
@file mentions or pasted images, and the transcript shows the message as sent by the mod. For those prompts, press Enter instead.When Claude asks you to choose a design direction with its AskUserQuestion tool (often while using the frontend-design skill), each option is drawn as a mockup above the usual list:
preview is an SVG it is shown as is; otherwise the card shows the label, description, color swatches for any hex colors mentioned, and the preview text.Press Pick on a mockup, or answer in the list below it as usual; whichever you do first is the answer Claude gets.
Which questions it takes: single-pick questions whose header or text mentions design, direction, aesthetic, visual, theme, palette, colour, typography, layout, mockup, UI or UX, when every question in the call is one. Everything else, including a call that mixes design and other questions, is drawn exactly as before.
Good to know:
While Claude works, it records each assumption it acts on: a requirement nobody stated, a project convention, a fact about the code it hasn't checked. It does this by calling the mod's record_assumption tool, which the mod lists in Claude's tools and tells it about in the system prompt, then keeps working without stopping to ask.
ctrl+x tab, then a. That opens a side pane listing every assumption, with Claude's reason when it gave one.Good to know:
/clear starts the list over.Park a side-idea without derailing what Claude is doing, and send it later.
| Command | What it does |
|---|---|
/idea <text> | Puts the idea on the shelf with a timestamp. Runs at once, even while Claude is working, and shows a 💡 toast. |
/ideas | Opens the shelf in a side pane, numbered, with a Send button per idea. Press its number (or click Send) to run it. Esc closes. |
/idea-send <n> | Sends idea n as a prompt and takes it off the shelf. |
A sent idea is submitted as your own prompt (the transcript labels it "Prompt from the idea-shelf plugin"). If Claude is busy it waits its turn.
Claude never sees a shelved idea. The mod replaces the text of your /idea command with [shelved for later; hidden from Claude] before it reaches the conversation, so Claude only learns that something was shelved. /ideas draws the list in a pane, outside the conversation. Your typed text does stay in your local prompt history (up-arrow) and in the session file's record of the command, neither of which Claude reads.
The shelf lives in ~/.claude/idea-shelf.md, one idea per line (- [2026-10-09 14:32] your idea), shared by every project and session. You can edit it by hand.
Each mod is a folder with .claude-plugin/plugin.json, hooks/hooks.json and the hooks module hooks/register.tsx; .claude-plugin/marketplace.json at the root lists them all.
claude plugin validate .
claude plugin validate ./prompt-enhancer
claude plugin test ./prompt-enhancer
claude plugin validate ./design-picker
claude plugin test ./design-picker
claude plugin validate ./assumption-tracker
claude plugin test ./assumption-tracker
claude plugin validate ./idea-shelf
claude plugin test ./idea-shelf
To try a change, start a session with the mod loaded from your working copy: claude --plugin-dir ./prompt-enhancer. Claude Code then writes the API's type declarations into .claude-plugin/types/ and a tsconfig.json beside them, so tsc -p ./prompt-enhancer type-checks it; both are gitignored.
hooks/register.tsx 111 lines1import { atom, read, update } from 'claude-code'
2import type { EngineInterface, ModelForkResult, Register } from 'claude-code'
3
4import type { Phase } from '../types'
5
6const phase = atom({ plugin: 'prompt-enhancer', key: 'phase' } as const, 'idle' as Phase)
7const original = atom({ plugin: 'prompt-enhancer', key: 'original' } as const, '')
8
9const ask = (draft: string) => `Rewrite the draft prompt below into a clear, specific prompt for you (Claude Code) to act on in this project.
10Ground it in what you know: this conversation, the project's instructions (CLAUDE.md, rules, memory) and the skills and tools available.
11- Keep the person's intent; do not invent requirements or widen the scope.
12- Resolve vague references ("it", "the bug", "that page") to concrete files, functions or features when the context makes them clear.
13- Name the skill, command or project convention that applies when one clearly does.
14- Say what done looks like (how to verify) when it is not obvious.
15- Be concise: a few sentences or a short list, never an essay.
16Reply with the rewritten prompt only: no preamble, no quotes, no code fence.
17
18<draft>
19${draft}
20</draft>`
21
22// The fork sees exactly what the main model sees: system prompt, CLAUDE.md, skill listing, conversation.
23async function rewrite($: EngineInterface, draft: string): Promise<ModelForkResult> {
24 const forked = await $.model.fork({ prompt: ask(draft) })
25 if (forked.isAnswered || forked.reason !== 'nothing-to-fork') return forked
26
27 // Fresh session, nothing to fork yet: hand over the instruction files and skill names ourselves.
28 const { breakdown } = (await $.session.usage({ breakdown: 'summary' })).context
29 const files = await Promise.all(
30 (breakdown?.memoryFiles ?? []).map(
31 async f => `<file path="${f.path}">\n${await $.fs.read(f.path).catch(() => '')}\n</file>`,
32 ),
33 )
34 const skills = (breakdown?.skills?.skillFrontmatter ?? []).map(s => s.name).join(', ')
35
36 return $.model.complete({
37 model: await $.session.model(),
38 system: `Project instructions:\n${files.join('\n')}\n\nInstalled skills: ${skills || 'none'}`,
39 prompt: ask(draft),
40 })
41}
42
43export const register: Register = on => {
44 // Sent by Enter instead of the band's Send: back to idle.
45 on('prompt.submit', async ($, e, next) => {
46 if ((await read($, phase)) === 'ready') await update($, phase, () => 'idle')
47 return next(e)
48 })
49
50 on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
51 if (e.props.hasSurvey) return next(e)
52
53 const { Box, Button, Text } = $.ui.resolve(e)
54 const now = await read($, phase)
55
56 const enhance = async () => {
57 const { text } = await $.prompt.read()
58 if (!text.trim()) return $.ui.toast('Type a prompt first, then Enhance.')
59
60 await update($, phase, () => 'working')
61 const r = await rewrite($, text)
62 if (!r.isAnswered) {
63 await update($, phase, () => 'idle')
64 return $.ui.toast(`Enhance failed: ${r.reason}`)
65 }
66 await update($, original, () => text)
67 await $.prompt.fill({ text: r.text.trim() })
68 await update($, phase, () => 'ready')
69 }
70
71 const send = async () => {
72 const { text } = await $.prompt.read()
73 if (!text.trim()) return
74 await $.prompt.fill({ text: '' })
75 await update($, phase, () => 'idle')
76 await $.prompt.submit({ text, asUser: true })
77 }
78
79 const undo = async () => {
80 await $.prompt.fill({ text: await read($, original) })
81 await update($, phase, () => 'idle')
82 }
83
84 if (now === 'working') {
85 return (
86 <Box>
87 <Text dimColor>✨ Enhancing with project context…</Text>
88 </Box>
89 )
90 }
91
92 if (now === 'ready') {
93 return (
94 <Box>
95 <Text dimColor>✨ Enhanced, review it below </Text>
96 <Button key="send" label="Send" hotkey="s" variant="primary" onPress={send} />
97 <Text> </Text>
98 <Button key="undo" label="Undo" hotkey="u" onPress={undo} />
99 </Box>
100 )
101 }
102
103 return (
104 <Box>
105 <Button key="enhance" label="✨ Enhance" hotkey="e" onPress={enhance} />
106 <Text dimColor> rewrite the draft with project context</Text>
107 </Box>
108 )
109 })
110}
111types/index.d.ts 8 lines1export type Phase = 'idle' | 'working' | 'ready'
2
3declare module 'claude-code' {
4 interface PluginState {
5 'prompt-enhancer': { phase: Phase; original: string }
6 }
7}
8