deck-xhs-post
9-slide 3:4 portrait carousel, warm pastel + dashed sticker cards
1How It Works & Mechanism
This skill is not an executable program, but operates as 'one directory = one template': SKILL.md's frontmatter is used for selector display, and its body serves as the prompt sent to the model; adding a template simply means adding a directory without modifying TypeScript.
routes rescan disk and the client refetches `/api/templates`.
The actual dispatched prompt = platform shared design directives (SHARED_DESIGN_DIRECTIVES) + this skill's SKILL.md body + user content, assembled into a single prompt via assemblePrompt.
Wrap a per-template instruction body with the shared design directives and
The final artifact bypasses the file system: shared directives explicitly forbid file tools like Write/Edit/Bash, requiring the model to stream the entire HTML directly as the response body (stdout is captured and written to disk by the frontend).
**禁止使用 Write / Edit / MultiEdit / Bash / Create / 任何文件系统工具**。不要把 HTML 写到任何 \`.html\` 文件里。前端直接捕获你的 stdout 文本, 文件落盘由前端负责。
The canvas size is specified in SKILL.md as aspect_hint '810×1080 ×9', which example.html realizes as fixed 810×1080 portrait slides declaring a 3:4 aspect ratio.
.tpl-xhs-post .deck{width:810px;height:1080px;position:relative;background:transparent}
The slide count structure provides lower and upper bounds in the prompt: Cover + N content slides + closing CTA, starting from 7 slides for short content, with a recommended total of ≤ 18 (constrained by platform image limits per post).
- Cover + N 个 content 页 + 收尾 CTA (N 由【用户内容】决定, 完整覆盖每个要点; 短内容 7 页起步, 长内容应更多, 受小红书平台单帖图片数约束建议总数 ≤ 18)
The signature stylistic element is the 'dashed sticker': white background, 2.5px dashed border, 18px border-radius, -3deg rotation with a hard drop shadow, available in four color variants: pink, yellow, blue, and green.
.tpl-xhs-post .sticker{position:absolute;padding:10px 18px;background:#fff;border:2.5px dashed var(--text-1);border-radius:18px;font-weight:800;font-size:18px;color:var(--text-1);transform:rotate(-3deg);box-shadow:4px 4px 0 var(--text-1)}
Each slide features a page number capsule in the top-right corner (in the format of 1 / 9), rendered individually by .page-dot, sequentially numbered across the 9 sample slides.
.tpl-xhs-post .page-dot{position:absolute;top:40px;right:48px;background:var(--text-1);color:#fff;border-radius:999px;padding:6px 14px;font-family:'JetBrains Mono',monospace;font-size:14px;font-weight:700;z-index:2}
The narrative structure follows standard content marketing patterns: Cover Hook → Hook (Wait, don't scroll) → Pain (Pain points) → Aha (The revelation) → Step 1/2/3 → Result (Outcomes) → CTA (Save + Follow + Hashtags).
<h1 class="h1 tc mt-s" style="color:var(--accent)">收藏 + 关注 🧡</h1>
The server-side /api/convert performs only three tasks: loads the skill from disk by templateId, concatenates the prompt, and spawns the local agent CLI while forwarding output via SSE stream.
prompt = assemblePrompt({ body: skill.body, content, format });
2Core Capabilities
4Recommended Governance & Evidence
- SKILL.md: Pure prompt directives and rule text, without script execution or external impact
5Second-Pass Verification
- [ok] 9 页 3:4 竖版 — .deck 810×1080,.slide aspect-ratio:3/4;样例共 9 个 slide,页码 1 / 9 至 9 / 9。
- [ok] 「虚线 sticker 卡片」 — .sticker 为 border:2.5px dashed + rotate(-3deg) + 硬阴影,样例每页 1 个、共 5 处不同颜色。
- [discrepancy] 「底部页码 dots」 — SKILL.md 写「底部页码 dots」,但 example.html 用右上角 .page-dot 页码胶囊(top:40px;right:48px),全文无 dots 组件;属提示词与样例的表述偏差,不影响功能。
- [ok] 「暖色 pastel 背景」 — 主题 token --bg:#fef7f3 / --bg-soft:#fff1ea / --surface-2:#fff5ef,为暖粉体系。
- [ok] 页数区间(7 起 / ≤18)与共享指令不冲突 — SKILL.md 明确「短内容 7 页起步, 长内容应更多…建议总数 ≤ 18」,是下限+平台约束,非页数上限;与 shared.ts「模板不定义数量」的口径一致。
- [ok] 无外部资源依赖 — 除字体 @import 外零 URL;图形全为 CSS/SVG,无图片外链。
6Verdict & Scenarios
dc2bf96c0374a3ec…