UserPromptSubmit block hook and an MCP stdio server. The hook launches the Local Composer, blocks execution until you approve, and dispatches via clipboard fallback because Claude Code does not expose a direct same-session prompt API.
Verified version
EISPATCH v1.1.0 is verified with Claude Code2.1.332.
Installation
Run the installer from the cloned repository:--target <dir> flag to install into an alternate home directory.
What the installer writes
The installer modifies three locations under the target home.~/.claude/skills/eispatch/SKILL.md
~/.claude/skills/eispatch/SKILL.md
The EISPATCH skill file containing instructions and metadata for the Claude Code skill system.
~/.claude.json
~/.claude.json
Adds an MCP server entry under Existing servers are preserved; only the
mcpServers.eispatch:eispatch key is added or updated.~/.claude/settings.json
~/.claude/settings.json
Merges a Other hooks in
hooks.UserPromptSubmit entry:settings.json are not touched.Check error messages
If verification fails, the installer prints one of these errors:Hook flow
When you submit a prompt, the hook processes JSON from stdin containingprompt, session_id, and cwd. It then follows this flow:
1
Intercept
The hook matches the trigger prefix and determines EISPATCH should handle the prompt.
2
Launch Local Composer
A detached process spawns
core/launch-local-composer.mjs with --host claude-code, the prompt, workspace path, and a temporary ready-file path.3
Wait for ready signal
The hook waits up to 2.5 seconds for the ready file to contain
url, port, and pid.4
Block and respond
The hook outputs a block message with
composerUrl so you can open the Local Composer.Block output
When the Local Composer launches successfully, the hook outputs:Clipboard fallback flow
1
Open composer
Click the URL from the block output, or start the composer manually with
npm run preview.2
Review and approve
Review capabilities, edit the final prompt, and click Approve.
3
Dispatch
Click Dispatch to copy the approved prompt to your clipboard.
4
Paste
Paste the compiled prompt into Claude Code. Prompts containing the compiled marker (
<!-- DISPATCH_COMPILED_PROMPT) pass through the hook automatically.