html-mail-goose

Generates HTML email templates compatible with Gmail, Outlook, and Apple Mail, using table layouts and inline CSS to ensure consistent rendering and supporting responsive design. Suitable for welcome emails, promotions, password resets, notifications, and order confirmations. Triggered when creating marketing emails, transactional emails, newsletters, or when email templates and compatibility are mentioned.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "html-mail-goose" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-c3f92207aa55d840e0ff60b0f2ce3709c59c7a32566903edd242549922bb9dc7. Verify the upstream source and version against https://skillhub.cn/skills/user_a3ed06bc/html-mail-goose before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Generates HTML email templates compatible with Gmail, Outlook, and Apple Mail, using table layouts and inline CSS to ensure consistent rendering and supporting responsive design. Suitable for welcome emails, promotions, password resets, notifications, and order confirmations. Triggered when creating marketing emails, transactional emails, newsletters, or when email templates and compatibility are mentioned.

0 Downloads

Introduction source: third_party · user_a3ed06bc · 1.8.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Software, accounts and paid services
cd ~/.openclaw/workspace/mail-agent-goose npm install
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: html-mail-goose
slug: html-mail-goose
version: "1.8.0"
displayName: HTML邮件模板生成器
description: "生成兼容 Gmail/Outlook/Apple Mail 的 HTML 邮件模板,采用 table 布局和 inline CSS 确保一致渲染,支持响应式设计。适用于欢迎邮件、促销邮件、密码重置、通知邮件和订单确认邮件等场景。当用户需要创建或设计营销邮件(EDM)、事务性邮件、Newsletter,或提及邮件模板、HTML 邮件、兼容性设计等关键词时触发。"
license: MIT
type: tool

Email Template Designer

生成专业的 HTML 邮件模板,完全兼容 Gmail、Outlook、Apple Mail 等主流邮件客户端。采用 table 布局 + inline CSS 方案,确保在所有客户端中渲染一致,同时通过 media query 实现移动端响应式适配。


📦 安装

📦 通过 SkillHub 安装(推荐):

skillhub install html-mail-builder --dir ~/.openclaw/workspace/skills/

安装后需重启 Gateway:openclaw gateway restart


🎯 触发方式(说什么能唤醒这个技能)

以下任一关键词都能触发:

"帮我生成一封欢迎邮件" / "做个营销邮件模板" / "HTML邮件" / "邮件模板" / "EDM" / "Newsletter" / "密码重置邮件" / "订单确认邮件" / "通知邮件" / "促销邮件" / "设计一封邮件"


⚡ 快速开始

直接告诉 AI 你想要什么邮件,AI 会帮你完成整个流程:

"帮我生成一封欢迎新用户的邮件,公司叫 XX科技,主色调蓝色"
"做一个促销邮件模板,有商品展示和优惠码"
"生成一封订单确认邮件"

流程说明

步骤 AI 做什么 你需要提供什么
1 收集需求 邮件类型 + 品牌信息
2 生成 JSON 配置 确认内容是否正确
3 调用脚本生成 HTML —
4 交付文件路径 —
5 提醒替换占位内容 实际图片和链接

📋 支持的模板类型

类型 触发关键词 典型用途
welcome 欢迎邮件、新用户 新用户注册引导
promotional 促销邮件、营销、优惠 节日促销、商品推广
password_reset 密码重置、安全邮件 账户安全类
notification 通知邮件、系统消息 状态更新提醒
order_confirmation 订单确认、购买成功 电商交易确认

🔧 你需要告诉 AI 的信息

