message

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Message Drafts

消息草稿

Create rich text messages that paste perfectly into Gmail, Outlook, or convert to WhatsApp-formatted text. Fragments are written in Markdown - the build script converts to platform-specific HTML automatically.
创建可完美粘贴到Gmail、Outlook,或转换为WhatsApp格式文本的富文本消息。片段以Markdown编写——构建脚本会自动将其转换为适配各平台的HTML。

Setup

安装

The assembly script requires the Python
markdown
package:
pip install markdown
组装脚本需要Python的
markdown
包:
pip install markdown

Architecture

架构

Claude writes              Build script assembles          Output (separate file)
name.fragment.md  --->     Markdown -> HTML                name.html
(10-30 lines)              Gmail transform (tags)          (self-contained preview
                           Outlook transform (styles)       with three body versions)
                           Inject into shell.html
The fragment is the source of truth. The assembled HTML is a derived output. Never edit the
.html
output directly.
Claude 编写              构建脚本组装          输出(单独文件)
name.fragment.md  --->     Markdown -> HTML                name.html
(10-30行)              Gmail转换(标签处理)          (包含三种正文版本的独立预览文件)
                           Outlook转换(样式处理)
                           注入到shell.html
片段是唯一的可信源。生成的HTML是衍生输出。请勿直接编辑
.html
输出文件。

Create Workflow

创建流程

  1. Draft email content in conversation
  2. Write a
    .fragment.md
    file to
    data/writing/email_drafts/
  3. Run the assembler to produce the full preview HTML
  4. Launch the preview server
bash
python3 ${CLAUDE_PLUGIN_ROOT}/skills/message/scripts/assemble.py /path/to/name.fragment.md --serve
This single command assembles the fragment into a full HTML preview and launches the server. Run with
run_in_background: true
.
  1. 在对话中起草邮件内容
  2. .fragment.md
    文件写入
    data/writing/email_drafts/
    目录
  3. 运行组装器生成完整的预览HTML
  4. 启动预览服务器
bash
python3 ${CLAUDE_PLUGIN_ROOT}/skills/message/scripts/assemble.py /path/to/name.fragment.md --serve
该单一命令会将片段组装为完整的HTML预览并启动服务器。运行时设置
run_in_background: true

Edit Workflow

编辑流程

When editing an existing email (argument provided, or user asks to change something):
  1. Read the small
    .fragment.md
    file
  2. Use the Edit tool to make targeted changes
  3. Re-run the assembler to rebuild the preview
bash
python3 ${CLAUDE_PLUGIN_ROOT}/skills/message/scripts/assemble.py /path/to/name.fragment.md --serve
当编辑现有邮件时(提供了参数,或用户要求修改内容):
  1. 读取小型
    .fragment.md
    文件
  2. 使用编辑工具进行针对性修改
  3. 重新运行组装器以重建预览
bash
python3 ${CLAUDE_PLUGIN_ROOT}/skills/message/scripts/assemble.py /path/to/name.fragment.md --serve

Fragment Format

片段格式

Fragments are Markdown files with YAML frontmatter:
markdown
---
to: recipient@example.com
cc: optional@example.com
subject: Email Subject
---

Hi **Stuart**,

Here's the ~~old approach~~ new approach.
片段是带有YAML前置元数据的Markdown文件:
markdown
---
to: recipient@example.com
cc: optional@example.com
subject: Email Subject
---

Hi **Stuart**,

Here's the ~~old approach~~ new approach.

Key Points

Key Points

  • First item
  • Second item
Quoted text from previous email
FeatureStatus
AuthDone
Inline
code
and a link.
Cheers, Henrik
undefined
  • First item
  • Second item
Quoted text from previous email
FeatureStatus
AuthDone
Inline
code
and a link.
Cheers, Henrik
undefined

Frontmatter Fields

前置元数据字段

