message
This skill uses Claude hooks which can execute code automatically in response to events. Review carefully before installing.
Message Drafts
Bun-based preview server. Fragments are written in Markdown - the build script converts to platform-specific HTML. The plugin's PostToolUse hook (hooks/auto-serve-fragment.ts, registered in this file's frontmatter on the Write|Edit|MultiEdit matcher) auto-builds, starts the preview server, and opens the browser whenever a .fragment.md is written or edited.
Flow
- Write the
.fragment.mddirectly todata/writing/email_drafts/in ONE Write tool call. Do NOT write the email body inline in your response before the Write call. Compose the draft mentally and write it straight to the file - the preview server renders it. - After the Write tool returns, read the URL the hook wrote:
cat "${CLAUDE_PROJECT_DIR}/.claude/.message-preview-url" 2>/dev/null - Reply with only the preview URL and a one-line summary:
Draft ready: email to Sam re invoice follow-up → http://127.0.0.1:XXXX
The hook has already started the server and opened the browser by the time the Write tool returns. Do NOT run bun run serve.ts yourself. Do NOT call open <url>. Do NOT launch a second server. The browser is already open.
Always relay the preview URL to the user. Read it from .claude/.message-preview-url. If that file is empty or missing, the hook did not start a server - run the manual Fallback below rather than guessing at a URL.