Community图像github.com

邮件QA

对项目的交易类和摘要类邮件进行质量检查:无需数据库或网络即可渲染每个模板,在600px和375px的明暗模式及无图模式下截图,并检查占位符泄漏(undefined、NaN、{{…}})、预标头、退订链接、替代文本、绝对链接、Outlook安全按钮、视口元标记以及Gmail的102KB截断问题。在邮件模板变更、发送营销活动之前或需要检查邮件外观时使用。

邮件QA 是什么?

邮件QA技能旨在彻底测试和审计项目中的所有邮件模板(包括交易邮件和摘要邮件),无需依赖数据库或网络。它通过渲染每个模板的最终HTML,在不同视口(600px和375px)、明暗模式以及无图模式下进行截图,并自动检查占位符泄漏(如undefined、NaN、{{…}})等静态问题。该技能支持React Email、MJML、模板文字函数等多种渲染器,并能自动生成一个详细的问题列表,包括预标头、退订链接、替代文本、绝对链接、Outlook桌面兼容性、Gmail截断、暗模式对比度以及文案本地化等检查项。用户只需在模板变更后或发送活动前调用此技能,即可获得详细的截图和报告,从而确保邮件在所有客户端和设备上都能正确显示。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/iamk3nnyt/claude-skills/tree/HEAD/skills/email-qa

Installed? Explore more 图像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

邮件QA 是做什么的?

过滤器: $ARGUMENTS 渲染器: ${CLAUDE_SKILL_DIR}/../ui-audit/scripts/render-html.mjs

1. 获取每个模板的最终HTML

  • 已有画廊脚本? 在 package.json 中查找 email-gallery、email:preview 或 emails。如果有脚本能使用固定数据写入每个模板,则运行它并使用其输出目录。
  • 否则编写测试框架 于 /tmp/email-qa/render.ts(除非用户希望保留在仓库内,否则放在仓库外):
    • 导入每个渲染器(React Email 的 render()、模板文字函数、MJML);
    • 使用真实数据调用它,包括边界情况:长名字、缺失的可选字段、0、1 和多个项目,以及两种语言环境;
    • 写入 <template>-<case>.html;
    • 模拟任何读取环境变量、数据库或网络的代码。使用仓库的 tsx 运行它。
  • 始终 QA 最终生成的 HTML,而不是 JSX。

2. 渲染 + 静态检查

node ${CLAUDE_SKILL_DIR}/../ui-audit/scripts/render-html.mjs /tmp/email-qa/out/*.html --out /tmp/email-qa/shots

对于每个文件,这会产生 @600/@375 明暗模式以及 @600-noimg 的截图,并生成包含静态问题的 render.json。请阅读每个模板的检查表。

3. 检查清单(脚本标记之外的检查项)

  • 占位符: 不存在 undefined、NaN、null、[object Object]、{{…}}、Invalid Date、空的 kr、本应隐藏的 0 st。
  • 预标头: 存在、有意义且不是主题的重复。应有足够的填充以防止正文文本泄漏到收件箱预览中。
  • 退订链接: 摘要和营销邮件必须提供(同时需要在发送代码中添加 List-Unsubscribe 和 List-Unsubscribe-Post 标头)。交易邮件可免除;请说明每个模板属于哪种类型。
  • 无图模式: 即使没有图片,消息仍然有意义;每个有意义的图片都有替代文本;分隔符使用 alt="";行动呼吁(CTA)是实时文本而非图片。
  • 暗模式: Logo 有透明或暗色安全变体;不存在深色文字现在变成深色背景上的文字的情况;品牌颜色仍然满足 3:1 对比度。Gmail/Outlook 的强制反转无法模拟,因此将硬编码的 #000 文字放在透明背景上标记为风险。
  • Outlook 桌面版: 使用表格布局,无 flex/grid;为按钮提供 VML 或 mso 内边距回退;宽度使用 width= 属性;避免使用 margin 对块级元素进行间距控制。
  • 链接: 绝对 https:// 链接;如果项目使用 UTM 参数,则需包含;无 localhost 或预览主机;退订链接不应包含跟踪参数。
  • 文案: 全程使用正确的语言环境(对字符串运行 copy-check 规则);发件人名称和回复地址符合项目预期。
  • CTA 在 375px 视口下可见且未被截断。 总大小保持在约 102 KB 以下。

退出标准

  • 每个模板都在所有变体中渲染,并且检查表已被阅读。
  • 没有占位符泄漏或相对链接,并且视口元标记存在。
  • 每个剩余问题都被标记为:bug(已修复)或 risk(已报告)。
  • 向用户提供简短摘要以及截图目录。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

iamk3nnyt/claude-skills

Turns a feature idea into a one-page spec covering problem, audience, MVP scope, non-goals, numbered Given/When/Then acceptance criteria, affected routes, data and emails, and open questions. Use when the user says "brief", "spec this", "scope this" or "what would it take", or before starting a feature whose scope is unclear.

iamk3nnyt/claude-skills

Checks UI copy across locales by comparing key parity between next-intl message catalogs and in-code sv/en COPY objects, finding placeholder and array mismatches and words from the other language leaking in (the "och" in English bug), then manually reviewing claims against terms and pricing and the project's banned phrases. Use after editing copy or translations, before shipping a page with new text, or when asked to proofread or check translations.

iamk3nnyt/claude-skills

Applies an agreed visual direction to a page or component by reusing existing components first, then verifies every width and dark mode with the headless-Chrome audit plus a before/after pixel diff, and reviews against Refactoring UI, Nielsen and WCAG 2.2. Use when asked to redesign, restyle, polish or "make it look like the reference", after design-ref or when the direction is already clear.

iamk3nnyt/claude-skills

Extracts the visual system from a reference site or pasted HTML (colour roles, type scale, spacing scale, radii, shadows, button/card/eyebrow anatomy, tone) and maps it onto the current project's existing tokens as a short token table. Use when the user shares a reference ("make it look like <site>", "in this style", a URL or HTML paste) before a redesign.

相关技能