FieldRequiredNotes
to
YesComma-separated recipients
subject
YesEmail subject line
cc
NoHidden in preview if empty
bcc
NoHidden in preview if empty
字段是否必填说明
to
逗号分隔的收件人列表
subject
邮件主题行
cc
为空时在预览中隐藏
bcc
为空时在预览中隐藏

Formatting Reference

格式参考

Standard Markdown maps to platform-specific HTML automatically:
What you wantWrite in Markdown
Bold
**bold**
Italic
*italic*
Strikethrough
~~strikethrough~~
Heading
## Heading
Bullet list
- item
Numbered list
1. item
Blockquote
> quoted text
Inline code
`code`
Code blocktriple backticks
Link
[text](url)
Table`
For features not in standard Markdown, embed HTML directly (it passes through unchanged):
What you wantEmbed as HTML
Custom colour
<span style="color: #c0392b;">red text</span>
Large text
<font size="4">larger text</font>
Underline
<u>underlined</u>
Indent
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">indented</blockquote>
标准Markdown会自动映射为适配各平台的HTML:
需求Markdown写法
粗体
**bold**
斜体
*italic*
删除线
~~strikethrough~~
标题
## Heading
无序列表
- item
有序列表
1. item
块引用
> quoted text
行内代码
`code`
代码块三个反引号
链接
[text](url)
表格`
对于标准Markdown不支持的功能,可直接嵌入HTML(会原样保留):
需求HTML嵌入写法
自定义颜色
<span style="color: #c0392b;">red text</span>
大号文本
<font size="4">larger text</font>
下划线
<u>underlined</u>
缩进
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">indented</blockquote>

Example: User Asks for Colour and Strikethrough

示例:用户要求添加颜色和删除线

User: "Write an email to Stuart. Strikethrough '$5000' and make his name red."

Claude writes .fragment.md:

---
to: akumanostuart@gmail.com
subject: Pricing Update
---

Hi <span style="color: #c0392b;">Stuart</span>,

The old pricing was ~~$5000~~ but the new rate is $3000.

Cheers,
Henrik
用户:“写一封给Stuart的邮件。给$5000加上删除线,把他的名字改成红色。”

Claude 编写的.fragment.md:

---
to: akumanostuart@gmail.com
subject: Pricing Update
---

Hi <span style="color: #c0392b;">Stuart</span>,

The old pricing was ~~$5000~~ but the new rate is $3000.

Cheers,
Henrik

File Naming

文件命名规则

data/writing/email_drafts/YYYY-MM-DD_recipient_subject.fragment.md   <- source
data/writing/email_drafts/YYYY-MM-DD_recipient_subject.html          <- assembled output
Examples:
  • 2026-02-12_veronika_audit-proposal.fragment.md
  • 2026-02-12_danielle_project-update.fragment.md
data/writing/email_drafts/YYYY-MM-DD_recipient_subject.fragment.md   <- 源文件
data/writing/email_drafts/YYYY-MM-DD_recipient_subject.html          <- 组装后的输出文件
示例:
  • 2026-02-12_veronika_audit-proposal.fragment.md
  • 2026-02-12_danielle_project-update.fragment.md

Platform Transforms

平台转换规则

The build script produces three HTML versions from a single Markdown source:
Gmail (tag transform): Converts semantic HTML to Gmail-native elements.
<p>
becomes
<div>
,
<strong>
becomes
<b>
,
<em>
becomes
<i>
, headings become
<font size>
with
<b>
. Container gets Arial 13px. No custom colours added - only platform defaults.
Outlook (style injection): Adds inline styles to every element for Word's rendering engine. Aptos/Calibri 11pt, explicit
color: #000000
on every text element,
mso-line-height-rule
for spacing control. No custom colours added - only platform defaults.
WhatsApp (text conversion): Strips HTML and converts to WhatsApp markdown -
*bold*
,
_italic_
,
~strikethrough~
. Tables become pipe-separated text.
User-specified inline styles (colours, font sizes) are preserved through all transforms.
构建脚本会从单个Markdown源生成三种HTML版本:
Gmail(标签转换):将语义化HTML转换为Gmail原生元素。
<p>
变为
<div>
<strong>
变为
<b>
<em>
变为
<i>
,标题变为带有
<b>
<font size>
。容器使用Arial 13px字体。不添加自定义颜色——仅使用平台默认值。
Outlook(样式注入):为每个元素添加内联样式以适配Word渲染引擎。使用Aptos/Calibri 11pt字体,为每个文本元素显式设置
color: #000000
,使用
mso-line-height-rule
控制间距。不添加自定义颜色——仅使用平台默认值。
WhatsApp(文本转换):剥离HTML并转换为WhatsApp格式的Markdown——
*bold*
_italic_
~strikethrough~
。表格转换为竖线分隔的文本。
用户指定的内联样式(颜色、字体大小)会在所有转换中保留。

