email-marketing
Product launch email, featuring masthead, hero, CTA, specs table, and table-fallback
1How It Works & Mechanism
This skill is not an executable program, but rather "one directory = one template": the frontmatter of SKILL.md is used for selector display, and the body serves as the prompt sent to the model; adding a template simply means adding a directory, requiring no changes to TypeScript.
routes rescan disk and the client refetches `/api/templates`.
The actual prompt dispatched = platform shared design directives (SHARED_DESIGN_DIRECTIVES) + the SKILL.md body of this skill + user content, concatenated into a single prompt by assemblePrompt.
Wrap a per-template instruction body with the shared design directives and
The finalized output bypasses the file system: shared directives explicitly prohibit file tools such as Write/Edit/Bash, requiring the model to stream the entire HTML directly as the response body (stdout is captured and persisted to disk by the front end).
**禁止使用 Write / Edit / MultiEdit / Bash / Create / 任何文件系统工具**。不要把 HTML 写到任何 \`.html\` 文件里。前端直接捕获你的 stdout 文本, 文件落盘由前端负责。
The goal is "HTML capable of rendering in email clients": SKILL.md stipulates a 600px single column, <table role='presentation'> fallback layout, and colors specified via inline styles rather than classes.
- 使用 `<table role='presentation'>` 做布局兜底
The platform-side export pipeline perfectly explains "why inline styles are required": when exporting to WeChat/Email, the front end uses juice to inline the CSS from <style> into each element, as target clients only support inline styles.
Take a full HTML document, extract <body> content, inline all CSS via juice,
The email structure fully follows the product launch email paradigm: Masthead (wordmark + navigation) → Hero image block → Headline lockup (including slanted accent) → Body copy → Primary CTA button → Specs grid → Footer (social + unsubscribe).
<div class="frame" data-od-id="email">
The Hero is a product illustration drawn via inline SVG (a pair of running shoes) without relying on external image links—consisting of multiple paths + two linearGradients for coloring.
<svg class="shoe" viewBox="0 0 600 280" aria-hidden="true">
The visual anchor of the brand tone is the "slanted element": the accent square in the wordmark uses transform: skew(-12deg), and emphasized words in headlines use skew(-8deg) italics, creating a dynamic visual vocabulary suited for sportswear brands.
h1.lockup .axis { color: var(--accent); display: inline-block; transform: skew(-8deg); }
The conversion loop closes in the footer: Unsubscribe + View in browser compliance links alongside a copyright line.
<div><a href="#">Unsubscribe</a> · <a href="#">View in browser</a></div>
The server-side /api/convert performs only three tasks: read the skill from disk according to templateId, assemble the prompt, spawn the local agent CLI, and forward the streamed output via SSE.
prompt = assemblePrompt({ body: skill.body, content, format });
2Core Capabilities
4Recommended Governance & Evidence
- SKILL.md: Pure prompt instructions and rule text, without script execution or external impact
5Second-Pass Verification
- [discrepancy] 「600px 单栏」 — 样例 .frame { max-width: 680px; },为 680px(frontmatter aspect_hint 也写「600 邮件宽」);单栏成立,宽度不符。
- [discrepancy] 「使用 <table role='presentation'> 做布局兜底」 — 样例全文无 <table>、无 role="presentation",改用 <div class="frame"> + grid/flex;邮件客户端(Outlook)对 grid 支持差,规范与样例的兼容性结论相反。
- [discrepancy] 「颜色用 inline style (不要依赖 class)」 — 样例把配色写在 <style> 的 :root 变量与 class 里,仅个别元素用 inline style;与规范相悖(宿主可用 juice 内联补救,但那是导出期行为)。
- [discrepancy] 「Specifications grid (3 列)」 — 样例 .specs-grid 为 repeat(2, 1fr),且实际 4 个 .spec(2 列 × 2 行)。
- [discrepancy] 「Masthead (wordmark 居中)」 — 样例 masthead 为 display:flex; justify-content: space-between,左侧 wordmark + 右侧 SHOP/JOURNAL/MEMBERS 导航,非居中。
- [ok] Hero 为 SVG 占位而非外链图 — <svg class="shoe" viewBox="0 0 600 280"> 含两条 linearGradient 与多段 path,无 <img>。
- [ok] 目录内零脚本/零端点 — 无 <script>、无 CDN、无字体外链;字体族名属本地/系统栈。
6Verdict & Scenarios
ed93a7856ba23d50…