必填项

  1. 邮件类型:欢迎?促销?密码重置?通知?订单确认?
  2. 公司名称:邮件里显示的品牌名
  3. 主色调:品牌的主颜色(十六进制,如 #4A90D9)

选填项(AI 会用默认值)

  • Logo 图片地址(没有可留空,用公司名文字代替)
  • 邮件具体内容(没有 AI 会生成示例内容)
  • 按钮文字和跳转链接

⚠️ 能力边界(它做不到的事)

  • ❌ 不支持直接修改已有模板(只生成新模板)
  • ❌ 不支持 Word/PDF/纯文本格式(只输出 HTML)
  • ❌ 不支持在邮件里内嵌 base64 图片(必须用外部 HTTPS URL)
  • ❌ 不支持变量占位符自动替换(内容是写死的,需手动替换)
  • ❌ 不支持发送邮件(只生成模板文件)

⚠️ 技术约束补充:

  • 图片字段(logo_url / hero_image_url / image_url):仅支持外部 HTTPS URL,不支持 base64
  • 颜色字段(theme.*_color):仅支持 #RRGGBB / #RGB 格式,不支持 hsl() / rgba() / CSS 变量
  • 生成的 HTML 文件大小:建议单封邮件 HTML ≤ 500KB,过大的文件可能被邮件客户端截断
  • features / products 数组:无硬性数量上限,但内容过多可能影响渲染性能

💾 输出说明

生成后你会得到:

  • 一个 .html 文件路径
  • AI 会在浏览器帮你打开预览
  • 图片用 https://placehold.co/ 占位,记得替换为真实图片链接

❌ 常见错误与解决

错误:图片不显示

邮件不支持本地图片,必须用外部 URL。把 https://placehold.co/... 替换为实际图片地址。

错误:按钮点击没反应

确认按钮链接不是 #,替换为真实 URL。

错误:Outlook 样式错乱

正常,这是 table 布局的正常现象,Web 邮箱(Gmail/QQ/163)显示效果最佳。

错误:提示"不支持的模板类型"

把 template_type 改为:welcome / promotional / password_reset / notification / order_confirmation 其一。

错误:生成的文件是空的

检查 JSON 格式是否正确(引号、逗号),并确认 template_type 字段存在。


📧 五种模板说明

1. Welcome(欢迎邮件)

适合新用户注册后发送,含公司介绍和功能亮点,引导用户快速上手。

需要提供:

  • 公司名称
  • 品牌主色调
  • CTA 按钮链接
  • (可选)Logo URL、3 个功能亮点

2. Promotional(促销邮件)

适合营销活动,含商品展示、优惠码和 CTA 按钮,适合节日促销和商品推广。

需要提供:

  • 活动标题和副标题
  • 商品信息(名称、图片、价格)
  • 优惠码
  • CTA 按钮链接

3. Password Reset(密码重置邮件)

适合用户发起密码重置时发送,简洁安全,含重置链接。

需要提供:

  • 用户名
  • 重置链接(必填,不能是 #)
  • 链接有效期

4. Notification(通知邮件)

适合系统通知,含标题、内容和可选的详情列表,适合订单状态更新等场景。

需要提供:

  • 通知标题
  • 通知内容
  • (可选)详情列表(key-value 格式)
  • CTA 按钮链接

5. Order Confirmation(订单确认邮件)

适合电商交易,含商品列表、金额汇总和收货地址。

需要提供:

  • 用户名
  • 订单号和下单时间
  • 商品列表
  • 总金额和收货地址
  • CTA 按钮链接

🛠 技术细节

生成命令

python generate_email_template.py --input config.json --output email.html

邮件兼容性

生成的 HTML 遵循以下邮件兼容性最佳实践:

  • Table 布局:所有结构使用 <table> 而非 <div>,确保 Outlook 兼容
  • Inline CSS:所有核心样式通过 style 属性内联
  • 响应式设计:通过 <style> 标签中的 @media 查询实现移动端适配(支持 Gmail/Apple Mail/iOS)
  • Web-safe 字体:默认 Arial/Helvetica,不依赖自定义字体
  • 固定宽度 + 流式回退:邮件主体 600px 宽度,移动端自动缩放至 100%
  • MSO 条件注释:包含 Outlook 专用条件注释确保正确渲染
  • VML 按钮:CTA 按钮使用 VML 兼容方案确保 Outlook 中显示圆角按钮
  • Preheader 文本:支持邮件预览文本设置

图片要求

  • 图片必须使用外部 URL(邮件不支持 base64 内嵌图片或相对路径)
  • 推荐占位图服务:https://placehold.co/600x300/EEE/333?text=Your+Image
  • 所有图片须设置显式宽度和 alt 文本

JSON 配置结构

{
  "template_type": "welcome",
  "theme": {
    "primary_color": "#4A90D9",
    "secondary_color": "#2C5282",
    "accent_color": "#ED8936",
    "bg_color": "#F7FAFC",
    "content_bg_color": "#FFFFFF",
    "text_color": "#2D3748",
    "muted_text_color": "#718096",
    "font_family": "Arial, Helvetica, sans-serif",
    "max_width": 600,
    "border_radius": 8
  },
  "header": {
    "logo_url": "",
    "logo_alt": "Company Logo",
    "company_name": "MyCompany"
  },
  "preheader": "显示在收件箱预览中的文本",
  "footer": {
    "company": "MyCompany Inc.",
    "address": "北京市朝阳区xxx路1号",
    "unsubscribe_url": "#",
    "support_email": "support@example.com",
    "extra_links": [
      {"text": "官网", "url": "https://example.com"}
    ]
  },
  "content": {
    ...(因模板类型而异,见上方各模板说明)
  }
}

主题色默认值

字段 默认值 说明
primary_color #4A90D9 主色调(按钮、链接等)
secondary_color #2C5282 深色调(标题等)
accent_color #ED8936 强调色(优惠码、价格等)
bg_color #F7FAFC 页面背景色
content_bg_color #FFFFFF 内容区背景色
text_color #2D3748 正文颜色
muted_text_color #718096 次要文字颜色
max_width 600 邮件主体最大宽度(px)
border_radius 8 圆角大小(px)

⚙️ 各模板 content 字段详解

Welcome

{
  "user_name": "张三",
  "greeting": "欢迎加入 MyCompany!",
  "message": "感谢你注册成为我们的用户。以下是帮助你快速上手的功能介绍。",
  "cta_text": "开始使用",
  "cta_url": "https://example.com/get-started",
  "features": [
    {"icon": "📊", "title": "数据仪表盘", "description": "实时查看关键指标"},
    {"icon": "🤝", "title": "团队协作", "description": "邀请团队成员一起工作"},
    {"icon": "🔔", "title": "智能提醒", "description": "重要事项自动通知"}
  ]
}

Promotional

{
  "headline": "夏日特惠 — 全场低至5折",
  "sub_headline": "限时优惠,错过等明年",
  "hero_image_url": "https://placehold.co/600x300/EEE/333?text=Sale+Banner",
  "products": [
    {
      "name": "经典款T恤",
      "image_url": "https://placehold.co/200x200/EEE/333?text=T-Shirt",
      "original_price": "¥299",
      "sale_price": "¥149",
      "url": "https://example.com/product/1"
    }
  ],
  "offer_code": "SUMMER50",
  "offer_expires": "2026-06-30",
  "cta_text": "立即抢购",
  "cta_url": "https://example.com/sale"
}

Password Reset

{
  "user_name": "张三",
  "message": "我们收到了重置你账户密码的请求。如果这不是你本人操作,请忽略此邮件。",
  "reset_url": "https://example.com/reset?token=abc123",
  "cta_text": "重置密码",
  "expires_in": "24小时",
  "support_email": "support@example.com"
}

Notification

{
  "title": "你的报告已生成",
  "message": "你请求的月度数据报告已经准备完毕,可以点击下方按钮查看。",
  "details": [
    {"label": "报告类型", "value": "月度数据汇总"},
    {"label": "生成时间", "value": "2026-04-14 10:00"},
    {"label": "数据范围", "value": "2026-03-01 ~ 2026-03-31"}
  ],
  "cta_text": "查看报告",
  "cta_url": "https://example.com/reports/202603"
}

Order Confirmation

{
  "user_name": "张三",
  "order_number": "ORD-20260414-001",
  "order_date": "2026-04-14",
  "items": [
    {"name": "无线蓝牙耳机", "quantity": 1, "price": "¥399"},
    {"name": "手机壳", "quantity": 2, "price": "¥59"}
  ],
  "subtotal": "¥517",
  "shipping": "¥0",
  "total": "¥517",
  "shipping_address": "北京市海淀区中关村大街1号",
  "cta_text": "查看订单",
  "cta_url": "https://example.com/orders/ORD-20260414-001"
}

📤 交付流程

  1. AI 生成 JSON 配置 → 给你确认内容
  2. 调用 python generate_email_template.py --input config.json --output email.html
  3. AI 告知文件路径,并在浏览器打开预览
  4. 你替换占位图片和链接为真实内容
  5. 将最终 HTML 粘贴到邮件营销工具(Mailchimp、SendGrid 等)或直接发送

🚀 联动:部署到 GooseHost 预览

生成的 HTML 文件可以直接上传到 GooseHost 作为线上预览页,方便分享给同事查看效果。

两步搞定:

# 1. 部署到 GooseHost
goosehost deploy ./email.html

# 2. 获得线上访问地址,例如:
# https://page.goose.cc.cd/s/email

📦 GooseHost 安装方法:


# 1. 安装 CLI
# 2. 通过 SkillHub 安装 OpenClaw 插件
skillhub install goosehost --dir ~/.openclaw/workspace/skills/
# 3. 开启权限并重启
openclaw config set tools.elevated.enabled true
openclaw gateway restart
# 4. 登录
goosehost login --email 你的邮箱 --password ***
💡 **适用场景**:
- 给同事/客户发预览链接,不用附件
- 邮件模板用于邮件营销工具前,先线上预览
- 把 HTML 当作临时静态页面分享

联动使用示例:

# 先生成模板
python generate_email_template.py --input welcome.json --output welcome.html

# 再部署
goosehost deploy ./welcome.html --slug 我的欢迎邮件
# 访问:https://page.goose.cc.cd/s/我的欢迎邮件

如需在 GooseHost 上管理这些预览页,可使用 /goosehost list 查看,/goosehost delete --slug 名称 --force 删除。

⚠️ 提醒:GooseHost 部署的是纯 HTML 页面,不是真正的邮件发送。如需发送邮件,需将 HTML 内容粘贴到邮件营销工具中。

📧 联动:生成后直接发送(mail-agent)

生成的邮件模板完成后,可以用 mail-agent 直接发送,不需要手动复制粘贴:

# 1. 生成模板
python html-mail-builder/generate_email_template.py --input welcome.json --output welcome.html

# 2. 用 mail-agent 发送 HTML 邮件
node mail-agent/smtp.js send --to user@example.com \
  --subject "欢迎加入 MyCompany" \
  --html-file ./welcome.html

# 3. 邮件正文就是生成的 HTML 内容

mail-agent 安装方法:

# 1. 下载 skill
skillhub install mail-agent-goose --dir ~/.openclaw/workspace/skills/

# 2. 进入目录安装依赖
cd ~/.openclaw/workspace/mail-agent-goose
npm install

# 3. 配置邮箱
bash setup.sh
# 或手动创建 .env 文件

💡 组合使用:一行命令生成模板 → 一行命令发送,不用打开浏览器!

Current listing version

1.8.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供专业 HTML 邮件模板生成能力,解决主流邮件客户端兼容性问题
  • 支持欢迎、促销、密码重置、通知、订单确认等多种常见邮件类型
  • 具有明确实际使用价值和广泛受众
Trigger Precision90/100

Highlights

  • 触发词覆盖全面且边界清晰(欢迎邮件、营销邮件模板、HTML邮件、EDM等)
  • description 内容完整位于顶层 frontmatter
Structure and Standards90/100

Areas to improve

  • 文档长度 Reported severity: Minor

    主文档约 480 行,接近 500 行限制

    Recommendation: 建议将部分技术细节或模板说明拆分到独立文件,提升可读性

Highlights

  • 文档结构完整,含步骤说明、端到端示例、各模板详细说明
  • frontmatter 完整,技术约束和常见问题覆盖全面
Execution Reliability88/100

Highlights

  • 工具调用命令明确,参数说明清晰
  • 覆盖主要异常场景并提供解决方案
  • 技术约束详尽(HTTPS URL、颜色格式、文件大小限制等)
Evidence Verifiability (mean of the first four)88/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 434
  • Invoke commands or scripts

    Read the script and arguments first. Use ordinary privileges and a scoped directory; confirm installation or execution in your host tool.

    Mentioned in main document · lines 437
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • example.com
  • page.goose.cc.cd
  • placehold.co

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

cd ~/.openclaw/workspace/mail-agent-goose npm install

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.