messagelisted
Install: claude install-skill henkisdabro/wookstar-claude-plugins
# 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
1. Write the `.fragment.md` directly to `data/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.
2. After the Write tool returns, read the URL the hook wrote:
```bash
cat "${CLAUDE_PROJECT_DIR}/.claude/.message-preview-url" 2>/dev/null
```
3. 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.
**On revision** ("make it shorter", "change the tone"): use Read to load the fragment, Edit