Preview

预览功能

The assembled HTML has a Gmail/Outlook/WhatsApp mode toggle:
  • Gmail mode: Gmail-native HTML with Arial 13px container, Gmail action buttons (Compose in Gmail, Open Gmail Inbox, Copy for Gmail)
  • Outlook mode: Outlook-native HTML with full inline styles, Outlook action button (Copy for Outlook)
  • WhatsApp mode: Converts to WhatsApp-compatible plain text. Action buttons: Copy for WhatsApp, Send via WhatsApp
Instruct user:
  1. Click the URL printed by the server
  2. Select Gmail, Outlook, or WhatsApp mode
  3. Review the email preview
  4. Use the action buttons for their chosen client
组装后的HTML带有Gmail/Outlook/WhatsApp模式切换器
  • Gmail模式:Gmail原生HTML,带有Arial 13px容器,Gmail操作按钮(在Gmail中撰写、打开Gmail收件箱、复制到Gmail)
  • Outlook模式:Outlook原生HTML,带有完整内联样式,Outlook操作按钮(复制到Outlook)
  • WhatsApp模式:转换为WhatsApp兼容的纯文本。操作按钮:复制到WhatsApp、通过WhatsApp发送
指导用户操作:
  1. 点击服务器打印的URL
  2. 选择Gmail、Outlook或WhatsApp模式
  3. 查看邮件预览
  4. 为所选客户端使用对应的操作按钮

Backward Compatibility

向后兼容性

Legacy
.fragment.html
files still work. The assembler detects the extension and uses the appropriate parser. For HTML fragments, the same body is used for all three platform views (matching previous behaviour).
旧版
.fragment.html
文件仍可正常使用。组装器会检测文件扩展名并使用相应的解析器。对于HTML片段,所有三个平台视图将使用相同的正文(与之前的行为一致)。

Tone

语气要求

  • Write naturally, as a human would compose
  • Avoid repetitive language from previous emails in the thread
  • Keep prose flowing, not overly structured
  • Match the recipient's formality level
  • Use British English spelling (colour, analyse, organise, behaviour, centre)
  • 自然撰写,如同人类正常写作
  • 避免线程中之前邮件的重复语言
  • 保持行文流畅,不过度结构化
  • 匹配收件人的正式程度
  • 使用英式英语拼写(colour、analyse、organise、behaviour、centre)

References

参考文档

  • references/outlook-formatting.md
    - Outlook element styles and colour palette reference
  • references/formatting-rules.md
    - Gmail native HTML element reference
  • references/outlook-formatting.md
    - Outlook元素样式和调色板参考
  • references/formatting-rules.md
    - Gmail原生HTML元素参考

After Preview

预览后操作

Once the user has the preview URL, ask whether they'd like to run the humanizer skill on the message to remove any AI writing patterns before sending. Example prompt: "Would you like me to run the humanizer skill on this draft to make it sound more natural?"
当用户获取预览URL后,询问是否要对消息运行humanizer技能以在发送前移除AI写作痕迹。示例提示:“是否需要我对该草稿运行humanizer技能,使其听起来更自然?”