电子邮件模板生成器:AI 驱动的响应式模板 - Openclaw Skills

作者:互联网

2026-04-17

AI教程

什么是 电子邮件模板生成器?

电子邮件模板生成器是一款专门设计的工具,旨在消除编写 HTML 邮件代码的烦恼。通过利用 Openclaw Skills,开发人员可以绕过基于表格的布局、内联 CSS 和 Outlook 特有的黑科技等复杂问题。它将简单的提示词转换为强大、生产就绪的代码,可在所有主流邮件客户端中正确渲染。

无论您需要事务性验证邮件还是复杂的营销通讯,此工具都能提供所需的脚手架,确保您的消息在 Gmail、Apple Mail 甚至旧版 Outlook 中看起来都很专业。它原生支持 React Email 和 MJML 等现代框架,使其成为任何开发人员工具库中的通用补充。

下载入口:https://github.com/openclaw/skills/tree/main/skills/lxgicstudios/email-template-gen

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install email-template-gen

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 email-template-gen。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

电子邮件模板生成器 应用场景

  • 为 Web 应用程序构建和自动化事务性电子邮件系统。
  • 创建支持深色模式的响应式营销通讯。
  • 现代化遗留电子邮件模板以符合当前的 Web 标准。
  • 使用 Openclaw Skills 生成 MJML 或 React Email 组件以进行快速原型设计。
电子邮件模板生成器 工作原理
  1. 用户通过 CLI 命令提供所需电子邮件模板的自然语言描述。
  2. 该技能处理描述以确定布局要求,包括表格、按钮和响应式断点。
  3. 引擎以请求的格式(如标准 HTML、MJML 或 React Email)生成模板。
  4. 最终代码输出到终端或直接保存到文件中以进行即时测试。

电子邮件模板生成器 配置指南

确保已安装 Node.js 18+。在执行命令之前,必须将 OpenAI API 密钥设置为环境变量。

# 设置您的 API 密钥
export OPENAI_API_KEY='your_api_key_here'

# 通过 npx 直接运行生成器
npx ai-email-template "带有验证按钮的欢迎邮件"

电子邮件模板生成器 数据架构与分类体系

该技能根据指定的格式标志组织生成的内容。它处理以下数据结构:

格式 输出扩展名 描述
HTML .html 为了最大兼容性而采用的标准表格布局。
React .tsx / .jsx 与 React Email 框架兼容的组件。
MJML .mjml 可编译为邮件安全 HTML 的抽象标记语言。

所有 Openclaw Skills 输出都设计为自包含且可直接部署。

name: email-template-gen
description: Generate responsive email templates. Use when building transactional emails.

Email Template Generator

Email HTML is stuck in 1999. Tables, inline styles, outlook hacks. Describe what you want and get a template that actually works everywhere.

One command. Zero config. Just works.

Quick Start

npx ai-email-template "welcome email with verify button"

What It Does

  • Generates responsive email templates
  • Works in Gmail, Outlook, Apple Mail, and more
  • Supports HTML, React Email, and MJML
  • Includes dark mode support

Usage Examples

# Welcome email
npx ai-email-template "welcome email with verify button"

# Order confirmation
npx ai-email-template "order confirmation with items table" -f react

# Password reset
npx ai-email-template "password reset" -o reset.html

# Newsletter
npx ai-email-template "weekly newsletter with header and article cards"

Best Practices

  • Test in Litmus or Email on Acid - every client is different
  • Keep it simple - complex layouts break in Outlook
  • Use web fonts sparingly - many clients ignore them
  • Always include plain text - some people prefer it

When to Use This

  • Building transactional email system
  • Creating marketing email templates
  • Updating legacy email templates
  • Need a starting point for React Email

Part of the LXGIC Dev Toolkit

This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.

Find more:

  • GitHub: https://github.com/LXGIC-Studios
  • Twitter: https://x.com/lxgicstudios
  • Substack: https://lxgicstudios.substack.com
  • Website: https://lxgicstudios.com

Requirements

No install needed. Just run with npx. Node.js 18+ recommended. Needs OPENAI_API_KEY environment variable.

npx ai-email-template --help

How It Works

Takes your description and generates email templates using table-based layouts that work across email clients. For React Email format, it generates proper components. For MJML, it generates the markup that compiles to email-safe HTML.

License

MIT. Free forever. Use it however you want.

相关推荐