/message:message [--<destination> e.g. --x --linkedin --whatsapp --plain] [--tier premium] [path to existing .fragment.md]from message
Creates and edits rich text message drafts for Gmail, Outlook, WhatsApp, Slack, X, LinkedIn, and other social posts with an automatic live browser preview. Use when composing emails, replies, social posts, or revising .fragment.md drafts.
Ships in message. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Fragments are Markdown; the build converts them to each destination's format. The plugin's PostToolUse hook (hooks/auto-serve-fragment.ts, on the Write|Edit matcher in this file's frontmatter) builds the fragment, starts a Bun preview server and opens the browser whenever a .fragment.md is written or edited.
python3 run.cat "${CLAUDE_PROJECT_DIR}/.claude/.message-preview-url" "${CLAUDE_PROJECT_DIR}/.claude/.message-preview-note" 2>/dev/null
Done when you hold a URL. If the URL file is empty or missing, the hook started no server - run the Fallback.Draft ready: email to Sam re invoice follow-up → http://127.0.0.1:XXXX
No output after the URL means a local session: add nothing. A remote-preview: note means the server is on a machine the user may not be sitting at, and a tailnet: line carries a tailnet link - see Remote sessions. When the note has a tailnet: https://... link, give that link instead of the local one.One server per fragment, started by the hook. Never run serve.ts or open <url> yourself while the hook is working - that launches a second server and a second tab.
Revision ("make it shorter", "change the tone"): Read the fragment, apply the change with Edit, then confirm the change in one line with the same URL. The running server hot-reloads the open tab, and the hook restarts it if it had shut down. Edit a fragment only with Write or Edit - the hook fires on those tools alone, so a Bash or Python edit leaves the preview stale.
Several drafts at once: each fragment gets its own server on its own port. A server with no connected tab shuts down after 30 minutes idle; writing or editing the fragment starts a fresh one. The URL of any earlier draft is in ${CLAUDE_PROJECT_DIR}/.claude/.message-previews.json, a map of absolute fragment path to URL.
The server always binds loopback on the machine the agent runs on. Act only when step 3 printed a remote-preview: or tailnet: note.
Tailnet (Tailscale), the easy way to reach a remote preview:
tailnet: https://<node>.<tailnet>.ts.net:<port>/ - the server is also published on the tailnet (MESSAGE_TAILNET=1). Give that link instead of the local URL and skip the SSH command; it opens on any of the user's tailnet devices, phone included, until the server stops.tailnet: available - Tailscale runs here but publishing is off. Give the local URL as below and add one line: set MESSAGE_TAILNET=1 in the shell profile on this machine and restart the agent to get a tailnet link next time.tailnet: failed - <reason> - say why in one line and fall back to the steps below.Publishing is opt-in because it makes the draft reachable from every device on the tailnet, which on a shared or company tailnet is more than the user. It is a foreground tailscale serve that ends with the server, and starts only after the local URL is out, so the local preview never waits on it. MESSAGE_TAILNET=0 skips Tailscale entirely; the hint only appears in a remote session. Logic: scripts/tailnet.ts.
SSH forwarding, without Tailscale:
suspected (SSH variables, or Linux with no display): the guess can be wrong, and nothing was changed. Give the URL as usual and add one line: if it does not load, run the note's ssh -N ... -L command on your own computer, replacing <ssh-host> with the host you connect to, then open the same URL. Remote editors (VS Code, Cursor) forward the port themselves.on (MESSAGE_REMOTE=1 or --remote): no browser was opened, so never say one was. Give the URL and the same command.<ssh-host>; only the user knows the alias they connect with.Run the preflight first. It resolves or installs bun, installs dependencies, self-tests the build and prints the exact serve command, or fails with the fix:
bash "${CLAUDE_PLUGIN_ROOT}/skills/message/scripts/preflight.sh"
Then serve with run_in_background: true, using the bun path the preflight printed:
bun run "${CLAUDE_PLUGIN_ROOT}/skills/message/scripts/serve.ts" /path/to/name.fragment.md
The server prints the output HTML path, then the URL, then any remote note; with tailnet on, a tailnet: line follows a second or two later. Done when you have relayed the URL (the tailnet one when there is one). Later edits hot-reload - one run serves the fragment for the whole session.
The preview opens on one destination chip. Pick it from the user's intent and write it into the fragment - channel: (plus tier: for X) - because the hook starts the server and passes no flags, so the frontmatter is your lever. For any non-email channel, leave out to and subject. Writing or changing channel: in an existing fragment switches the open tab on its next hot reload.
Skill arguments name the destination directly: /message --x ..., --linkedin, --plaintext. Any destination id or alias works as --<name>, and --tier premium sets the X tier. Set the matching channel: / tier:.
| The user says | channel: |
|---|---|
| tweet, post on X, thread | x (tier: premium only if they say they have X Premium) |
| LinkedIn post | linkedin |
| text, WhatsApp to ... | whatsapp |
| Slack message | slack |
| Bluesky, Threads, Mastodon, Reddit post | bluesky, threads, mastodon, reddit |
| just the text, plain text, no formatting | plain |
| Markdown, for a README or a doc | markdown |
| email, reply to, draft an email | none (Gmail), or mail when they name Outlook, Apple Mail or their mail app |
Every other id, label, group and alias: bun run "${CLAUDE_PLUGIN_ROOT}/skills/message/scripts/serve.ts" --list-channels (--json for JSON).
The fragment's channel: / tier: beat the choice remembered in the browser. A ?channel=<id>&tier=<t> on the preview URL beats both and re-points a running server without a restart. Full precedence: references/preview.md ("Destination precedence").
Write a long X, Bluesky, Threads or Mastodon post as one body: past the destination's limit the preview splits it into a numbered thread, one card per post.
Markdown with YAML frontmatter.
---
to: [email protected]
subject: Subject line
cc: optional
bcc: optional
channel: optional - a destination id or alias, e.g. x, slack, linkedin, plaintext
tier: optional - free or premium, for X
---
Body content in Markdown. Supports bold, italic, ~~strikethrough~~, headings, lists, blockquotes, code, tables, links. Embed raw HTML where Markdown falls short.
to and subject for email - no channel, or channel: gmail / mail. Every other channel needs neither.channel (the error lists the valid ids), and an em or en dash in the subject or body (house style: use " - ").Best, newline Alex, and keep each paragraph on one source line - a hard-wrapped paragraph renders with the wraps. A blank line separates paragraphs.| | |) renders as a styled header with no labels; where no natural header exists use Item / Amount, Field / Value or Category / Notes.-1,200, -12%, -AUD 1,200), not accounting brackets.<drafts-dir>/YYYY-MM-DD_recipient_subject.fragment.md
<drafts-dir>/YYYY-MM-DD_recipient_subject.html # generated
<drafts-dir> is the drafts directory the project's CLAUDE.md or AGENTS.md names; if it names none, use the default drafts/ (relative to the project root). The hook fires on any *.fragment.md wherever it lives, so any directory works.
Verify every date, weekday and relative time ("this Thursday", "next week", "the 15th", "COB Friday", "end of the month") with a python3 datetime run, anchored to today's date from the environment context - mental arithmetic is not a check.
python3 -c "import datetime; d=datetime.date(2026,7,17); print(d.strftime('%A %d %B %Y'))"
Done when the weekday matches the calendar date, each relative reference resolves to the intended absolute date, and no date is unintentionally in the past. If the check contradicts the draft, fix the fragment and re-verify.
Customise these for the user's context:
[email protected]Best,\n[Your Name]references/preview.md - open when the user asks how the preview behaves (destination picker, Copy and Open, keyboard shortcuts, counters, X threads), when a table renders unexpectedly, when the browser or an Open button fails on some platform, when running headless (MESSAGE_NO_OPEN), or for what remote mode changes (MESSAGE_REMOTE).Maintainer-only - do NOT load while drafting. You write Markdown; the build script's transforms produce all the inline-styled HTML. Loading these mid-draft will mislead you into hand-writing raw HTML. Open one only to audit or change a transform or a destination.
references/formatting-rules.md - Gmail native HTML the build transform emitsreferences/outlook-formatting.md - Outlook element styles and colour palettereferences/whatsapp-formatting.md - WhatsApp text conversion and fixed-width table mechanicsreferences/plaintext-formatting.md - plain-text conversion rules (X and other social posts)references/destinations.md - every destination: what its composer accepts, limits, compose URLs, sourcesCode lives in ${CLAUDE_PLUGIN_ROOT}/skills/message/scripts/; first-time setup on any machine is the Fallback preflight. Run tests: cd "${CLAUDE_PLUGIN_ROOT}/skills/message/scripts" && bun run test. Build-only without serving: bun run "${CLAUDE_PLUGIN_ROOT}/skills/message/scripts/serve.ts" <fragment> --build-only.
references/destinations.md (opens in a new tab)references/formatting-rules.md (opens in a new tab)references/outlook-formatting.md (opens in a new tab)references/plaintext-formatting.md (opens in a new tab)references/preview.md (opens in a new tab)references/whatsapp-formatting.md (opens in a new tab)scripts/build.ts (opens in a new tab)scripts/bun.lock (opens in a new tab)scripts/cli-args.ts (opens in a new tab)scripts/client/counter.js (opens in a new tab)scripts/client/destinations.js (opens in a new tab)scripts/client/dialects.js (opens in a new tab)scripts/client/mailto.js (opens in a new tab)scripts/client/selection.js (opens in a new tab)scripts/client/text-common.js (opens in a new tab)scripts/client/thread.js (opens in a new tab)scripts/numeric-columns.ts (opens in a new tab)scripts/open-command.ts (opens in a new tab)scripts/open-url.ts (opens in a new tab)scripts/package.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Write|Editcommand -v bun >/dev/null 2>&1 || exit 0; bun run "${CLAUDE_PLUGIN_ROOT}/hooks/auto-serve-fragment.ts"30sThree short reads, in order
email-drafts, social-posts, message-composition, live-preview, fragment
npx claudepluginhub henkisdabro/wookstar-claude-plugins --plugin messageOther plugins' skills for the same job