
Huashu Slide Codex
- 4 installs
- 20 repo stars
- Updated May 23, 2026
- alchaincyf/huashu-slide-codex
huashu-slide-codex is a Codex skill that produces image-based slide decks, WeChat covers, and video thumbnails using Codex's built-in image_gen tool.
About
huashu-slide-codex is a Claude/Codex skill that turns a text brief into finished visual material: image-based slide decks, WeChat article covers, and video thumbnails. It runs inside Codex and generates each image with Codex's built-in image_gen rather than a paid image API. A developer uses it when asked to make a PPT, Keynote, or single cover image. It applies a brand-asset protocol and a per-page-type density rubric so decks read as designed rather than text-stuffed.
- Codex-only skill that generates slides and cover images using the built-in image_gen tool, avoiding external image-API c
- Produces PPTX, Keynote, HTML image decks, WeChat covers, and Bilibili/YouTube video thumbnails from a text brief
- Enforces a slide-density system with four page types (cover, section, content, conclusion), each capped at different tex
Huashu Slide Codex by the numbers
- 4 all-time installs (skills.sh)
- Ranked #1,139 of 1,335 Generative Media skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
huashu-slide-codex capabilities & compatibility
No external image API required; uses Codex's built-in image_gen, described as zero API fees
- Capabilities
- slide generation · image generation · presentation design · cover image · thumbnail generation
- Use cases
- presentations · image generation
- Pricing
- Free
What huashu-slide-codex says it does
Codex-only AI visual material production skill.
Say one sentence — get a finished PPT, WeChat cover, or Bilibili/YouTube thumbnail.
Most "AI PPT" skills wrap Gemini / OpenAI Image / Nano Banana API calls — every slide costs money. **Codex has built-in `image_gen`**
npx skills add https://github.com/alchaincyf/huashu-slide-codex --skill huashu-slide-codexAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 4 |
|---|---|
| repo stars | ★ 20 |
| Last updated | May 23, 2026 |
| Repository | alchaincyf/huashu-slide-codex ↗ |
What it does
Generate an image-based slide deck or a single WeChat/video cover from a text brief using Codex's built-in image generation.
Who is it for?
Codex users who want image-based slide decks or platform cover images without paying for a separate image API
Skip if: Users who need editable text in PowerPoint, or who run in Claude Code or Cursor where the built-in image_gen is unavailable
When should I use this skill?
When the user asks to make a PPT, slides, Keynote, deck, WeChat/article cover, or a Bilibili/YouTube video thumbnail inside Codex
What you get
A finished slide deck or cover image built from Codex's included image_gen, following a brand spec and a density rubric
- PPTX deck
- HTML image deck
- WeChat article cover
By the numbers
- 4 delivery paths (Path 1-4)
- 4 slide page types with per-type density caps
- content page text cap of 220 characters
Files
Huashu Slide Codex
设计哲学:先像huashu-design一样完成设计判断(包含品牌资产协议),再像 Codex 一样把判断执行成一整套图片 PPT 或单张商单配图。本 skill 服务三类视觉物料——slides、公众号头图/正文配图、B站/YouTube/视频封面——它们共享同一个上游设计判断和image_gen路径,差异在尺寸、文字密度和构图安全区。
核心原则
- 本 skill 是 Codex 专用。存在的全部理由是 Codex 自带
image_gen能力,能省下 nano banana / Gemini API / OpenAI Image API 的调用成本。任何修改和 fallback 都必须保留这条定位——不引入generate_image.py、不要求GEMINI_API_KEY/OPENAI_API_KEY、不调用其他第三方图像 API。 - 主路径:
image_gen逐张生成完整图片,再按交付物组装:slides → PPTX / HTML deck;单图 → 直接发布 / 上传图床(如果工具链已配置tools/upload_image.py)。 - 只要当前 agent 环境是 Codex 且内置
image_gen可用,默认相信图片生成能力;不要因为担心中文、字数或版式而先改走 HTML 截图路线。 - 每次图片生成前,先调用/遵守
huashu-gpt-image的 prompt 方法论:中文优先,少堆形容词,优先真实风格/设计师/机构名。Slides 属于信息设计场景,允许 prompt 为了承载结构、文案和版式意图超过 80 字,但仍要避免英文伪结构化废话。封面图反过来——文字越少越好,优先纯视觉。 - 信息密度按页面类型分级,不是"每页都拉满"。120-220 字是内容页的上限,不是目标;其他页面类型必须远低于这个上限(封面 ≤8 字、章节扉页 ≤30 字、结论页 ≤40 字)。详见下方「Slide 页面类型与密度分级」。核心心法:稀疏的内容页比塞满字的内容页更专业——AI 默认会把上限当目标,所以这条要主动反向约束。
- 整套 PPT / 系列封面必须采用同一套视觉系统:同一个风格锚点、同一组颜色倾向、同一类字体气质、同一套图形语言。单页/单图可以变化构图,但不能换审美人格。
- 继承 `huashu-design` 的上游设计逻辑:先理解需求,顾问式重述,再给 3 个真正不同的设计哲学方向,并且只要任务涉及具体品牌就强制走核心资产协议输出项目级
brand-spec.md(详见 Step 0.0)。不要一上来就默认某个风格,除非用户已经明确指定。 - 约束哲学而非形式:先定义"为什么这样设计",再定义"画面长什么样"。风格不是皮肤,是思考路径。
- 项目产物不能直接引用
$CODEX_HOME/generated_images/。生成后先检查图片,再复制到当前项目的配图/、assets/、images/或output/images/目录,并在 PPTX/HTML/Markdown 中引用项目内副本。 - Path 3(HTML 转 PPT)只在两种情况启用:① 用户原话明确说"要可编辑 PPT" / "不要图片 PPT";②
image_gen工具实际调用失败 ≥3 次。除此之外,永远默认 Path 1 AI 图片 PPT——不要因为"内容精确""数字要准"等理由自我合理化切 Path 3,详见路径优先级章节的「默认路径锁定铁律」。
Slide 页面类型与密度分级
整套 PPT 不是同一种页面重复 N 次。一套合格的 deck 至少包含 4 类页面,每类密度上限不同,混合使用才有节奏感。第一页永远是封面,最后一页通常是结论。
| 页面类型 | 文字上限 | 信息块数 | 必含元素 | 禁含元素 |
|---|---|---|---|---|
| 封面页(slide 01 永远是) | ≤8 字(标题)+ 可选副标题 ≤16 字 | 0 | 大标题 + 主视觉 + 可选作者/日期 | 不要章节列表、不要 3-5 个步骤、不要解释段落、不要"它解决三件事"的拆分 |
| 章节扉页 / 转场页 | ≤30 字 | 0-1 | 1 个强判断句 + 1 个隐喻视觉 | 不要内容详情、不要标签列表 |
| 内容页(主要类型) | 80-180 字典型 / 220 字上限 | 2-4 | 标题(判断句)+ 解释(1-3 句)+ 结构(2-4 标签 / 步骤 / 对比项)+ 中心图解 | 单页 ≥5 信息块=过密;超过 220 字=该拆成两页 |
| 结论页 / 收尾页 | ≤40 字 | 0-1 | 1 句大判断 + 1 个标志性视觉 + 可选 CTA | 不要回顾全 deck、不要再列要点 |
密度心法(核心反 slop 准则):
- 上限 ≠ 目标。AI 看到"220 字上限"会默认朝 220 字写。主动反向约束:每页先写"这页核心要让观众记住什么 1 句话",再决定要不要补解释/结构,80 字能讲清的不要拉到 180。
- 同一信息有 3 种表达密度时(一句话 / 一段话 / 一段话+图表),选最稀疏的那种;只有稀疏版讲不清才上稠版。
- 信息块数量是稀疏度的关键指标——3 个比 5 个清晰,2 个比 4 个有力量。
- 一个观点配一个视觉隐喻 > 三栏并列拆分("它解决三件事"这种结构是 AI 拆解默认动作,要警惕)。
- 看完整套 deck,封面要让人看 1 秒就懂主题,内容页要让人看 5 秒抓住主旨,结论页要让人看 0.5 秒记住一句话。三种节奏不一样,密度才合理。
典型 10 页 deck 节奏:01 封面 → 02 章节扉页 → 03-05 内容页 → 06 章节扉页 → 07-09 内容页 → 10 结论页。不要做成 10 页全是内容页(视觉疲劳);也不要 10 页全是封面式(信息缺失)。
启动决策
先判断协作模式,不必机械询问;用户没有特别说明时默认 Guided。
| 模式 | 适合 | 检查点 |
|---|---|---|
| Full Auto | 用户只要最终文件 | 确认主题和交付格式 |
| Guided(默认) | 用户想把控方向 | 大纲、风格、组装前 |
| Collaborative | 逐页审阅 | 每张图生成后 |
确认交付格式:
- PPTX:默认(slides 任务),PowerPoint 和 Keynote 都能打开。
- HTML 图片 deck:适合快速预览、发布到网页、或不需要可编辑 PPT 文件。
- 两者都要:先做图片,再同时导出 PPTX 和 HTML。
- 单图(公众号头图 / 正文配图 / B站·YouTube 封面 / 商单单张):走 Path 4,直接交付 PNG/JPG;不组装 deck。任务里出现"封面""头图""视频封面""配个图""做张图"等单图关键词时优先识别为这一类。
流程档位
根据任务大小选择 Lite 或 Full,避免简单任务被过度流程化。
| 档位 | 适合 | 执行方式 |
|---|---|---|
| Lite | 5页以内、用户已给风格、快速草稿 | 简短重述需求 → 直接写 Deck Bible → 生成全套 |
| Full(默认) | 重要演讲、10页左右、风格不确定、用户强调设计质量 | 顾问式重述 → 3个设计方向 → 选定方向 → 样页/Demo → 批量生成 |
如果用户说“快点”“直接做”“不用选风格”,走 Lite;如果用户说“要好看”“做正式一点”“像作品”,走 Full。
Skill 边界
huashu-design:所有视觉任务的上游设计判断权威——风格选型、品牌资产协议(核心资产协议 v1.1)、5 维评审。本 skill 把它的标准内置执行,不另立标准。huashu-gpt-image:prompt 方法论(中文短句、真实参考名、平台尺寸表)。本 skill 引用它的尺寸表和 prompt 规则。huashu-wechat-image/huashu-xhs-image:常规环境下的公众号 / 小红书配图业务流程(Gemini API / Playwright / ImgBB 上传)。当 agent 在 Codex 环境时,公众号头图/正文配图/视频封面这部分能力直接走本 skill 的 Path 4——同样的标准(尺寸、文字规则、安全区、双钩子互补),但用 Codex 内置image_gen取代外部 API 调用。huashu-slide-codex:把"做 PPT / Keynote / slides + 单张商单/平台配图(公众号封面、正文配图、B站/YouTube 封面)"的任务端到端交付出来。- 当用户只问"这个视觉方向怎么定""给我几个设计风格",优先使用
huashu-design。 - 当用户要实际生成演示文稿或单张商单配图,本 skill 内置必要的
huashu-design逻辑,但最终目标必须是可交付物料。
路径优先级
🔴🔴🔴 默认路径锁定铁律(最高优先级,凌驾下文所有内容)
在 Codex 环境 + 内置 `image_gen` 可用的前提下,默认路径永远是 Path 1(AI 图片 PPT)。永远。永远。永远。
这条规则的存在理由:本 skill 只为 Codex 设计,唯一理由是省 AI 图片生成的 API 成本。如果不走 Path 1 而走 HTML 截图 / HTML 转 PPT,你就直接把 skill 的存在意义清零——用户完全可以不用本 skill。
唯一允许切到 Path 3 的触发器:
- ✅ 用户主动、明确说"文字必须可编辑" / "我要改 PPT 里的字" / "不要图片 PPT" / "做成可以二次编辑的 PowerPoint" —— 这是用户的显式选择,遵从。
- ✅
image_gen实际不可用(不是你担心它不可用,是真的工具调用失败)—— 这是环境硬限制,没办法。
严禁自我合理化切 Path 3 的理由(脑里冒出立刻停下):
- ❌ "内容有版本号/日期/数字要严格准确" —— Codex
image_gen实测能稳定渲染 200 字以内中文 + 数字 + 日期 + 版本号,先信任。 - ❌ "中文可能渲染错" / "用户要求精确/专业感/正式场合" —— 主观焦虑或模糊形容词,不是客观切路径依据。
- ❌ "内容多 / 信息密度高 / 200+ 字" —— 每页 80-180 字是常态;超过 220 字 = 该拆成两页(R6),不是切 Path 3。
- ❌ "版式控制 / 像素级精确" —— Codex 不是 Figma,AI 图片 PPT 不追求这个。
- ❌ "包含表格 / 代码 / 公式" —— 简单的 image_gen 能做;真正复杂表格也是只那一页局部用 Path 3,不是整套切。
- ❌ "保守起见 / 稳一点 / 为了体验" —— 保守 = 把 skill 用废。
禁止句式:「精准文字优先路线」「内容要数字准确所以走 HTML」「这套 PPT 适合走 HTML」—— 看到自己在为切 HTML 找理由,立刻停下回到 Path 1。
自检问句(动手前回答):用户原话里是否出现"可编辑/改字/不要图片PPT"?image_gen 工具是否真的不可用?两条都"否" → 没有任何理由不走 Path 1。
---
Path 1:AI 图片 PPT(默认)
每张 slide 是一张完整图片,包含构图、视觉元素、标题、解释文字和必要数据。默认不是"海报配一句话",而是"信息设计完整的一页演示"。适合发布演讲、课程封面、视频化课件、视觉冲击强的提案。
流程: 1. 深度理解需求,并顾问式重述。 2. 执行核心资产协议(Step 0.0):搜索/索取品牌 logo、产品图、UI 截图,固化到项目 brand-spec.md。涉及具体品牌时这一步是硬约束,不能跳过。资产可直接作为 image_gen 参考图。 3. 确定设计规范 / VI:品牌色、字体气质、标志使用、留白、图形语言、版式秩序——直接读 brand-spec.md。 4. 如果找不到品牌 VI,不要卡住;提供 3 个基础但设计出色的视觉方向供用户选择,或按任务场景默认选择最合适方向。 5. 推荐 3 个差异化设计哲学方向。 6. 用户选择或任务默认选定 1 个方向。 7. 梳理大纲,并确定每一页想呈现的核心内容、文字量和视觉隐喻。 8. 写整套 deck 的视觉系统(Deck Bible),把品牌资产与 VI 规范纳入其中。 9. 为每页写信息量足够的 prompt,将品牌资产、VI 规则、页面内容和主视觉写清楚;如有可用 logo / 产品图 / 参考图,作为 image_gen 的参考图传入。 10. 调用内置 image_gen 直接生成完整 slide 图片。 11. 按设计评审维度检查图片,必要时重生成。 12. 复制图片到项目目录。 13. 用 scripts/create_slides.py 组装 PPTX,或用 scripts/image_deck_html.py 组装 HTML。
Path 2:HTML 图片 Deck
每张 slide 仍是 AI 图片,但交付为网页式演示。适合给用户先看设计方向,也适合不想打开 PowerPoint 的场景。
HTML 图片 deck 的默认形态必须是全屏单页演示:浏览器中一次只展示一张图,支持左右键、上下键、PageUp/PageDown、空格切换上一张/下一张,并保留页码。不要把所有图片纵向铺陈成网页画廊,除非用户明确要求长网页预览。
使用脚本:
uv run [SKILL_DIR]/scripts/image_deck_html.py \
output/images/slide-01.png output/images/slide-02.png \
-o output/deck.html \
--title "演示标题"Path 3:可编辑 HTML → PPT(仅用户显式要求时启用)
这条路径不是"fallback",是"用户显式 opt-in"。先回去看路径锁定铁律——不要因为"我觉得这样更稳"就走这里。
启用条件只有两条(已在路径锁定铁律里写死,这里只是重复强调): 1. 用户原话明确说要可编辑 PPT("文字必须可编辑"/"不要图片 PPT"/"我要改字"/"做成可以二次编辑的")。 2. image_gen 实际调用失败 ≥3 次,确认环境工具异常。
每页生成 720pt × 405pt HTML,再转为 PPTX。必须遵守 references/prompt-templates.md 中的 html2pptx 约束:
div里文字必须包在<p>或<h1>-<h6>。- 不用 CSS 渐变,只用纯色。
- 背景、边框、阴影放在外层
div,不要放在文字标签上。 - 图片用
<img>,不要用background-image。
Path 4:单图配图(公众号头图 / 正文配图 / B站·YouTube 视频封面)
用户给的不是「做一套 PPT」而是「做一张封面 / 做一张配图 / 做个视频封面」时走这条路径。所有上游设计判断(核心资产协议、风格选型、Deck Bible 短版)都复用 Path 1,只是产物是 1-N 张独立图片而不是 deck。这条路径在 Codex 环境下替代 huashu-wechat-image / huashu-xhs-image 的 API 调用,所有标准从那两个 skill 同步过来。
适用场景:
- 公众号头条封面、正文章节插图、正文信息图。
- B站视频封面、YouTube 视频封面、视频缩略图。
- 商单单张主视觉、活动 banner。
- 系列文章 / 系列视频的封面延续。
平台尺寸表(硬底线,prompt 之前必查,与 huashu-gpt-image 同步):
| 平台 | 比例 | 像素 | image_gen 画布建议 |
|---|---|---|---|
| 公众号头条封面 | 2.35:1 | 1800 × 766(也常用 1410 × 600) | 选最接近的 2.35:1 画布 |
| 公众号正文宽图 | 16:9 | 1920 × 1080 | 1536 × 1024 或最近的 16:9 |
| 公众号正文方图 | 4:3 | 1440 × 1080 | 最近的 4:3 |
| 小红书封面 | 3:4 | 1242 × 1660 | 1024 × 1536 |
| B站 / YouTube 视频封面 | 16:9 | 1280 × 720(高清 1920 × 1080) | 1536 × 1024 |
| YouTube banner | 16:9 | 2560 × 1440(安全区 1546 × 423) | 2560 × 1440 |
| 抖音 / 短视频封面 | 9:16 | 1080 × 1920 | 1024 × 1536 纵向 |
封面文字铁律(封面图特有,和 slide 反向):
- 封面优先无文字,纯视觉冲击力。公众号 / B站标题区已经有标题文字,封面再重复一遍是浪费像素。
- 如必须有文字,≤8 字(产品名 / 4 字短语 / 关键概念)。
- 视频封面文字可以稍多,但≤2 行、每行 ≤12 字,并且要大、要居中、要在「中间正方形安全区」内(朋友圈/手机缩略图都会裁两边)。
- 不加额外标签 / badge / 「免费公测」「Chromium 内核」「装上眼睛」类胶囊——这些信息属于正文,不属于封面。
- 不加个人署名 / 水印;不出现「花生」「花叔」字样(除非用户明确要求落款)。
Prompt 防泄漏铁律(封面专用,从 `huashu-wechat-image` 同步):
- ❌ 绝对禁止在 prompt 里出现 "square"、"center square"、"safe zone"、"框"、"边框"、"正方形" —— image_gen 会把这些理解为「在画面中画一个正方形」,导致中央出现明显方块。
- ❌ 不要要求 prompt 渲染「公众号标题」「视频标题」原文 —— 那是平台的标题文本,不是封面的内容。
- ✅ 安全区是给你(agent)判断构图用的内部参考,不写进 prompt。生成后用肉眼检查核心信息是否在中央 766×766(或视频缩略图中心 720×720)内。
配色禁忌:橙底黑字、赛博霓虹、深蓝 #0D1117(GitHub dark mode 烂大街复制)、紫渐变科技感(AI slop 最大公约数)—— 都不要用。深色模式适配:底色用 #F5F5F5 / #1A1A2E,文字用 #595959 / #3F3F3F。
标题×封面互补原则:标题制造点击欲望,封面建立视觉期待。标题「挖了 3 个坑」+ 封面「3 个坑」= 一句话两种表述浪费说服机会。正确:标题问封面答 / 标题抽象封面具象 / 标题情绪封面证据。
系列延续模式(系列文章 / 视频强制启用):找上一封面图作为 image_gen 参考图传入 → prompt 写「基于这张参考图的风格继续设计;这一期主题 X,情感变化 Y,主视觉换成 Z」。例:源码泄露「机器人破墙而出」→ 橙皮书「同一机器人举横幅送书」,风格一脉相承但叙事推进。
🔴 默认 3 版本铁律(重要单图必须)
触发条件:Path 4 的「重要单图」任务——公众号头图、B站封面、YouTube 封面、视频缩略图、商单主视觉、海报。
默认行为:每次自主生成 3 个版本,每版用一个真正不同的设计哲学方向(不是 3 张同款 prompt 重复跑),让用户挑。这是 huashu-design 第 3 条核心原则「给 variations,不给最终答案」在单图场景的落地——重要单图属于"用户一旦发出去就改不了"的高风险产物,多花 2 张 image_gen 调用换 3 倍选择空间是绝对划算的。
3 个版本的差异化约束(每个方向必须真不同,不是配色微调):
| 类型 | 适合 | 示例 |
|---|---|---|
| 安全专业 | 主流可信、能让大部分读者点 | Bloomberg Businessweek、Pentagram 编辑、NYT Magazine |
| 大胆前卫 | 制造视觉冲击、强观点表达 | Neo-Pop、Sagmeister、Experimental Jetset、大字报暖色 |
| 独特差异化 | 有个人 IP / 文化辨识度 | Field Notes × 像素、Snoopy 漫画、Kenya Hara 极简 |
3 个方向必须来自不同流派;禁止"都差不多的 3 个版本"。如果是花叔自家像素风物料,"独特差异化"位默认用花叔像素风,另外两个位选反差大的流派。
例外(明确触发才跳过 3 版本):
- 用户原话「快速做一张」「直接给我最好的版本」「不用选了」
- 系列封面延续模式——已有上一封面,本期只是延续,1 版本即可
- 商单方向已经定好(用户已经在前面对话里选过设计哲学方向)→ 走 1 版本
- 用户明确说「就用花叔像素风」「就用 Bloomberg 风格」→ 走 1 版本
3 版本工作流补丁:Step 0.3 给 3 方向时直接告知"我各生成一张你最后选"——不要等用户先选方向,3 个方向都画(image_gen 便宜,决策时间贵)。任一张 <7 分主动重生成,不让用户从 2 好 1 差里选。命名 封面-v1-bloomberg.png / v2-neopop.png / v3-pixel.png。
Path 4 工作流: 1. 走 Step 0.0 核心资产协议(如涉及具体品牌)。 2. Path 1 的 Step 0.1-0.3(顾问式重述 + 3 个设计哲学方向)。 3. 用 Path 1 的 Step 2(Deck Bible 短版,作为单图的"风格合同")——3 个版本各写一份 Deck Bible 短版,不要共用。 4. 🛑 强制检查点:平台 + 尺寸 + 参考图清单 + 3 个方向 给用户确认。用户给"做个封面"经常不指定平台,这里必须主动列:
- 目标平台(公众号头条 / 公众号正文宽图 / B站封面 / YouTube 封面 / 抖音封面 …)
- 对应像素尺寸(从平台尺寸表里读,不凭记忆)
- 拟传入
image_gen的参考图清单(哪些 logo / 产品图 / 像素风参考 / 上一封面 …) - 拟写入的文字(≤8 字版本 + fallback "纯视觉无文字" 版本)
- 拟生成的 3 个版本方向(除非命中"例外",否则默认 3 版本)
用户确认后再写 prompt。这步漏掉,后面经常发现"做完了才知道用户要的是 B站封面不是公众号头图"。 5. 按平台尺寸表选画布,按封面文字铁律和防泄漏铁律为每个方向写 prompt。 6. 调用 image_gen 生成 3 张(或例外触发时 1 张);优先纯视觉、文字 ≤8 字、不出现禁词。 7. 走 Path 1 的 Step 4(5 维评审)+ 安全区肉眼检查;任一张低于 7 分主动重生成。 8. 复制图片到项目 配图/ 目录,按 封面-vN-方向锚点.png 命名;不直接引用 $CODEX_HOME/generated_images/。 9. 用 skill 自带的图床上传脚本换永久链接——公众号发布必须用网络链接,本地路径在发布后失效。
# 需要 IMGBB_API_KEY(.env 放 cwd / skill 根 / ~/.env 都自动加载);纯 stdlib 无 pip 依赖
python3 [SKILL_DIR]/scripts/upload_image.py 配图/封面-v1.pngkey 没配置 → 让用户去 https://api.imgbb.com 注册免费 key。3 版本先不上传,用户选定终版再上传,省图床配额。 10. 给用户展示 3 个版本 + 简短选择理由(哪版适合点击率 / 哪版适合品味 / 哪版适合系列延续);用户选定后归档其他版本到项目 配图/_备选/。 11. 系列继续走系列延续模式。
个人品牌触发(自带花叔像素风为示例 / 其他用户可替换)
给非花叔用户的提示:assets/personal-brand/ 里 ship 的是花叔本人的像素风品牌资产,作为"个人 IP 自动注入"的工作示例。其他用户使用本 skill 时有两种选项:1. 替换:把自己的 logo / 头像 / 风格示例 PNG 放进 assets/personal-brand/,触发词从「花叔风格」改成自己的品牌名(编辑下面的触发条件)。2. 关闭:删除 assets/personal-brand/ 目录;本节自动不触发,skill 主体(slides / 单图三版本 / 品牌资产协议)功能完整。>
下面以花叔像素风为例描述触发机制,结构对任何个人 IP 都通用。
当用户提到「花叔风格」「花叔的封面」「个人品牌风格」「像素风」「像素风头图」「做成像素风」「像素品牌资产」,或上下文判断这就是花叔自己的公众号 / B站 / 个人 IP 物料时,自动启用以下三张参考图作为 `image_gen` 的参考输入:
| 参考图 | 路径 | 作用 | 必需性 |
|---|---|---|---|
| 像素头像 | assets/personal-brand/像素风头像.png | 锁定花叔本人角色形象——脸、发型、配色、像素颗粒度 | 强制传入(默认) |
| 像素公众号头图示例 | assets/personal-brand/像素公众号头图示例.png | 锁定 2.35:1 头图的版式、留白、文字处理 | 公众号头图任务强制 |
| 像素品牌资产 | assets/personal-brand/像素品牌资产.png | 完整的色板、字形、图形语言、签名细节 | 推荐 |
🔴 花叔角色必须出现(铁律,实测踩过坑)
像素风触发 + 花叔自家物料 → 花叔本人(像素角色形象)必须作为画面主体或可识别的视觉锚点出现——不是"杯子图案""书签脸",是画面里一个真正的角色。
反例(2026-05-23 踩过):「环境派」封面 prompt 写"沿用参考图的像素风颗粒度、配色、角色形象",image_gen 把"角色形象"当成可选风格要素,主视觉变成一本写"环境派"的手册,花叔降级成桌上马克杯图案。
Prompt 必含三段式(花叔像素物料专用)
写 prompt 时按这三段强制结构展开,缺一不可:
【风格】沿用参考图的像素游戏美术、奶油纸底、Field Notes × 像素 8-bit 配色和颗粒度。
【角色】花叔(参考第一张头像图:圆脸、黑发、休闲衬衫的像素人物)作为画面 [位置:左侧 / 中央偏右 / 桌前坐着 ...] 的主体,[动作描述:在看屏幕 / 在整理工具 / 在写白板 ...]。角色识别度优先,不要降级成杯子图案或挂件。
【场景】围绕花叔布置 [本期主题元素]:[具体物件 1 / 物件 2 / 物件 3]。
【文字】≤8 字(如「环境派」/「翻车了」),手写/像素字体,居中或位于明显位置。
【禁】无水印,不出现"花叔"字样的署名标签,不重复公众号标题原文。反例 vs 正例 prompt
❌ 反例(实测翻车版本):
盒把混乱AI工具图标整理成工作流,中央只有一本写"环境派"的手册。Field Notes×像素游戏美术,奶油纸底、黑绿黄褐,无其他文字无水印。
问题:主视觉是"手册"不是"花叔";"角色形象"完全没写进 prompt。
✅ 正例(环境派 AI 工作流应该这么写):
沿用参考图的像素游戏美术、奶油纸底、Field Notes × 像素 8-bit 颗粒度。花叔(参考第一张头像图:圆脸、黑发、像素人物)坐在中央偏左木桌前,把散乱 AI 工具图标按"环境/角色/工具/输出"四类归位到翻开的 CLAUDE.md 手册里。桌上有像素咖啡杯、Field Notes 笔记本、台灯。右上角像素字"环境派"。无水印,不出现"花叔"署名。
其他执行规则
- 不强行套用:只有用户明确要求"花叔风格 / 像素风",或任务上下文显然是花叔自家物料时才启用。商单/客户品牌项目不要用花叔的像素风污染。
- 允许的角色缺席场景(用户必须明确说才能跳过):
- 用户原话「不要把我画进去」「做个纯工具图」「做产品对比图,不要人物」
- 主题是单一产品 review(如「Gemini 4 上手」)且用户明确说"主视觉是产品"
- 系列封面里某一期刻意要"花叔缺席"作为叙事(如「我休假这周」)
- 没有上述明确信号 → 默认花叔必须出现。
- 作为参考图,不作为最终结果:把图片作为 image_gen 的视觉参考输入;prompt 里按三段式展开描述本次需要的画面。
- 像素头像(第一张)是默认强制参考图——不再是"可单选可多选"里的"可选"项;不传它,花叔角色形象会跑偏。
- 启用后这套像素风本身就是花叔的 `brand-spec.md`——不要再额外去搜「花叔品牌色」「花叔字体」之类,直接以这三张图为权威。
Step 0.0:核心资产协议(涉及具体品牌时强制执行)
这是稳定性的生命线。从 huashu-design v1.1 同步过来。Agent 是否走通这个协议,直接决定输出质量是 40 分还是 90 分。不要跳过任何一步。触发条件:任务涉及具体品牌——用户提了产品名/公司名/明确客户(Stripe、Linear、Anthropic、Notion、Lovart、DJI、自家公司等),不论用户是否主动提供了品牌资料。商单 brief 触发,个人物料如果有锚定品牌也触发。
前置硬条件:先用 WebSearch 验证品牌/产品存在且状态已知(发布日期、最新版本、关键规格)。事实错了,设计再好也是错的。
资产识别度排序(必须按这个顺序找)
| 资产类型 | 识别度 | 必需性 |
|---|---|---|
| Logo | 最高 | 任何品牌必备 |
| 产品图 / 渲染图 | 极高 | 实体产品必备 |
| UI 截图 / 界面素材 | 极高 | 数字产品必备 |
| 色值 | 中 | 辅助 |
| 字体 | 低 | 辅助 |
| 气质关键词 | 低 | 辅助 |
只抽色值 + 字体、不找 logo / 产品图 / UI = 违反本协议。用 CSS 剪影替代真实产品图 = 违反本协议。找不到资产硬做 = 违反本协议。宁可停下问用户,也不要用 generic 填充。
5 步硬流程
1. 问:按资产清单一次问全(Logo / 产品图 / UI / 色值 / 字体 / brand guidelines)。 2. 搜官方渠道:<brand>.com/brand、/press、/press-kit、官网 inline SVG、App Store 截图、官方 launch video 截帧。 3. 下载:curl -A "Mozilla/5.0" -L <url> -o assets/<brand>-brand/<file>;产品图取 hero image 高分辨率;UI 取 App Store 产品页或官网 screenshots section。 4. 验证 + 提取:logo 至少两个版本(深底/浅底)+ 透明背景;产品图 ≥2000px;UI 是最新版本;色值用 grep -hoE '#[0-9A-Fa-f]{6}' assets/<brand>-brand/*.{svg,html,css} | sort | uniq -c | sort -rn | head -20 过滤黑白灰。 5. 固化为 `brand-spec.md`(写入项目目录,所有后续 prompt 都引用它)。 6. 🛑 强制检查点:把 `brand-spec.md` 摘要给用户过目,等待确认。
- 摘要必须包含:资产完整度(完整 / 部分 / 推断)、采集到的核心资产清单(logo 路径 / 产品图路径 / UI 路径)、主色 + 强调色、气质关键词、明确的禁区。
- 未确认前不进入 Step 0.1。资产协议走偏,后面全套 deck / 单图都会跟着歪 —— 这是品牌资产协议里成本最低的纠偏机会。
- 用户确认后才可以进入设计哲学推荐;用户提出修订("主色这个不对""logo 用浅底版""禁色加上 X")则原地修订 spec 后再次给用户过目。
brand-spec.md 模板
# <Brand> · Brand Spec
> 采集日期:YYYY-MM-DD
> 资产来源:<列出下载来源>
> 资产完整度:<完整 / 部分 / 推断>
## 🎯 核心资产(一等公民)
### Logo
- 主版本:`assets/<brand>-brand/logo.svg`
- 浅底反色版:`assets/<brand>-brand/logo-white.svg`
- 使用场景:<片头 / 片尾 / 角落水印 / 全局>
- 禁用变形:<不能拉伸 / 改色 / 加描边>
### 产品图(实体产品必填)
- 主视角:`assets/<brand>-brand/product-hero.png`(2000×1500)
- 细节图、场景图…
### UI 截图(数字产品必填)
- 主页:`assets/<brand>-brand/ui-home.png`
- 核心功能:`assets/<brand>-brand/ui-feature-<name>.png`
## 🎨 辅助资产
### 色板
- Primary: #XXXXXX <来源标注>
- Background / Ink / Accent / 禁用色…
### 字型
- Display / Body / Mono…
### 签名细节
- <哪些细节是「120% 做到」的>
### 禁区
- <明确不能做的:比如 Lovart 不用蓝色>
### 气质关键词
- <3-5 个形容词>5-10-2-8 素材质量门槛(铁律)
- 5 轮搜索(多渠道交叉,不是第一页就停)
- 10 个候选才开始筛
- 选 2 个精品(其他全用 = 视觉过载 + 品位稀释)
- 每个 8/10 分以上(不够 8 分宁可不用,用诚实 placeholder 或重新生成)
Logo 例外:有就必须用,不适用 5-10-2-8——logo 是识别度根基,6 分 logo 也比没 logo 强 10 倍。
写完 spec 后的执行纪律
- 所有
image_genprompt 必须引用brand-spec.md里的资产文件路径,可用 logo / 产品图 / UI 截图作为参考图输入。 - 不允许用 CSS 剪影 / SVG 手画 / 凭记忆描述代替真实资产。
- 品牌色直接写值(如
#1783FF),不写「类似蓝色」。 - 想临时加色要先改 spec —— 让品牌一致性从"靠自觉"变成"靠结构"。
缺失资产的兜底
| 缺失 | 处理 |
|---|---|
| Logo 完全找不到 | 停下问用户,logo 是品牌识别度的根基 |
| 产品图(实体产品)找不到 | 优先 image_gen 以官方参考图为基底生成 → 次选向用户索取 → 最后才是诚实 placeholder |
| UI 截图(数字产品)找不到 | 向用户索取自己账号的截屏 → 官方演示视频截帧;不用 mockup 生成器凑 |
| 色值完全找不到 | 走「设计方向顾问模式」,向用户推荐 3 个方向并标注 assumption |
禁止:找不到资产就静默用 CSS 剪影 / 通用渐变 / 凭记忆色 硬做——这是协议最大的反 pattern。
协议代价 vs 不做代价:走完协议 ~30 分钟(logo/产品图/色值/spec);不做协议 → 通用 slides 返工 1-2 小时。商单 / 发布会 / 重要客户项目,30 分钟的资产协议是保命钱。
---
Step 0:设计理解与方向推荐
在写大纲和 prompt 前,先完成设计判断。这个阶段继承 huashu-design 的核心逻辑。Step 0.0 是这一阶段的前置硬步骤(涉及具体品牌时);Step 0.1-0.4 在此基础上展开。
0.1 深度理解需求
确认或自行判断:
- 目标受众:谁会看这套 PPT?
- 核心信息:看完后要相信什么、理解什么、采取什么行动?
- 使用场景:公开演讲、内部汇报、培训课件、销售材料、课程资料还是文章配套?
- 情感基调:可信、锋利、温暖、兴奋、克制、实验、诗意?
- 交付格式:PPTX、HTML deck、Keynote 可打开文件,或多格式。
如果信息不足,一次最多问 3 个问题;如果用户催促或任务清晰,直接基于上下文判断。
0.2 顾问式重述
用 100-200 字重述本质需求,必须讲清:
- 这套 deck 真正要解决的传播问题。
- 受众为什么会在意。
- 设计需要制造什么感受。
- 视觉上最应该避免什么。
结尾用一句话过渡:“基于这个理解,我准备了 3 个设计方向。”
0.3 推荐 3 个设计哲学方向
推荐的不是 3 个配色,而是 3 条设计哲学。每个方向包含:
- 风格名称:必须含真实设计师、机构、出版物、品牌或艺术传统。
- 为什么适合:连接受众、内容和场景。
- 核心特征:3-4 条可执行视觉特征。
- 信息密度策略:这套风格如何承载内容页 80-180 字典型、封面/章节扉页/结论页保持稀疏的节奏。
- 风险:例如过于安静、过于艺术、中文层级压力大。
输出模板:
基于这个理解,我准备了 3 个设计方向:
1. [方向名:真实设计师/机构/出版物 + 风格定位]
为什么适合:[50-100字,连接内容、受众和场景]
核心特征:[3-4条]
信息密度策略:[如何用 80-180 字典型节奏承载内容页 + 配套封面/扉页/结论页稀疏节奏]
风险:[可能的问题]
2. ...
3. ...
我的默认建议:[选一个],因为[一句话理由]。找不到品牌 VI 时,可从以下基础风格池里选 3 个真正不同的方向给用户选择;这些不是兜底劣化,而是已经验证过能承载复杂信息的高质量视觉系统:
| 场景 | 可选基础风格 | 适合原因 |
|---|---|---|
| 技术分享 / 产品更新 | OpenAI 官方设计规范、Anthropic 信息手册、MIT Technology Review | 克制、可信、能承载术语和结构图 |
| 数据报告 / 趋势讲解 | Bloomberg Graphics、Reuters Graphics、Fathom、NYT Magazine | 时间线、矩阵、指标和因果关系清楚 |
| 课程培训 / 方法论 | Field Notes、xkcd 白板、Takram 教学图解、黑板粉笔 | 解释路径明确,适合步骤和框架 |
| 发布会 / 观点表达 | Pentagram 编辑系统、Experimental Jetset、Neo-Brutalism、Apple Keynote | 有冲击力,适合强调判断和转折 |
| 个人 IP / 公众号 | Field Notes、Penguin Books、Ligne Claire、软木板剪贴簿 | 有人味,适合讲经验和案例 |
3 个方向必须来自不同流派,形成真正反差:
| 类型 | 适合 | 示例 |
|---|---|---|
| 安全专业 | 商务、报告、可信解释 | Pentagram、Fathom、Bloomberg Graphics |
| 大胆前卫 | 发布、观点、吸引注意 | Sagmeister、Field.io、Neo-Pop、Experimental Jetset |
| 独特差异化 | 个人 IP、文化、教学 | Kenya Hara、Takram、Field Notes、Ligne Claire |
禁止推荐 3 个“都差不多”的方向。用户如果不想选,默认选择最能承载信息、最符合场景的方向,并说明理由。
0.4 方向 Demo
如果任务重要、风格不确定、用户要求好看,先生成 1-3 张 Demo:
- 可为 3 个方向各生成一张封面/样页。
- 也可在选定方向后先生成 1 张样页验证风格。
- Demo 通过后再批量生成全套,避免整套风格走偏。
Demo 也必须复制到项目目录,不直接引用 $CODEX_HOME/generated_images/。
Step 1:内容梳理
把材料转成逐页大纲。先定每页的页面类型(封面 / 章节扉页 / 内容页 / 结论页,见上方分级表),再写内容——类型决定密度上限,不要先写满字数再问"这是什么页"。
默认结构(10 页以内 deck):
- Slide 01:永远是封面页——大标题 + 副标题 + 主视觉,没有信息块、没有"它解决三件事"的拆分。
- 中间页:内容页为主,每 3-4 个内容页之间插一张章节扉页做转场,让节奏有呼吸。
- 最后一页:结论页——一句核心判断 + 一个标志性视觉。
每页必须定义:
- 页面类型:4 选 1(封面 / 章节扉页 / 内容页 / 结论页),决定密度上限。
- 标题:断言句,不是主题词。例:「AI Agent 的价值在工具边界」优于「Agent 介绍」。
- 核心结论:这一页观众必须带走什么——一句话讲清。
- 页面文案:按页面类型选上限(封面 ≤8 字 / 扉页 ≤30 字 / 内容页 80-180 字典型,220 字上限 / 结论页 ≤40 字)。先尝试用上限的下半区写,写不下再考虑往上加。可以包含短段落、标签、步骤、对比、引用、数据解释,但必须有清晰层级。
- 信息结构:选择 1 种主结构,例如"问题→判断→行动"、"对比 A/B"、"三步流程"、"一张图解释机制"、"案例拆解"。封面 / 扉页 / 结论页跳过这一项——它们没有信息结构,只有一个观点和一个视觉。
- 视觉场景:说明应该看到什么,以及它如何帮助理解内容。不要只写装饰,不要只写 CSS 布局。
设计规则:
- 一页只讲一个观点。
- 视觉先行,但文字不必稀少;文字负责把判断讲完整,视觉负责让结构一眼可见。警惕:AI 默认会朝上限写,要主动反向约束,能 80 字讲清的不要拉到 180。
- 观众走神 5 秒后回头,仍能从画面抓住主旨。
- 不编造数据;不确定的数据先查证或标注为待确认。
- 单页超过密度上限 = 该拆成两页,不是硬塞。
- 看完逐页大纲做一次自检:"是否每页都是内容页类型?" 是的话立刻插入封面 + 扉页 + 结论页,整套节奏才合格。
- 信息密度要“有层次地高”,不是平均铺满。每页至少有一个视觉焦点、一个主标题、一个解释区、一个结论或行动提示。
Guided/Collaborative 模式下,大纲确认后再进入风格选择。
Step 2:Deck Bible
选定设计方向后,才写 Deck Bible。它不是简单的“风格描述”,而是整套 PPT 的设计哲学合同。
生成任何单页之前,先写一份简短 Deck Bible。它是整套 PPT 的风格合同,后续每页 prompt 都必须继承。
Deck Bible 必须包含:
- 设计哲学:为什么这套 deck 要这样设计,而不是只描述样式。
- 统一风格锚点:真实出版物、设计师、品牌、漫画/插画传统或机构名。
- 视觉语言:插画、摄影、信息图、杂志版式、手绘板书、卡片系统等只能选一个主语法。
- 颜色气质:用自然语言描述,不必写 hex。例如“奶油纸底、黑色墨线、红色批注”。
- 字体气质:例如“杂志大标题 + 清晰中文正文”“板书手写感”“Field Notes 标签字”。
- 版式规律:标题区、解释区、图形区、结论区在整套里保持同类秩序。
- 信息密度规律:每页如何安排标题、解释、结构、结论,不让内容散掉。
- 禁止项:不要换风格、不要加入无关英文拟声词、不要让装饰压过信息。
Deck Bible 示例:
整套采用 Field Notes × Anthropic 信息手册风格:奶油纸底、黑色粗线图标、低饱和绿色/蓝色/黄褐色卡片。每页都有大标题、三到五个信息块、一个中心图解和底部结论条。中文为主,像一本可投影的工作手册,不像营销海报。Spread Frame(信息手册版式框,推荐)
实测验证(OpenClaw 橙皮书宣传 PPT,2026-05-23):信息手册风用「跨页框 + 单页变化」识别度最高。每张内容页共用 3 个不变元素:顶部品牌条(左刊头小字 + 右品牌 logo / 章节角标)+ 正文区(自由布局)+ 底部结论条(🚩 一句话 + 可选 3 小要点)。框不动,正文随内容变。
适用:信息手册类(Field Notes / Penguin Books / Anthropic / Bloomberg Businessweek)、技术分享、教学课件、产品宣传 deck。不适用:纯艺术海报、纯叙事 deck。
封面页 + 结论页可以部分跳出框(封面只留 logo,结论页让主视觉占满);章节扉页保留框但留白更大。
吉祥物穿线(Mascot Continuity,品牌有角色时强烈推荐)
实测验证:OpenClaw deck 把"AI 虾"角色在 8 页里以不同姿态反复出现(举书/在地图前/拿放大镜/在台阶上…),整套 deck 从"8 张独立信息图"升级成"连环画"。
启用条件:
- 品牌已有 mascot / 角色(OpenClaw 的虾、花叔的像素人物、企业 IP 形象)
- 或风格本身适合(Snoopy 漫画、学習漫画、像素游戏美术)
执行规则:
- 在 Deck Bible 中明确写「角色锚点:[mascot 名称] 以不同动作/姿态出现在大部分内容页」。
- 每页 prompt 里指明这页 mascot 的动作("虾举着翻开的书""虾在 8 个模块前指路""虾踩在 5 级台阶上"),不是一个静态形象贴满。
- 角色姿态服务于内容——讲流程时角色"走路径",讲分类时角色"分发",讲行动时角色"出发"。
- 反例:mascot 只出现在封面,后面忘记 → deck 像散装文章。
如果需要扩展风格细节,优先读取:
references/proven-styles-gallery.mdreferences/proven-styles-snoopy.mdreferences/design-movements.md
常用风格路由:
| 主题 | 首选 | 备选 |
|---|---|---|
| 技术分享 | xkcd 白板、Ligne Claire | Neo-Brutalism |
| 课程培训 | 黑板粉笔、学習漫画 | 软木板剪贴簿 |
| 产品发布 | Neo-Pop、NYT Magazine | 苏联构成主义 |
| 商务报告 | NYT Magazine、Pentagram 编辑 | Fathom 数据 |
| 个人 IP / 公众号 | Snoopy 漫画、软木板剪贴簿 | 温暖叙事 |
AI 图片稳定性优先级:
- 低噪点:xkcd 白板、Ligne Claire、NYT Magazine。
- 中等风险:Snoopy、软木板、黑板粉笔。
- 高表达但易加字:Manga、Neo-Pop。必须限制“只渲染指定文字”。
优先选择“能承载复杂信息”的风格,而不是只好看的风格:
- 信息手册:Field Notes、Penguin Books、Anthropic、Bloomberg Businessweek。
- 数据叙事:NYT Magazine、Fathom、Reuters Graphics、Bloomberg Graphics。
- 技术解释:xkcd 白板、Ligne Claire、Takram、MIT Technology Review。
- 课程课件:黑板粉笔、软木板剪贴簿、学習漫画、The Oatmeal。
Step 3:写图片 Prompt
先用 huashu-gpt-image 方法论去掉空泛形容词和英文伪结构,再按页面类型选 prompt 模板——封面 / 扉页 / 内容页 / 结论页有 4 套不同 prompt 结构,不能共用一个模板。
按页面类型选 prompt 模板
封面页 prompt(slide 01 / 单图封面)
沿用这套视觉系统:[粘贴 Deck Bible 短版]。
封面图,[平台尺寸],主题:[一句话讲清这是什么 deck]。
画面:[1 个标志性视觉,例如 "一本翻开的工作手册 + 一支像素风钢笔"]。
文字:仅显示大标题"[≤8 字]",可选副标题"[≤16 字]"。不出现章节列表、不出现 3-5 个步骤、不出现解释段落。
要求:留白充足,主视觉占画面中心 ≥50% 面积;克制感优先于信息量。章节扉页 / 转场页 prompt
沿用这套视觉系统:[Deck Bible 短版]。
章节扉页,主题:[这一章要讲什么]。
画面:1 个强视觉隐喻,配合 ≤30 字的强判断句。
文字:仅"[一句强判断]",无信息块、无步骤、无 takeaway。
要求:单一焦点,留白可观,像翻到下一章扉页。内容页 prompt(主要类型)
沿用这套视觉系统:[粘贴 Deck Bible 短版]。
本页主题:[断言式标题]。
页面文案:[80-180 字典型,220 字上限。按 标题 + 1-3 句解释 + 2-4 个标签/步骤/对比 + 1 句结论 组织]。
画面:[主视觉、信息结构、图形隐喻、层级关系]。
要求:和前面页面同一风格,中文清晰,信息密度适中(不到上限不要硬填),不要额外英文装饰。结论页 prompt
沿用这套视觉系统:[Deck Bible 短版]。
结论页,主题:本套 deck 最希望留给观众的一句话。
画面:1 个标志性视觉(呼应封面或本套 deck 的核心隐喻),周围大量留白。
文字:仅 ≤40 字的核心判断 + 可选 CTA / 联系方式。不要列要点、不要回顾全 deck。
要求:节奏放慢,像谢幕,不像销售。防泄漏铁律(4 类页面都适用)
- 不写 pt/px、百分比、CSS、布局网格。除非品牌规范必须精确控色,否则不写十六进制色值。
- 不写不希望出现在画面里的英文术语。
- 不把整套长大纲塞进 prompt,只写这一页需要的内容和 Deck Bible 短版。
- prompt 里出现的每个词,都要假设可能影响画面;因此要写可见信息、风格规则和明确禁止项,不写闲聊。
中文文字规则
- 默认认为 200 字以内中文可以可靠生成;超过 220 字按"该拆成两页"处理而不是硬上 prompt。
- 标题可以是完整判断句,正文可以是短段落,但必须通过字号、卡片、标注、编号、色块形成层级。
- 可以使用技术名词、英文产品名和简单公式;复杂公式仍建议转成图解或拆成多行。
- 如果文字错,先检查是否层级太乱或信息结构不清,再重生成。
密度反向约束清单(写完 prompt 自检)
写完一条 slide prompt,生成前自检:
- [ ] 这一页的页面类型已经定了吗?(封面 / 扉页 / 内容页 / 结论页)
- [ ] 字数是否在该类型上限以内?(封面 ≤8 / 扉页 ≤30 / 内容页 ≤220 / 结论页 ≤40)
- [ ] 内容页:是不是 80-180 字就能讲清,却拉到 200+ 了?能省的全省。
- [ ] 是不是无意识地把"X 解决三件事 / X 有三个特点"拆成三栏?这是 AI 默认动作,不是好结构——能用一个观点 + 一个隐喻表达就别拆。
- [ ] 这一页观众能在 5 秒内抓到主旨吗?做不到=过密。
Step 4:生成与检查
调用内置 image_gen 逐页生成图片。生成后必须检查:
- 中文是否准确。
- 是否出现 prompt 泄漏、乱码、英文拟声词、无关标签。
- 风格是否统一。
- 信息密度是否与页面类型匹配:内容页该有标题+解释+结构+结论;封面/扉页/结论页则反向——单一焦点 + 大量留白才对。不要拿"内容页标准"评封面。
- 设计是否出色:是否有明确视觉焦点、层级、留白、颜色节奏和可记住的图形隐喻。
- 画面是否真正承载主旨,而不是只有装饰。
按 huashu-design 五维评审做快速打分:
| 维度 | 检查问题 |
|---|---|
| 哲学一致性 | 是否忠实于 Deck Bible?有没有混入另一套审美? |
| 视觉层级 | 先看哪里、再看哪里是否自然?标题/正文/标签/结论是否分明? |
| 细节执行 | 对齐、间距、颜色数量、同类元素是否统一? |
| 功能性 | 每个视觉元素是否服务于理解?有没有只为好看的装饰? |
| 创新性 | 是否避免模板感和 AI 科技 cliché?有没有一个可记住的隐喻? |
额外的「页面类型恰当性」检查(新增维度,与 5 维评审并行):
- 封面页(slide 01):文字是否真的 ≤8 字?有没有混入信息块 / 解释段落 / 3-5 个步骤?如果出现"它解决三件事""核心三步骤"的拆分=必须重生成。
- 章节扉页:文字是否 ≤30 字?是否只有 1 句强判断 + 1 个视觉?出现信息列表=过密,重生成。
- 内容页:实测字数是否落在 80-180 字区间?超过 220 字=拆成两页;少于 50 字且没有视觉支撑=信息太薄,可能本该并入相邻页。
- 结论页:是否在回顾全 deck?是的话重写——结论页不是总结页。
- 整套节奏检查:把 N 张 slide 排成一列扫一眼,是否能看出"封面 → 内容 → 转场 → 内容 → 结论"的密度起伏?如果每页看起来一样密=节奏失败,需要重新分类型。
低于 7 分的页 或 页面类型恰当性不通过的页,不要硬塞进最终 deck;先重写 prompt 或重生成。
评审记录模板:
Slide NN 评审:
- 哲学一致性:_/10
- 视觉层级:_/10
- 细节执行:_/10
- 功能性:_/10
- 创新性:_/10
- 结论:保留 / 重生成
- 修复方向:[如果重生成,写清 prompt 要改什么]如果风格漂移:
- 不要继续生成下一页。
- 把 Deck Bible 缩短成更强的固定前缀。
- 在下一张 prompt 开头写“继续使用上一页完全相同的视觉系统”。
- 必要时重生成偏离风格的页面。
检查通过后,把图片复制到项目目录,例如:
项目/YYYY.MM-项目名/配图/slides/slide-01.png不要让最终 HTML、PPTX、Markdown 或项目说明引用 $CODEX_HOME/generated_images/。
Step 5:组装
PPTX:
uv run [SKILL_DIR]/scripts/create_slides.py \
项目/YYYY.MM-项目名/配图/slides/slide-01.png \
项目/YYYY.MM-项目名/配图/slides/slide-02.png \
--layout fullscreen \
-o 项目/YYYY.MM-项目名/output/deck.pptxHTML 图片 deck:
uv run [SKILL_DIR]/scripts/image_deck_html.py \
项目/YYYY.MM-项目名/配图/slides/slide-*.png \
-o 项目/YYYY.MM-项目名/output/deck.html \
--title "演示标题"Keynote:
- 交付 PPTX,说明可直接用 Keynote 打开。
- 如果用户要求
.key原生文件,优先询问是否接受 PPTX;原生 Keynote 通常需要本机 GUI/AppleScript,可能需要额外授权。
大文件策略:
- 图片 PPTX 超过 80MB 时,先保留原始图片,再生成一份压缩版交付。
- 压缩优先使用 Pillow 或系统图片工具把 slide PNG 宽度压到 1920px 左右,质量保持可读。
- 不删除原图;原图继续保存在项目
配图/slides/,压缩图放配图/slides-compressed/。
降级策略:
image_gen不可用:暂停并说明卡点;如果用户接受,改走 HTML fallback。- 不要因为主观担心中文、字数、版式或精确日期就主动切到 HTML fallback;这些问题优先通过更好的 Deck Bible、品牌/VI 约束、参考图和重生成解决。
- 单页风格漂移严重:不要继续批量生成,先重写 Deck Bible 短版并重生成样页。
- 中文/数据错误:优先重写 prompt 并重生成该页;只有用户明确要求文字可编辑、反复重生成仍无法接受,或 image_gen 不可用时,才改用 HTML fallback 做该页或整套。
- PPTX 组装失败:先交付 HTML 图片 deck,同时检查图片路径、文件格式和
python-pptx依赖。
生成失败时的救援策略(仍在 Path 1 内)
⚠️ 救援 ≠ 切路径。image_gen 产出不满意 → 默认重写 prompt 重生成,不是切 Path 3。
- 中文错字 / 乱码 → 简化文字、缩短到 ≤180 字,重试最多 3 次。
- 风格漂移 → 重写 Deck Bible 短版作为更强前缀,重试最多 2 次。
- Prompt 泄漏(出现 CSS / 英文术语)→ 移除 prompt 里 pt/px/百分比/英文术语,重试最多 2 次。
- 单页 ≥10 单元格精确表格 → 先问用户:① image_gen 近似版(推荐)/ ② 这一页单独 HTML 嵌精确表格 / ③ 简化表格 —— 让用户选。
image_gen工具调用失败 ≥3 次 → 告知用户并询问"切 Path 3 还是等环境恢复"。
穿越所有失败模式的铁律:除非用户明确同意,整套 deck 不会自动切到 Path 3。最多单页局部用 HTML 兜底。
Step 6:交付说明
最终汇报必须包含:
- 完成页数 / 图数。
- 选用设计方向,以及为什么选它。
- 如涉及具体品牌:brand-spec.md 路径、采集的资产清单(logo / 产品图 / UI / 色值 / 字体)和资产完整度。
- 如启用花叔像素风:列出引入的参考图。
- Deck Bible 或单图风格合同摘要。
- 交付文件路径(PPTX / HTML / 单图 PNG)。
- 项目内图片路径。
- 哪些页 / 图重生成过,以及原因。
- 五维设计评审简报:哲学一致性、视觉层级、细节执行、功能性、创新性。
- 风格一致性与信息密度检查结果。
- 单图任务额外汇报:平台尺寸是否对齐、封面文字是否 ≤8 字、是否落在中央安全区、是否触发了系列延续模式。
- 如果没有跑验证或没有打开预览,要明确说明。
路径要遵守写作工作区规则:不要把产物写根目录;有项目就写项目目录,没有项目先建 09-实验项目/<项目名>-YYYYMM/。
参考文件
所有引用路径都用 [SKILL_DIR]/... 相对前缀,不依赖任何机器特定的绝对路径——本 skill 完全 self-contained,可直接分发。
| 需要 | 文件 |
|---|---|
| 视觉原则、断言式标题、信息密度 | [SKILL_DIR]/references/design-principles.md |
| 图片 prompt 防泄漏、HTML fallback 规范 | [SKILL_DIR]/references/prompt-templates.md |
| 已验证风格参数 | [SKILL_DIR]/references/proven-styles-gallery.md |
| Snoopy/Peanuts 深度指南 | [SKILL_DIR]/references/proven-styles-snoopy.md |
| 设计运动与风格映射 | [SKILL_DIR]/references/design-movements.md |
| PPTX 组装脚本 | [SKILL_DIR]/scripts/create_slides.py |
| HTML deck 组装脚本 | [SKILL_DIR]/scripts/image_deck_html.py |
| HTML fallback → PPTX 转换脚本 | [SKILL_DIR]/scripts/html2pptx.js |
| ImgBB 图床上传脚本(纯 stdlib,无依赖) | [SKILL_DIR]/scripts/upload_image.py |
| 个人品牌示例资产(自带花叔像素风,可替换或删除) | [SKILL_DIR]/assets/personal-brand/像素风头像.png、像素公众号头图示例.png、像素品牌资产.png |
环境变量约定(只读,永远不要硬编码或打印):
| 变量 | 用途 | 必需性 |
|---|---|---|
IMGBB_API_KEY | 调用 scripts/upload_image.py 上传图床;可放 cwd/.env / [SKILL_DIR]/.env / ~/.env,三处任一存在脚本会自动加载 | 可选(不上传时不需要) |
# Copy this to .env (or set as env var) and fill in your key.
# Used by scripts/upload_image.py to upload generated images to a free image host.
# ImgBB (free image hosting). Get a key at https://api.imgbb.com
IMGBB_API_KEY=your_imgbb_api_key_here
# macOS
.DS_Store
**/.DS_Store
# Environment / secrets (API keys)
.env
.env.local
# Project output / generated images (skill itself doesn't generate these,
# but if someone runs scripts in this dir they shouldn't be committed)
**/output/
**/配图/
**/_备选/
# Backups created by darwin-skill optimization loop
SKILL.md.bak.*
# Python
__pycache__/
*.pyc
*.pyo
# Node / editor / OS
node_modules/
*.swp
.idea/
.vscode/
Thumbs.db
MIT License
Copyright (c) 2026 alchaincyf (花叔 · 花生)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
<sub><b>🌐 English</b> · <a href="README.zh.md">中文</a></sub>
<div align="center">
huashu-slide-codex
Codex-only AI visual material production skill.
Say one sentence — get a finished PPT, WeChat cover, or Bilibili/YouTube thumbnail.
   
</div>
---
Why Codex-only?
Most "AI PPT" skills wrap Gemini / OpenAI Image / Nano Banana API calls — every slide costs money. Codex has built-in `image_gen`: it's already paid for via your Codex subscription. The whole point of this skill is to use that built-in capability instead of burning a second image API.
If you run this skill in Claude Code or Cursor, the built-in image_gen doesn't exist there, and the skill won't work as intended. Use `huashu-design` (HTML-native) or `huashu-wechat-image` (Gemini-backed) for those runtimes.
What it does
Four delivery paths, all powered by Codex's image_gen:
| Path | Output | Use when |
|---|---|---|
| Path 1 · AI Image PPT (default) | PPTX + HTML deck, each slide is a full image | Presentations, course material, pitch decks |
| Path 2 · HTML Image Deck | Full-screen web deck (←/→ keys) | Quick preview, web-published decks |
| Path 3 · Editable HTML → PPTX | Editable text PPTX | Only when user explicitly says "I need editable text" |
| Path 4 · Single Cover Image | WeChat / Bilibili / YouTube / Xiaohongshu cover PNG | Article hero images, video thumbnails, marketing posters |
Quick start
In a Codex session:
Use huashu-slide-codex to make a 10-page deck about [your topic].That's it. The skill will:
1. Ask 1-3 clarifying questions (audience, tone, format) 2. Recommend 3 differentiated design philosophies (Bloomberg / Field Notes / Pentagram etc.) 3. Run a brand asset protocol if your topic involves a specific brand (downloads logo, product shots, UI screenshots → writes a project-local brand-spec.md) 4. Generate slides via image_gen, copy into your project, assemble PPTX + HTML
For a single cover image:
Use huashu-slide-codex to make a WeChat cover for my article about [topic].The skill defaults to 3 differentiated versions for important single images, so you have real choices instead of "the AI's best guess."
Install
cd ~/.codex/skills/
git clone https://github.com/alchaincyf/huashu-slide-codex.gitOr wherever your Codex skill directory lives.
Optional: image hosting
If you want to publish results to WeChat or other platforms that need permanent URLs, set up ImgBB:
cp .env.example .env
# Edit .env and add your free ImgBB key from https://api.imgbb.comThe bundled scripts/upload_image.py uses Python stdlib only — no pip install needed.
Core mechanics
🔴 Default path lock
In Codex environments, the skill always defaults to Path 1 (AI Image PPT). The two — and only two — triggers for switching to Path 3 (HTML/editable) are:
1. User explicitly says "I want editable PPT" / "don't want image PPT" 2. image_gen actually fails to invoke (≥3 times)
The skill includes an explicit list of "forbidden self-justification" patterns to stop the agent from rationalizing away the default. This was added after a real-world failure where Codex talked itself into HTML mode because "the content needs precise version numbers."
Page types & density tiers
Not every slide should have the same density. The skill enforces 4 page types:
| Type | Text ceiling | Required elements |
|---|---|---|
| Cover (always slide 01) | ≤8 char title + ≤16 char subtitle | Big title + hero visual, no info blocks |
| Section divider | ≤30 chars | 1 strong judgment + 1 visual metaphor |
| Content page (main) | 80-180 chars typical, 220 max | Title + 1-3 sentence explanation + 2-4 labels + visual |
| Conclusion page | ≤40 chars | 1 big judgment + 1 signature visual |
The skill explicitly warns the agent that the ceiling is not a target — "the sparse content page is more professional than the stuffed one."
Brand Asset Protocol
If your topic involves a specific brand (Anthropic, Linear, your own company), the skill runs a 5-step protocol:
1. Ask user for what assets they have (logo / product shots / UI screenshots / brand guidelines) 2. Search official channels (<brand>.com/brand, /press-kit, press kits, App Store) 3. Download via curl 4. Verify + extract colors (grep hex codes from inline CSS) 5. Write project-local brand-spec.md + mandatory user checkpoint before generating any slides
The protocol exists because cover images / decks without real brand assets become "generic AI tech aesthetic." 30 minutes of asset gathering saves 2 hours of rework.
Spread Frame + Mascot Continuity
For information-manual style decks (Field Notes × Anthropic, Penguin Books, Bloomberg Businessweek), the skill recommends:
- Spread Frame: A consistent 3-element layout across all content pages — top brand bar + free body + bottom conclusion strip. Body layout varies, frame stays.
- Mascot Continuity: If your brand has a mascot (a shrimp, a pixel character, an IP figure), have the mascot appear across content pages in different poses — turns a deck from "8 isolated infographics" into "a connected story."
Both patterns are validated by real-world delivery (OpenClaw Orange Paper PPT, 2026-05-23).
Personal-brand asset injection (swappable)
The skill ships with three example pixel-style assets in assets/personal-brand/ (像素风头像.png, 像素公众号头图示例.png, 像素品牌资产.png) — these are the maintainer's (花叔 / @AlchainHust) personal IP assets, included as a working example of the "personal brand auto-inject" pattern.
For your own use, you have two options:
1. Replace: Swap in your own logo / avatar / style example PNGs and edit the trigger words in SKILL.md (search for "花叔风格") 2. Disable: Delete assets/personal-brand/ — the skill's main features (slides, single covers, brand asset protocol) all still work
What's bundled
huashu-slide-codex/
├── SKILL.md # Agent instructions (Chinese, but agent is bilingual)
├── test-prompts.json # 7 test prompts covering all paths
├── assets/personal-brand/ # 3 pixel-style example assets (swappable)
├── references/
│ ├── design-principles.md
│ ├── prompt-templates.md
│ ├── proven-styles-gallery.md
│ ├── proven-styles-snoopy.md
│ └── design-movements.md
└── scripts/
├── create_slides.py # PPTX assembly (python-pptx)
├── image_deck_html.py # HTML deck assembly
├── html2pptx.js # Path 3 HTML → PPTX conversion
└── upload_image.py # ImgBB upload (stdlib only)All script references in SKILL.md use a [SKILL_DIR]/... placeholder. The skill is fully self-contained — no machine-specific absolute paths.
Iteration history
This skill went through 8 iteration rounds before this release, most driven by real-world delivery failures and successes. See `results.tsv` in darwin-skill for the full optimization log. Key learnings:
- R3 (full_test): When pixel-style was triggered but Codex put 花叔 character on a coffee mug instead of as the protagonist — added a "character must appear as scene protagonist" rule.
- R4 (full_test): For important single images, generating 3 differentiated versions × different design philosophies is always worth the extra 2
image_gencalls. - R6 (full_test): AI defaults to filling every slide to the ceiling — added page-type-aware density tiers ("ceiling is not target").
- R7 (full_test): OpenClaw deck validated the Spread Frame + Mascot Continuity patterns.
- R8 (full_test): Codex rationalized switching to HTML mode by claiming "content needs precision" — added the 🔴 default-path-lock rule with explicit forbidden-justification patterns.
Related skills
- `huashu-design` — HTML-native design skill, works in any runtime
- `huashu-skills` — Other skills (AI proofreading, topic gen, image generation, etc.)
- `darwin-skill` — The autonomous optimization framework used to iterate on this skill
License
MIT — free for personal and commercial use, no authorization required.
Author
花叔 · @AlchainHust — AI Native Coder, indie developer, ~30 万粉自媒体. Made many AI skills, ships many AI products.
<sub><a href="README.md">🌐 English</a> · <b>中文</b></sub>
<div align="center">
huashu-slide-codex
Codex 专用 AI 视觉物料生产 skill。
说一句话 → 一份能交付的 PPT / 公众号头图 / B站封面 / YouTube 缩略图。
   
</div>
---
为什么是 Codex-only?
大部分"AI PPT" skill 都会包一层 Gemini / OpenAI Image / Nano Banana API 调用——每张 slide 都要花钱。Codex 自带 `image_gen`:这部分能力你的 Codex 订阅里已经付过了。本 skill 存在的全部理由就是用这套内置能力,而不是再烧一遍 API。
在 Claude Code / Cursor 里跑本 skill 不会有效——那里没有内置 image_gen。这些 runtime 建议用 `huashu-design`(HTML-native)或 `huashu-wechat-image`(Gemini API)。
它做什么
四条交付路径,全部走 Codex 内置 image_gen:
| 路径 | 产出 | 适用场景 |
|---|---|---|
| Path 1 · AI 图片 PPT(默认) | PPTX + HTML deck,每张 slide 是完整图片 | 演讲、课件、提案、宣传 deck |
| Path 2 · HTML 图片 Deck | 全屏单页演示(左右键切页) | 快速预览、网页发布、不需要 PPT 文件 |
| Path 3 · 可编辑 HTML → PPTX | 文字可编辑的 PPTX | 仅在用户明说"要可编辑文字"时启用 |
| Path 4 · 单张封面图 | 公众号 / B站 / YouTube / 小红书封面 PNG | 头条封面、视频缩略图、营销主视觉 |
上手
在 Codex 会话里:
用 huashu-slide-codex 帮我做一份 10 页 PPT,主题是 [你的题目]就这样。skill 会:
1. 问 1-3 个澄清问题(受众、调性、交付格式) 2. 推荐 3 个差异化设计哲学方向(Bloomberg / Field Notes / Pentagram 等) 3. 如果题目涉及具体品牌,跑核心资产协议(下载 logo / 产品图 / UI 截图 → 写项目级 brand-spec.md) 4. 用 image_gen 逐页生图 → 复制到项目目录 → 组装 PPTX + HTML
做单张封面:
用 huashu-slide-codex 帮我做一张公众号头图,主题是 [...]重要单图默认生成 3 个差异化版本让你挑——不是"AI 觉得最好的那张",是真的有选择。
安装
cd ~/.codex/skills/
git clone https://github.com/alchaincyf/huashu-slide-codex.git或者你的 Codex skill 目录在哪就放哪。
可选:图床配置
如果要发布到公众号等需要永久 URL 的平台,配置 ImgBB:
cp .env.example .env
# 在 .env 里填 ImgBB key(https://api.imgbb.com 免费注册)自带的 scripts/upload_image.py 用纯 Python stdlib,无 pip 依赖。
核心机制
🔴 默认路径锁定铁律
在 Codex 环境下,skill 永远默认走 Path 1(AI 图片 PPT)。切到 Path 3(HTML / 可编辑)的唯二触发条件是:
1. 用户原话明说"要可编辑 PPT" / "不要图片 PPT" 2. image_gen 真的调用失败(≥3 次)
skill 里明确列了一份"严禁自我合理化"清单,阻止 agent 用各种借口绕开默认路径。这条规则的来源是真实踩坑——Codex 曾经自我合理化说"内容需要严格的版本号准确性"就切到了 HTML 路线,本意是用 image_gen 的成本优势直接被废掉。
页面类型 + 密度分级
不是每张 slide 都该一样密。skill 强制 4 种页面类型:
| 类型 | 文字上限 | 必含元素 |
|---|---|---|
| 封面页(slide 01 永远是) | 标题 ≤8 字 + 副标题 ≤16 字 | 大标题 + 主视觉,不要信息块 |
| 章节扉页 | ≤30 字 | 1 句强判断 + 1 个视觉隐喻 |
| 内容页(主要) | 80-180 字典型 / 220 字上限 | 标题 + 1-3 句解释 + 2-4 标签 + 视觉 |
| 结论页 | ≤40 字 | 1 句大判断 + 1 个标志性视觉 |
skill 里明确写:上限不是目标——"稀疏的内容页比塞满字的内容页更专业"。
核心资产协议(涉及具体品牌时强制)
题目涉及具体品牌(Anthropic、Linear、你自己的公司)→ skill 跑 5 步协议:
1. 问用户手上有什么资料(logo / 产品图 / UI 截图 / brand guidelines) 2. 搜官方渠道(<brand>.com/brand、/press-kit、新闻稿、App Store) 3. curl 下载 4. 验证 + grep 提取色值(inline CSS / brand guidelines) 5. 写项目级 brand-spec.md + 强制用户确认 checkpoint 才能开始生图
协议存在的原因是:没有真实品牌资产的封面 / deck 一定是"通用 AI 科技感"。30 分钟的资产搜集省 2 小时返工。
Spread Frame + Mascot Continuity(吉祥物穿线)
信息手册类风格(Field Notes × Anthropic / Penguin Books / Bloomberg Businessweek)推荐两条模式:
- Spread Frame:所有内容页用同一个 3 元素跨页框——顶部品牌条 + 自由正文 + 底部结论条。正文随内容变,框不动。
- Mascot Continuity:品牌如果有吉祥物(虾 / 像素角色 / 企业 IP 形象),让 ta 在不同 slide 以不同姿态反复出现——把 deck 从"8 张独立信息图"升级成"连环画"。
两条都由真实交付验证(OpenClaw 橙皮书宣传 PPT,2026-05-23)。
个人品牌触发(自带花叔像素风为示例)
skill 自带 3 张花叔的像素风参考图(assets/personal-brand/像素风头像.png / 像素公众号头图示例.png / 像素品牌资产.png),作为"个人 IP 自动注入"模式的工作示例。
其他用户两种选择:
1. 替换:把自己的 logo / 头像 / 风格示例 PNG 放进去,并改 SKILL.md 里的触发词(搜"花叔风格") 2. 关闭:直接删掉 assets/personal-brand/ 目录;skill 主体功能(slides / 单图 / 品牌资产协议)完全不受影响
内容清单
huashu-slide-codex/
├── SKILL.md # Agent 指令(中文,agent 双语 OK)
├── test-prompts.json # 7 个测试 prompt,覆盖全部路径
├── assets/personal-brand/ # 3 张像素风示例资产(可换可删)
├── references/
│ ├── design-principles.md
│ ├── prompt-templates.md
│ ├── proven-styles-gallery.md
│ ├── proven-styles-snoopy.md
│ └── design-movements.md
└── scripts/
├── create_slides.py # PPTX 组装(python-pptx)
├── image_deck_html.py # HTML deck 组装
├── html2pptx.js # Path 3 HTML → PPTX 转换
└── upload_image.py # ImgBB 上传(纯 stdlib,零依赖)SKILL.md 里所有脚本引用都用 [SKILL_DIR]/... 占位符。完全 self-contained,无机器特定的绝对路径。
迭代历史
发布前经过 8 轮迭代,绝大部分由真实交付驱动。完整优化日志在 darwin-skill 的 results.tsv 里。关键学习:
- R3 实测:像素风触发但 Codex 把花叔放在马克杯图案上而不是主角位置 → 加了"角色必须作为画面主体出现"铁律。
- R4 实测:重要单图默认生成 3 个差异化版本(不同设计哲学)几乎永远是值得的。
- R6 实测:AI 默认把每页拉到密度上限 → 加了页面类型分级 + "上限不是目标"。
- R7 实测:OpenClaw deck 成功 → codify 了 Spread Frame + Mascot Continuity。
- R8 实测:Codex 自我合理化切 HTML 路线 → 加了 🔴 默认路径锁定铁律 + 禁止句式清单。
相关 skill
- `huashu-design`:HTML-native 设计 skill,任何 runtime 都能用
- `huashu-skills`:其他 skill(AI 审校 / 选题生成 / 图片生成 等)
- `darwin-skill`:用来迭代本 skill 的自主优化框架
License
MIT —— 个人和商业使用都免费,无需授权。
作者
花叔 · @AlchainHust —— AI Native Coder,独立开发者,30 万粉自媒体。做了很多 AI skill,做了很多 AI 产品。
设计运动与风格参考库
基于花叔审美偏好整理。用于风格讨论时建立共同语言——当我们说「田中一光风格」或「瑞士国际主义」时,双方都知道在说什么。
>
这不是直接的AI prompt模板(那些在prompt-templates.md和proven-styles-gallery.md中),而是设计决策的上游参考。
---
花叔审美画像
喜欢:大字、色块、冲击力、温暖色调、有质感、功能主义(每个元素都有存在理由) 不喜欢:赛博霓虹、冷色系(深蓝/紫底)、扁平无聊的企业模板、过度装饰
核心偏好:用最简单的方式传达最多信息(费曼思维在视觉上的投射)
---
设计运动 → Skill风格 对照表
这张表连接了「设计史上的运动」和「我们skill中已有的AI生成风格」,帮助在讨论时快速定位。
| 设计运动 | skill中对应风格 | 关系说明 |
|---|---|---|
| Neo-Brutalism(新粗野主义) | Neo-Pop新波普 + Neo-Brutalism(新增#18) | 粗边框、色块、大字——小红书官方PPT就是这个 |
| 田中一光 / 日本图形设计 | Ligne Claire清线 | 极简几何+东方美学,限色克制 |
| 瑞士国际主义 | Bauhaus包豪斯 | 网格系统+功能主义+无衬线大字 |
| 蒙德里安 / De Stijl | Neo-Pop新波普 | 原色块分割、几何秩序 |
| 包豪斯 | Bauhaus包豪斯 | 直接对应 |
| 孟菲斯设计 | Neo-Pop新波普 | 高饱和混搭,但孟菲斯更「吵」 |
| 俄国构成主义 | 苏联构成主义 | 直接对应 |
| Apple Keynote | —(skill中故意不做极简风) | 太冷太克制,缺少冲击力 |
| Sagmeister & Walsh | 达达拼贴Collage | 实验性、大胆用色、每项目不同风格 |
| Information is Beautiful | Ligne Claire清线 | 数据→美学、复杂信息简化 |
| Giorgia Lupi(数据人文主义) | 温暖叙事Warm Narrative | 有温度的数据可视化 |
---
第一梯队:最可能喜欢的风格
1. Neo-Brutalism(新粗野主义)
代表:Gumroad、Figma社区、小红书官方PPT 视觉特征:粗黑边框(3-6px)、高饱和色块、无渐变、偏移阴影、大字排版 配色:高对比原色——红黄黑米白是典型组合 适合PPT:非常适合。信息层次清晰,远距离可读性强 与skill的关系:已验证,2026-02-09蕴煜AI培训项目完成了Day1(67页)+Day2(64页)全套HTML渲染
核心CSS特征(已验证):
/* 配色 */
--cream: #F5E6D3;
--red: #FF3B4F;
--yellow: #FFD700;
--black: #1A1A1A;
/* 布局 */
border: 4-6px solid #1A1A1A; /* 粗黑边框 */
font-size: 3-6vw; /* 超大字 */
overflow: hidden; /* 无溢出 */搜索关键词:Neo Brutalism presentation design、Neubrutalism UI
2. 田中一光 / 日本图形设计(Ikko Tanaka)
代表:田中一光、横尾忠则、佐藤卓 视觉特征:极简几何形状、大面积留白、有限配色(2-3色)、网格结构、东方美学+西方现代主义 配色:红+黑+白 或 金+黑+白,极度克制 为什么推荐:和费曼偏好(用最简单的方式解释复杂事物)完全一致。田中一光的海报就是「用几何形状讲故事」 适合PPT:非常适合金句页、概念页。信息密集页需要调整 搜索关键词:Ikko Tanaka poster、Japanese graphic design minimalist
3. 瑞士国际主义(Swiss/International Typographic Style)
代表:Josef Müller-Brockmann、Armin Hofmann、Ernst Keller 视觉特征:严格网格系统、无衬线大字(Helvetica/Akzidenz)、不对称布局、几何图形、照片蒙版 配色:通常黑白红,或单色+强调色 为什么推荐:功能主义的极致——每个元素都有存在理由。网格系统天然适合幻灯片 搜索关键词:Swiss Style poster、Josef Müller-Brockmann grid
4. 蒙德里安 / De Stijl(风格派)
代表:Piet Mondrian、Theo van Doesburg 视觉特征:水平+垂直线条分割、原色块(红黄蓝+黑白)、绝对的几何秩序 配色:红、黄、蓝、黑、白——经典五色 适合PPT:适合封面、过渡页。内容页需要灵活变体 搜索关键词:Mondrian layout design、De Stijl graphic design
---
第二梯队:值得参考的风格
5. 包豪斯(Bauhaus)
代表:Herbert Bayer、László Moholy-Nagy、Joost Schmidt 视觉特征:几何图形(圆三角方)、功能主义、原色+黑白、实验性排版 与skill的关系:skill中已有Bauhaus包豪斯风格(第三梯队#13)
6. 孟菲斯设计(Memphis Design)
代表:Ettore Sottsass、Michele De Lucchi 视觉特征:鲜艳色彩、几何图案混搭、波点/条纹/锯齿、刻意的「不协调」 注意:视觉冲击力极强,但可能太「吵」——培训PPT需要让人集中注意力 适合PPT:适合做装饰元素和图案纹理,不适合做主布局
7. 俄国构成主义(Constructivism)
代表:El Lissitzky、Alexander Rodchenko 视觉特征:对角线构图、红+黑+白、几何形状叠加、政治宣传海报感 与skill的关系:skill中已有苏联构成主义风格(第二梯队#7)
---
第三梯队:顶级公司的Deck设计
8. Apple Keynote 风格
视觉特征:极简、大量留白、超大单词、深色/浅色两极、高质量产品摄影 配色:黑+白为主,偶尔一个强调色 注意:可能太「冷」太「克制」,缺少冲击力和温度。skill中故意不做此类极简风格(AI生成效果差)
9. Stripe / Linear 设计系统
视觉特征:柔和渐变、3D插画、精致排版、大量数据可视化 配色:紫+蓝渐变(Stripe)、极简黑白(Linear) 注意:Stripe的蓝紫渐变不符合暖色偏好
10. Sagmeister & Walsh
代表:Stefan Sagmeister、Jessica Walsh 视觉特征:实验性极强、大胆用色、材质混搭、每个项目风格完全不同 为什么参考:「Beauty」项目用大胆色彩和几何构成探索什么是美——和花叔审美高度重合 启发:每套PPT不必只有一个风格,可以按章节切换「情绪」
---
第四梯队:数据可视化/信息设计
11. Information is Beautiful(David McCandless)
视觉特征:数据→美学、复杂信息简化、干净的信息图表 适合PPT:数据展示页、效率对比页、工具矩阵页
12. Giorgia Lupi(数据人文主义)
视觉特征:手绘质感+数据、有温度的信息图、个人叙事+数据结合 为什么参考:「数据人文主义」理念和花叔的「有人味」风格完全对应
---
2026年演示设计趋势
| 趋势 | 描述 | 是否推荐 |
|---|---|---|
| Bento Grid布局 | 模块化方格(像Apple推广视频) | 推荐——和色块风格兼容 |
| 超大字排版 | 标题字占幻灯片50%面积 | 已在用 |
| 竖版幻灯片 | 9:16给手机阅读优化 | 线下培训不需要 |
| 非线性演示 | 可点击跳转的交互式菜单 | 线下培训不需要 |
| Glassmorphism | 毛玻璃+透明效果 | 不推荐——偏冷偏科技感 |
---
使用场景
场景1:用户说「我想要XX风格」
1. 在本文件中找到对应的设计运动 2. 查看「与skill的关系」列,找到skill中已有的最近风格 3. 用该已有风格的prompt模板作为起点 4. 根据设计运动的特征做调整
场景2:用户不确定想要什么风格
1. 用花叔审美画像作为默认偏好 2. 按主题在 proven-styles-gallery.md 的推荐表中选3个 3. 用本文件中的设计运动名称作为讨论锚点(如「这个方向偏田中一光,那个偏构成主义」)
场景3:需要从零设计一个新风格
1. 在本文件中选择1-2个设计运动作为视觉DNA 2. 提取其核心视觉特征(配色、构图、字体、元素) 3. 写成Base Style prompt 4. 在 proven-styles-gallery.md 中增加为新风格
---
搜索这些风格的最佳渠道
| 渠道 | 适合找什么 |
|---|---|
| Behance | 设计师完整项目展示 |
| Dribbble | 单张设计灵感 |
| 按风格聚合的情绪板 | |
| Poster House (posterhouse.org) | 经典海报展览 |
| It's Nice That (itsnicethat.com) | 设计趋势和设计师访谈 |
| Fonts In Use (fontsinuse.com) | 看字体在真实设计中的应用 |
| SlidesGo / SlidesCarnival | 免费PPT模板看趋势 |
---
整理于 2026-02-09 | 基于花叔审美偏好定制
Presentation Design Principles
Detailed design framework for creating professional presentations. This file is loaded on-demand when deeper design guidance is needed.
1. Ten Evidence-Based Rules
From PLOS Computational Biology: Ten Simple Rules for Effective Presentation Slides
1. One idea per slide — Each slide conveys exactly one core message 2. One minute per slide — 20-minute talk ≈ 20 slides 3. Title = assertion — Change "Results" to "X proves Y" — the title is the abstract 4. Only include what you'll discuss — If you won't talk about it, remove it 5. Cite inline — Attribution goes on the slide, not a final references slide 6. Lead with visuals — Almost no slide should be text-only; build around images/charts 7. Avoid cognitive overload — Text is "signpost" not "full text"; ≤6 elements per slide 8. Distraction test — A distracted viewer should still grasp the point from the slide alone 9. Iterate through practice — Rehearse to confirm flow and transitions 10. Design for disaster — PDF backup, screenshots instead of video, avoid animations
2. Assertion-Evidence Framework
Developed by Michael Alley at Penn State. Controlled experiment with 110 engineering students showed this approach produces:
- Better comprehension
- Fewer misconceptions
- Lower perceived cognitive load
- Better delayed recall
Core method: Slide titles are complete assertion sentences, not topic words.
| Traditional | Assertion-Evidence |
|---|---|
| Q3 Sales | Q3 sales grew 23%, driven by new users |
| Methodology | We validated this hypothesis with a double-blind experiment |
| Key Findings | Three patterns emerged from 10,000 user sessions |
Source: Penn State Assertion-Evidence Research
3. Information Density
5/5/5 Rule
- ≤5 words per line
- ≤5 bullet points per slide
- No more than 5 text-heavy slides in a row
Aggressive variant (recommended)
- ≤4 bullet points per slide
- ≤4 information units per bullet
- Short-term memory holds ~7 items (Miller's Law)
Cognitive load evidence
Eye-tracking research shows: when a slide has 1 bullet point, viewers read it completely. As bullets accumulate, viewers only skim a fraction. Text-heavy slides overload the visual channel, preventing the verbal channel from processing the speaker's narration. Slides and speech should complement, not duplicate.
Sources:
- InnerDrive: PowerPoint and Cognitive Load
- Ethos3: Cognitive Load Theory for Presentations
- Chartered College: CLT for Slideshow Presentations
4. Color Systems
60-30-10 Rule
- 60% dominant (background — light or dark)
- 30% secondary (text, shapes)
- 10% accent (highlights, CTA, key data)
Palette Presets (18 options)
Professional:
| Name | Background | Text | Accent | Use case |
|---|---|---|---|---|
| Corporate Blue | #FFFFFF | #2D3436 | #0984E3 | Business, consulting |
| Dark Tech | #1A1A2E | #E0E0E0 | #4ECDC4 | Tech, SaaS |
| Warm Trust | #FDF6EC | #3D3D3D | #E17055 | Education, coaching |
| Clean Minimal | #F8F9FA | #212529 | #6C63FF | Startup, product |
Bold:
| Name | Background | Text | Accent | Use case |
|---|---|---|---|---|
| High Contrast | #000000 | #FFFFFF | #FF6B6B | Keynote, impact |
| Electric | #0D0D0D | #F0F0F0 | #00FF88 | Tech demo, launch |
| Royal | #1B1464 | #FFFFFF | #FFD93D | Premium, luxury |
Nature/Health:
| Name | Background | Text | Accent | Use case |
|---|---|---|---|---|
| Forest | #F0F4F0 | #2D3436 | #00B894 | Eco, sustainability |
| Ocean | #EBF5FB | #1A5276 | #48C9B0 | Health, wellness |
| Sunset | #FFF5E6 | #2C3E50 | #E74C3C | Energy, passion |
Gradient:
| Name | Start→End | Text | Accent |
|---|---|---|---|
| Deep Space | #0F0C29→#302B63 | #FFFFFF | #FFD93D |
| Aurora | #0F2027→#2C5364 | #FFFFFF | #4ECDC4 |
| Dusk | #2C3E50→#FD746C | #FFFFFF | #F8E71C |
2025-2026 Trends
- Dark mode (black/navy + bright text): premium feel, reduced eye strain
- Gradient revival: blue-purple, orange-pink as backgrounds or title slides
- Warm neutrals replacing cold grays: earth tones, sage green, deep plum
- High-contrast neon accents (lime green, electric blue) on dark backgrounds
- Classic combos: blue+white (trust), blue+yellow (attention), mint+gray (modern)
High contrast is non-negotiable. Text/graphics must stand out clearly against the background.
Sources:
5. Typography
Core Rules
- Max 2 font families (1 heading + 1 body)
- Heading: bold, personality — ≥36pt (2026 trend: even larger)
- Body: clean, readable — ≥24pt
- Avoid: italics, underlines, ALL CAPS (except very short labels)
- Consider colorblind-friendly palettes
Recommended Fonts
| Role | English | Chinese |
|---|---|---|
| Heading | Montserrat, Georgia | PingFang SC Bold, Source Han Sans Bold |
| Body | Inter, Helvetica Neue, Arial | PingFang SC Regular, Source Han Sans Regular |
2026 Typography Trends
- Oversized typography as visual hero element
- Clean sans-serif remains the readability standard
- Expressive/display fonts acceptable for title slides only
- Variable fonts gaining adoption for weight flexibility
Sources:
6. Layout and Whitespace
Reading Patterns
- Western audiences follow F-pattern (top-to-bottom, left-to-right) or Z-pattern scanning
- Place headline prominently at top; supporting content below
- Use whitespace to separate information blocks
Whitespace Principles
- Whitespace improves memory retention, attention, and perceived professionalism
- Important elements need breathing room around them
- Whitespace is not waste — it's functional design
Content Distribution
- Title:body size ratio ≈ 3:1
- Minimize pure-text slides; every slide should have a visual element
- 30-50-20 content split: 30% opening, 50% body, 20% closing
- Data-heavy slides: use charts over tables
- Visuals carry the message; text provides navigation
7. Viral Deck Framework (Sabrina Ramonov)
Three-tier system for high-impact presentations:
Tier 1: Fundamentals
- Visual-first, minimal text
- ≤8 words per title
- One idea per slide
- 3-color palette: white/black/accent
Tier 2: Visual Metaphors + Data Viz
Five viral layouts: 1. Hero — Full-bleed image + overlay text 2. Contrast — Before/after or dual-panel 3. Icon Grid — 3-6 icons with short labels 4. Quote Focus — Large quote + attribution 5. Process Flow — Step-by-step horizontal or vertical
Tier 3: Advanced System (14 layouts)
Adds: Timeline, Before/After, Anatomy Breakdown, Comparison Matrix, plus a complete typographic system and "anti-hallucination safety rules."
Core insight: "Viral decks are not visually loud. They are intellectually loud. Say something new, interesting, and emotionally compelling."
Presentation Prompt Templates
Ready-to-use prompts for content generation and slide image creation. Loaded on-demand when creating presentations.
1. Content Generation Prompts
Full Presentation Outline
Create a [X]-slide presentation about [topic].
Audience: [describe — e.g., busy managers, beginners, investors]
Duration: [minutes]
Goal: [inform / persuade / educate]
Tone: [professional / casual / academic]
Structure:
- Opening: [problem hook / story / data point]
- Body: [logical / chronological / priority order]
- Close: [call to action / summary / open discussion]
Per slide:
- Title = conclusion sentence (not a topic word)
- Max 4 bullet points
- Suggest visual type (chart, diagram, photo, icon)
Brand:
- Colors: [primary / secondary / accent]
- Font: [heading / body]
- Logo placement: [bottom-right / top-left]Business Report
Create a 10-slide pitch deck for [industry] prospects.
Structure: Problem (2 slides) → Impact (1) → Our Solution (3) →
Case Study (2) → Next Steps (1) → Appendix (1).
Audience: VP-level operations. Tone: pragmatic, data-driven.Educational / Training
Design AI-driven slides teaching [concept] to beginners.
Each concept includes one analogy and one real-world scenario.
Use simple language, one key insight per slide.Annual Review
Condense this PDF report into a visual presentation
highlighting three action items. Use KPI dashboard style.
Each slide has a chart or data visualization.Minimal Startup Pitch
Create a minimal-style startup pitch deck.
Use visual metaphors, avoid bullet point stacking.
Each slide: generous whitespace, one core number or short sentence.Research → Presentation
Analyze this research material, extract 3-4 most compelling findings.
Create a narrative flow: Problem → Insight → Implication.
Design slides that simplify complex data without sacrificing accuracy.Problem-Solution-Result
Generate a slide outline using the Problem → Solution → Result structure.
For each section, create 1-2 slides depending on depth.Long Document → Slides
Turn this document(s) into a 7-slide presentation.
Provide a clear and concise slide title for each slide.
Include 3-5 key bullet points per slide.
Focus on main ideas, avoid filler.2. Path A HTML 生成规范(html2pptx 硬性约束)
必读! html2pptx.js 将 HTML 逐元素解析为 PowerPoint 对象,不是截图。PPT 格式有固有约束,违反以下 4 条规则会直接报错。
4 条不可违反的规则
规则 1:DIV 里不能直接写文字 — 必须用文字标签包裹
<!-- ❌ 错误:文字直接在 div 里 -->
<div class="title">Q3营收增长23%</div>
<!-- ✅ 正确:文字在 <p> 或 <h1>-<h6> 里 -->
<div class="title"><h1>Q3营收增长23%</h1></div>
<div class="body"><p>新用户是主要驱动力</p></div>规则 2:不支持 CSS 渐变 — 只能用纯色
/* ❌ 错误 */
background: linear-gradient(to right, #FF6B6B, #4ECDC4);
/* ✅ 正确:纯色 */
background: #FF6B6B;
/* ✅ 如果必须多色条纹,用 flex 子元素各自纯色 */
.stripe-bar { display: flex; }
.stripe-bar div { flex: 1; }
.red { background: #FF6B6B; }
.teal { background: #4ECDC4; }规则 3:背景/边框/阴影只能在 DIV 上,不能在文字标签上
<!-- ❌ 错误:<p> 有背景色 -->
<p style="background: #FFD700; border-radius: 4px;">重点内容</p>
<!-- ✅ 正确:用外层 div 承载背景/边框,<p> 只负责文字 -->
<div style="background: #FFD700; border-radius: 4px; padding: 8pt 12pt;">
<p>重点内容</p>
</div>规则 4:DIV 不能有 background-image — 用 `<img>` 代替
<!-- ❌ 错误 -->
<div style="background-image: url('chart.png')"></div>
<!-- ✅ 正确 -->
<img src="chart.png" style="position: absolute; left: 50%; top: 20%; width: 300pt; height: 200pt;" />Path A HTML 模板骨架
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
width: 720pt; height: 405pt;
font-family: system-ui, -apple-system, "PingFang SC", sans-serif;
background: #FEFEF9; /* 纯色,不能用渐变 */
overflow: hidden;
}
/* DIV 负责布局/背景/边框 */
.card {
position: absolute;
background: #1A4A8A; /* 背景在 DIV 上 */
border-radius: 4pt;
padding: 12pt 16pt;
}
/* 文字标签只负责字体样式,不加背景/边框 */
.card h2 { font-size: 18pt; color: #FFFFFF; font-weight: 700; }
.card p { font-size: 12pt; color: rgba(255,255,255,0.85); }
</style>
</head>
<body>
<!-- 标题区:外层 div 定位,内层文字标签 -->
<div style="position: absolute; top: 32pt; left: 48pt; right: 48pt;">
<h1 style="font-size: 28pt; color: #1A1A1A; font-weight: 700;">标题用断言句,不是主题词</h1>
<p style="font-size: 13pt; color: #555555; margin-top: 8pt;">副标题补充说明</p>
</div>
<!-- 内容卡片:div 负责背景,h2/p 负责文字 -->
<div class="card" style="top: 100pt; left: 48pt; width: 180pt; height: 120pt;">
<h2>要点一</h2>
<p>简短说明文字</p>
</div>
<!-- 列表:使用 ul/li,不用手动 • 符号 -->
<div style="position: absolute; top: 240pt; left: 48pt; width: 400pt;">
<ul style="font-size: 13pt; color: #1A1A1A; padding-left: 20pt; list-style: disc;">
<li>第一条要点</li>
<li>第二条要点</li>
<li>第三条要点</li>
</ul>
</div>
<!-- 插图:用 <img> 标签,不用 background-image -->
<img src="illustration.png" style="position: absolute; right: 48pt; top: 80pt; width: 240pt; height: 180pt;" />
</body>
</html>常见错误速查
| 错误信息 | 原因 | 修复方法 |
|---|---|---|
DIV element contains unwrapped text "XXX" | div 里有裸文字 | 把文字包进 <p> 或 <h1>-<h6> |
CSS gradients are not supported | 用了 linear/radial-gradient | 改为纯色,或用 flex 子元素分段 |
Text element <p> has background | <p> 标签加了背景色 | 外套 <div> 承载背景,<p> 只写文字 |
Background images on DIV elements are not supported | div 用了 background-image | 改为 <img> 标签 |
HTML content overflows body by Xpt vertically | 内容超出 405pt | 减少内容或缩小字号,或用 overflow: hidden 截断 |
HTML dimensions don't match presentation layout | body 尺寸不是 720pt×405pt | 确认 width: 720pt; height: 405pt |
---
3. Slide Image Generation Prompts
Base Style Prompt Pattern
Define once, append to every slide:
[Base Style Suffix]:
flat illustration style, [background description],
[text color] sans-serif typography, [accent detail],
clean professional aesthetic, 16:9 aspect ratio, 1920x1080Example base styles:
Dark Tech:
flat vector illustration, deep navy gradient background (#0F0C29 to #302B63),
white sans-serif text, subtle teal neon accent lines (#4ECDC4),
minimal data-visualization aesthetic, 16:9, 1920x1080Clean Corporate:
clean flat design, white background (#FFFFFF),
dark gray text (#2D3436), blue accent elements (#0984E3),
professional infographic style, 16:9, 1920x1080Warm Educational:
soft watercolor illustration style, cream background (#FDF6EC),
dark text (#3D3D3D), coral accent highlights (#E17055),
friendly approachable aesthetic, 16:9, 1920x1080Per-Slide Prompt Structure
[Slide type]: [Content description].
[Visual elements]: [What to show — chart type, icons, diagrams].
[Layout]: [Title position, content arrangement].
[Base Style Suffix]Example:
Title slide: "AI is Transforming Healthcare" centered in large bold text.
Subtitle: "3 Breakthrough Applications in 2026" below.
Visual: abstract neural network pattern as subtle background element.
[Dark Tech Base Style]Google's 6-Element Formula
[Subject] + [Composition] + [Action] + [Location] + [Style] + [Editing]- Subject: what/who is the main focus
- Composition: camera angle, distance (wide, close-up, 85mm)
- Action: what the subject is doing
- Location: where the scene takes place
- Style: artistic style, color palette
- Editing: post-processing (soft focus, high contrast, film grain)
Consistency Tips
1. Describe, don't keyword — narrative paragraphs work better than keyword lists 2. Positive framing — "empty quiet street" not "street without cars or people" 3. Photography terms — use specific lens lengths (85mm f/1.8), lighting (golden hour, studio rim lighting, three-point softbox) 4. Specify hex colors — exact color values prevent palette drift 5. Character drift — if characters change appearance, start a new conversation with full description
Sources:
3. Full AI Slide Generation Prompts (Path B)
Path B generates EVERY slide as a complete AI image. These prompts produce slides where layout, text, and visuals are all rendered by AI.
⚠️ THE #1 MISTAKE: Writing prompts like CSS layout instructions. "Title at top-left, two columns below" produces boring traditional PPTs. Instead, describe EXPERIENCE, REFERENCE, and INTENT.
⛔ Path B 防泄漏铁律(2026-04-10 实战踩坑)
AI图像生成模型会把prompt中的一切文字当成画面内容渲染。以下内容绝对不能出现在prompt里:
| 禁止写入prompt的内容 | 会导致 | 正确做法 |
|---|---|---|
| pt/px数字(如「60-80pt」「120pt」) | 数字被画进图片 | 用自然语言:「很大的字」「占画面三分之一」 |
| 百分比(如「占40%」「60%背景」) | 百分比被画进图片 | 用感觉:「大面积留白」「标题占主导」 |
| 设计术语列表(如「size ratio 3:1」) | 术语被画进图片 | 只描述最终视觉效果 |
| 英文标注词(如「wrong answers」「aha moments」) | 英文被画进图片 | 如果画面不需要这些文字,就不要写 |
| CSS/代码式描述(如「#FF4444 15%」) | hex值被画进图片 | 用颜色名:「红色点缀」「黑白为主」 |
核心原则:prompt里出现的每一个词,都要假设它会被画进图片。 如果你不希望某个词出现在画面中,就不要写进prompt。
额外踩坑(2026-04-10追加验证):
- prompt开头的场景描述(如「A warm Sunday morning comic strip」)也会被渲染成画面文字 → 开头不要写英文描述句,直接写风格指令
- Manga/Neo-Pop等「高能量」风格,AI会自动补充英文拟声词(DOKAN! HYPED! Aha!)→ 在prompt末尾加一句:「Only render the exact text specified in TEXT TO RENDER. Do not add any extra text, sound effects, or labels.」
- 每张slide生成后必须用Read工具检查,发现噪点文字立即重新生成
Base style模板要短。 Snoopy风格模板只有4行,效果最好。长模板不但不能提升质量,反而会产生噪点文字。描述mood,不描述layout。
Base Style Templates (Design System → Prompt)
Each base style is derived from a Design System Preset (see SKILL.md Step 2). Define once, apply to every slide in the deck.
Warm Narrative:
VISUAL REFERENCE: TED talk visual style meets Airbnb pitch deck — approachable storytelling.
CANVAS: 16:9 aspect ratio, 2048x1152 pixels, high quality sharp rendering.
COLOR SYSTEM: Warm cream background, dark charcoal text, coral accent for highlights.
Everything feels warm, trustworthy, human. Flat vector illustrations with rounded shapes,
people-centric imagery, hand-drawn feel optional.Neo-Pop Magazine:
VISUAL REFERENCE: Supreme lookbook meets HYPEBEAST article — typography as graphic art.
CANVAS: 16:9 aspect ratio, 2048x1152 pixels, high quality sharp rendering.
COLOR SYSTEM: Cream background with bold color blocks in hot pink, cyan, and yellow.
Black text, thick black borders. Headlines are massive and ARE the visual design.
Energy, youth, playful rebellion. Pixel-art icons, speech bubbles, sticker aesthetic.Ligne Claire Comics:
VISUAL REFERENCE: Hergé's Tintin tradition — maximum information clarity through
visual restraint. Every line serves a purpose.
CANVAS: 16:9 aspect ratio, 2048x1152 pixels, high quality sharp rendering.
COLOR SYSTEM: White cream background, flat saturated color fills, black outlines.
Each color codes a concept. Panel-based layouts with clear gutters between panels.
Uniform-weight black outlines, no gradients, no shading, zero visual noise.
Characters with simple but expressive faces. Speech bubbles for text.Whiteboard Sketch:
VISUAL REFERENCE: xkcd "What If?" meets a professor's whiteboard after an
exciting lecture — the beautiful mess of someone thinking out loud.
CANVAS: 16:9 aspect ratio, 2048x1152 pixels, high quality sharp rendering.
COLOR SYSTEM: Pure white background, black ink for everything, one red accent
for the single most important insight. Monochrome forces focus on the idea.
Hand-drawn handwritten feel, stick figures with expressive poses,
wobbly diagrams, arrows connecting concepts. Informal, alive, like
someone just finished drawing this on a real whiteboard.Manga Educational:
VISUAL REFERENCE: Japanese educational manga (学習漫画) like "Manga Guide to
Statistics" — a character GUIDES you through concepts with reactions and drama.
CANVAS: 16:9 aspect ratio, 2048x1152 pixels, high quality sharp rendering.
COLOR SYSTEM: White background with selective color panels. Bright warm character palette.
Manga panel layouts, expressive anime-style characters with big reaction faces,
speech bubbles for dialogue, speed lines for emphasis, sparkle effects for key insights.
A character guides you through the concept — surprise eyes when the insight lands.Warm Comic Strip:
VISUAL REFERENCE: Charles Schulz Peanuts comic strip — warm, philosophical, charming.
Characters include round-headed kids, a lovable beagle dog, and a small yellow bird.
The world is simple (grass, sky, doghouse, trees) but the ideas are deep.
CANVAS: 16:9 aspect ratio, 2048x1152 pixels, high quality rendering.
COLOR SYSTEM: Warm cream/newspaper tone background, soft muted pastels,
warm ink lines (not harsh black). Everything feels like a Sunday morning comic page.NOTE: This principle applies to ALL base styles above, not just Snoopy. Keep base styles SHORT. Do not add pt sizes, color ratios, composition percentages, or typography specs — they get rendered as literal text in AI-generated images. Describe mood, not layout. See proven-styles-snoopy.md for the full principle.
🎨 Custom Character Style Reference
Users may reference specific cartoon/anime aesthetics (e.g., "Doraemon style", "Ghibli feel"). Extract the visual DNA and build a prompt around the style traits, not the character IP.
Common references → prompt traits:
| User says | Shape language | Line quality | Palette | Emotional tone |
|---|---|---|---|---|
| "Doraemon" | Round, soft | Clean uniform | Bright primary blue + white + red | Warm, magical, educational |
| "Studio Ghibli" | Organic, natural | Detailed watercolor | Natural greens, sky blues, earth tones | Wonder, warmth, nostalgia |
| "Calvin and Hobbes" | Dynamic, varied | Expressive ink brush | Lush outdoor greens, sunset oranges | Philosophical, adventurous |
| "One Piece" | Exaggerated, bold | Thick dynamic | High-contrast, saturated | Energetic, dramatic |
| "Crayon Shin-chan" | Crude, chunky | Rough crayon-like | Flat bright primary | Absurd, everyday humor |
| "Adventure Time" | Geometric, simple | Thin uniform | Pastel candy colors | Whimsical, surreal |
| "Snoopy/Peanuts" | Simple, round | Clean thin (#333333 not #000) | Muted warm pastels (#FFF8E8 base) | Philosophical, gentle — ⭐ See proven-styles-snoopy.md for detailed proven guide |
Template:
CUSTOM STYLE: Inspired by [reference name] aesthetic.
Shape language: [round/angular/geometric/organic]
Line quality: [thin uniform / thick varied / sketchy / brushwork]
Color palette: [specific hex codes extracted from that aesthetic]
Character style: [proportions, expressiveness, detail level]
Background treatment: [detailed/minimal/abstract/none]
Emotional tone: [warm/energetic/philosophical/surreal/dramatic]Per-Slide Prompt Template
Replace [bracketed items] with your content. The key difference from boring prompts: every slide has a Visual Reference, Design Intent, and Visual Narrative.
Create a slide that feels like [visual reference — what specific publication/brand
does this slide evoke? e.g., "a WIRED feature page about breakthrough tech",
"a Bloomberg data visualization", "an Apple keynote product reveal moment"].
[Paste Base Style from above]
DESIGN INTENT: [What should the viewer FEEL? Not what they should read.
e.g., "the asymmetric risk-reward structure should be viscerally obvious",
"the viewer should feel the urgency of time decay",
"the scale of the number should provoke awe"]
TEXT TO RENDER (must be perfectly legible and accurately spelled):
- [Role]: "[exact text]" — [how it should feel, e.g., "huge and dominant",
"small and tucked in the corner", "in a speech bubble"]
- [Role]: "[exact text]" — [feeling/placement description]
⚠️ NEVER use pt/px numbers, percentages, or CSS-like specs here — they will be
rendered as literal text in the image. Use natural language only.
VISUAL NARRATIVE: [Describe what to SEE using metaphors, photography language,
and emotional atmosphere. NOT layout positions.
e.g., "A golden curve emerging from darkness, flat and gray in the loss zone,
then bending upward into brilliant warm light at the break-even point.
The chart has NO grid lines — just the pure dramatic curve and the giant number
floating at the inflection point like a spotlight."]⚠️ 好Prompt vs 坏Prompt 对比(Path B实战教材,2026-04-10)
同一张slide(xkcd白板风格,Agent = Model + Harness公式),两种写法的对比:
❌ 坏Prompt(v1,生成了大量噪点文字):
...Key numbers rendered large (60-80pt) as visual anchors
...Annotations everywhere — arrows, circles, underlines
...crossed-out wrong answers, "aha!" moments marked with stars
...rendered as massive 80pt graphic headline, taking up 40% of slide问题:「60-80pt」「wrong answers」「aha moments」「80pt」「40%」全被画进了图片。
✅ 好Prompt(v2,画面干净零噪点):
...Hand-drawn handwritten feel, stick figures with expressive poses,
wobbly diagrams, arrows connecting concepts. Informal, alive.
...Equation: "Agent = Model + Harness" — huge and dominant, centered
...Insight: "你控制不了大脑怎么想 但你能控制它看到什么、能做什么" — circled in red区别:用自然语言描述感觉(huge and dominant),不用技术规格(80pt, 40%)。
记住:prompt里的每个词都可能被画进图片。描述mood,不描述layout。
Slide Type Examples (GOOD approach)
Cover — WIRED Editorial style:
Create a slide that feels like the opening spread of a WIRED magazine feature story.
[WIRED Editorial Base Style]
DESIGN INTENT: The viewer should feel they're about to read something important
and intellectually exciting — not another corporate deck.
TEXT TO RENDER:
- Title: "期权" — massive, dominant, white on charcoal, the characters
themselves ARE the design — they should fill nearly half the slide
- Subtitle: "用有限的代价撬动无限的可能" — small teal tagline below the title
- Tag: "STOCK OPTIONS GUIDE" — tiny, spaced-out caps, subtle teal
VISUAL NARRATIVE: The left side is dominated by the oversized Chinese characters,
treated as graphic art — not just text. The right side features an abstract
geometric composition: interlocking angular shapes in charcoal and dark navy,
with thin teal neon lines tracing the edges like circuit paths. The overall
feeling is a tech magazine you'd pick up at an airport bookstore.Explanation — Manga Educational style:
Create a slide that feels like a page from "Manga Guide to Economics" —
a cheerful character explaining a concept, with dramatic manga reactions
when the key insight lands.
[Manga Educational Base Style]
DESIGN INTENT: The viewer should feel GUIDED through the concept by a
friendly character. The "aha moment" should trigger a visible manga-style
reaction — surprise eyes, sparkles — making the abstract feel personal.
TEXT TO RENDER:
- Title: "什么是期权?" — bold manga impact title, slightly angled, top of slide
- Speech bubble 1: "期权就是花一小笔钱买一个权利" — character explaining
- Speech bubble 2: "但不是义务哦!" — character with index finger up, emphasis
- Reaction text: "原来如此!" — in a starburst speech bubble, eureka moment
VISUAL NARRATIVE: A 3-panel manga layout. Panel 1 (large, left half): a
friendly anime-style character (teacher/guide) with warm smile, pointing
at a simple diagram of "premium → right to buy". Panel 2 (top-right): the
same character holding up a finger with sparkle effect, emphasizing "right,
not obligation". Panel 3 (bottom-right): a second character (student) with
classic manga surprise face — big eyes, mouth open, lightbulb above head,
speed lines radiating outward. Clean white backgrounds in each panel,
thin black panel borders.Concept — Whiteboard Sketch style:
Create a slide that feels like a brilliant professor just finished drawing
on a whiteboard — messy, alive, and suddenly everything clicks.
[Whiteboard Sketch Base Style]
DESIGN INTENT: The viewer should feel like they're sitting in the front
row of a great lecture. The hand-drawn quality makes complex finance feel
accessible and human, not intimidating.
TEXT TO RENDER:
- Title: "Call vs Put" — hand-drawn, underlined twice
- Left diagram label: "看涨 Call" with upward arrow
- Right diagram label: "看跌 Put" with downward arrow
- Annotation: "一个赌涨 一个赌跌 就这么简单" — circled in red
VISUAL NARRATIVE: A white canvas that looks like a freshly-used whiteboard.
On the left, a hand-drawn stick figure happily riding an upward arrow
(labeled "Call 看涨"), the arrow drawn with confident upward strokes.
On the right, another stick figure with an umbrella as a downward arrow
descends (labeled "Put 看跌"), suggesting protection. Between them,
a hand-drawn "VS" in a rough circle. At the bottom, a wobbly hand-drawn
underline beneath the annotation "就这么简单", circled in red marker —
the only color on the entire slide. Arrows, crossed-out attempts, and
small doodles in margins give it authentic whiteboard energy.Chinese Text Tips for Path B
1. Keep titles ≤8 characters — AI renders short Chinese text most reliably 2. Body text ≤30 characters per line — longer lines risk garbling 3. Avoid rare characters — stick to common vocabulary 4. If text renders incorrectly — simplify the text or split into shorter phrases 5. Always verify — check every slide image for text accuracy before assembly 6. Separate text from visuals — put text in clear areas, not overlapping complex visuals
Parallel Generation Strategy
Generate slides in batches of 3-5 concurrently for speed:
# Run 3 in parallel using background processes
export $(grep GEMINI_API_KEY ~/.claude/.env)
uv run generate_image.py --prompt "slide 1 prompt..." --filename slide-01.png &
uv run generate_image.py --prompt "slide 2 prompt..." --filename slide-02.png &
uv run generate_image.py --prompt "slide 3 prompt..." --filename slide-03.png &
waitPrompt Quality Checklist (Quick Reference)
Before generating any slide, verify:
- [ ] 防泄漏检查 — Prompt中没有pt/px数字、百分比、CSS术语?(最重要!)
- [ ] Visual Reference — References a specific publication/brand/art style?
- [ ] Design Intent — Expresses what viewer should FEEL?
- [ ] Visual Narrative — Described with metaphors and atmosphere, not layout positions?
- [ ] 只写画面需要的文字 — TEXT TO RENDER中的每个词都是画面内容,没有设计指令?
- [ ] NO Generic Adjectives — Banned: "professional", "clean", "modern", "sleek", "elegant"?
---
5. NotebookLM Slide Prompts
Style Templates (from awesome-notebookLM-prompts)
| Category | Templates |
|---|---|
| Business Editorial | Modern Newspaper, Yellow×Black Editorial, Black×Orange Agency |
| Street/Trendy | Manga Style, Magazine Style, Pink Street-style, Digital Neo Pop |
| Typography-driven | Mincho × Handwritten Mix |
| Art/Avant-garde | Royal Blue×Red Watercolor, Sculpture×Vaporwave, Tech Art Neon |
| Product/Premium | Studio Mockup Premium |
| Athletic/Energy | Sports Athletic Energy |
Each template defines: Global Design Settings (palette, font hierarchy, grid, icon style) + Layout Variations.
NotebookLM Best Practices
1. Notes as source — Write outline in NotebookLM notes, use as source for slide generation 2. Brand book as source — Upload brand guidelines, prompt: "Use the brandbook for branding and styling references" 3. Refresh old decks — Upload existing Google Slides, let AI redesign with new branding 4. Multi-source synthesis — Upload PDFs + videos + web links, AI synthesizes across all 5. Specify audience — "for busy managers" / "for beginners" / "for investors" 6. Two-step method — First generate a speech script, then use the script to generate slides 7. Avoid topic titles — Use narrative topic sentences instead of "Title: Subtitle" format 8. Upload gold standard — Upload your best past presentation as a style reference
Sources:
- Google Blog: 8 ways to use Slide Decks in NotebookLM
- GitHub: awesome-notebookLM-prompts
- XDA Developers: 3 NotebookLM prompts for slides
6. Public Prompt Resources
| Resource | Link | Highlights |
|---|---|---|
| Superside: 15+ AI Prompts for Presentations | Link | Full-type templates: business, case study, webinar |
| Slidesgo Smart Guide | Link | 8 core templates + prompt methodology |
| SlidesAI: 75+ Presentation Prompts | Link | 75+ ready-to-use prompts by scenario |
| awesome-notebookLM-prompts | Link | 20+ visual style YAML templates |
| Sabrina Ramonov: Viral PowerPoints | Link | 3-tier framework with 14 viral layouts |
| Google: Gemini Image Prompting | Link | 6-element formula for image prompts |
| DataCamp: NotebookLM Guide | Link | Full NotebookLM tutorial with slides |
7. Style Selection Guide (实战验证)
核心发现(2026-02-08实测):插画/漫画类风格的AI生成效果远好于「专业极简」类风格。
暗色底+发光文字+大量留白的风格(如WIRED、霓虹冲击、渐变高端、FT数据新闻)在Full AI Visual (Path B)中效果差,已从Base Style Templates中移除。
推荐优先使用的风格(效果最佳): 1. Warm Comic Strip (Snoopy) — 详见 proven-styles-snoopy.md 2. Manga Educational (学習漫画) 3. Ligne Claire Comics (清线) 4. Neo-Pop Magazine (新波普) 5. Whiteboard Sketch (xkcd)
更多实测风格(含10种扩展风格的配色/prompt/适用场景): → proven-styles-gallery.md
样例图片(17种风格的压缩版,每张<1MB): → ../assets/style-samples/
Proven Style Guide: Snoopy / Peanuts 温暖漫画风
实战验证的风格指南。核心原则:描述情绪和世界观,不要微操构图细节。让AI自由发挥。
核心风格(只需要记住这些)
一句话描述: Peanuts漫画的温暖与哲理感——简单的角色说着深刻的话,日常场景中蕴含人生智慧。
视觉世界观:
- 角色包括圆头小孩、小狗、小鸟,它们组成一个温暖的小世界
- 背景极简——草地、天空、狗屋、树就是全部世界
- 色调温暖柔和,像泛黄的报纸漫画
- 哲学感来自「简单角色 × 深刻话语」的反差
Base Style Prompt
每张slide附加这段即可,不要在per-slide prompt中重复约束视觉细节:
VISUAL REFERENCE: Charles Schulz Peanuts comic strip — warm, philosophical, charming.
Characters include round-headed kids, a lovable beagle dog, and a small yellow bird.
The world is simple (grass, sky, doghouse, trees) but the ideas are deep.
CANVAS: 16:9 aspect ratio, 2048x1152 pixels, high quality rendering.
COLOR SYSTEM: Warm cream/newspaper tone background, soft muted pastels, warm ink lines (not harsh black). Everything feels like a Sunday morning comic page.Per-Slide Prompt原则
DO:
- 只描述「这页想传达什么感受」+「需要渲染的文字」
- 用一两句话描述画面情绪("角色在狗屋顶上看星空,若有所思")
- 让AI自己决定构图、角色数量、背景细节
DON'T:
- ❌ 不要指定具体颜色hex值的比例(60%/25%/15%)
- ❌ 不要写CSS式的布局指令("标题居中偏上"、"副标题放在speech bubble中")
- ❌ 不要限制角色数量或具体姿势("角色坐在草地上仰望")
- ❌ 不要限制"NOT Snoopy or Charlie Brown"——这种反面约束反而让AI生成的角色更单调
Prompt示例(好 vs 坏)
坏(过度约束):
A cute round-headed cartoon character (NOT Snoopy or Charlie Brown — an original
simple character with Peanuts proportions) sits on a simple zigzag grass line,
gazing up at the large hand-lettered title floating above. Background: soft warm
cream (#FFF8E8) 60%. Ink color: warm brown-black (#333333). A speech bubble extends
from the character with subtitle text. Small puffy clouds dot the sky. Bottom:
small text in 10pt.→ 结果:只有一个generic圆头小人,没有狗,没有鸟,构图死板
好(描述情绪,给AI空间):
Create a warm Peanuts-style cover slide.
[Base Style]
The cover should feel inviting and curious — like the opening panel of a
Sunday comic strip where something interesting is about to happen.
TEXT TO RENDER:
- Title: "企业AI实战培训"
- Subtitle: "Day 2 — 数据分析与办公提效"
- Footer: "讲师:花生 | 2026年2月"
Let the characters and scene naturally complement the topic.→ 结果:Charlie Brown坐在桌前工作,Snoopy趴在旁边陪伴,自然温馨
适用场景
| 场景 | 匹配度 |
|---|---|
| 产品/品牌介绍 | 极佳 |
| 教育/培训 | 极佳 |
| 个人分享/演讲 | 极佳 |
| 数据报告 | 好 |
| 严肃商业提案 | 一般 |
| 复杂技术架构 | 不推荐 |
实战经验
- 2026-02-08 Day1课件(原版prompt): 10张slides,角色多样(小孩+狗+鸟),构图丰富,效果极佳
- 2026-02-08 Day2测试(过度约束版prompt): 5张slides,只有一个圆头角色,无狗无鸟,多样性差
- 教训: few-shot越多、限制越细,生成多样性越差。信任AI的创造力。
#!/usr/bin/env python3
# /// script
# requires-python = ">=3.10"
# ///
"""Create a browser-presentable fullscreen image slide deck."""
import argparse
import html
import os
from pathlib import Path
def rel_path(path: Path, output: Path) -> str:
return Path(os.path.relpath(path.resolve(), output.parent.resolve())).as_posix()
def build_html(images: list[Path], output: Path, title: str) -> str:
slides = []
for index, image in enumerate(images, start=1):
src = html.escape(rel_path(image, output))
active = " active" if index == 1 else ""
lazy = "" if index == 1 else ' loading="lazy"'
slides.append(
f' <section class="slide{active}" aria-label="Slide {index}">'
f'<img src="{src}" alt="Slide {index}"{lazy}></section>'
)
safe_title = html.escape(title)
return f"""<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{safe_title}</title>
<style>
* {{ box-sizing: border-box; }}
html, body {{ margin: 0; width: 100%; height: 100%; overflow: hidden; background: #050505; color: #f5f5f5; }}
body {{ font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif; }}
main {{ position: fixed; inset: 0; display: grid; place-items: center; }}
.slide {{
position: absolute; inset: 0;
display: none; place-items: center;
background: #050505;
}}
.slide.active {{ display: grid; }}
.slide img {{
display: block;
width: 100vw; height: 100vh;
object-fit: contain;
background: #050505;
}}
.hud {{
position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 3;
display: flex; justify-content: space-between; align-items: center;
pointer-events: none;
color: rgba(255,255,255,.82); font-size: 13px;
text-shadow: 0 1px 8px rgba(0,0,0,.72);
}}
.title, .counter {{
padding: 6px 9px; border-radius: 6px;
background: rgba(0,0,0,.36); backdrop-filter: blur(10px);
}}
.nav {{
position: fixed; top: 0; bottom: 0; z-index: 2;
width: 28vw; border: 0; padding: 0; opacity: 0;
cursor: pointer; background: transparent;
}}
.nav.prev {{ left: 0; }}
.nav.next {{ right: 0; }}
@media print {{
html, body {{ overflow: visible; height: auto; background: #fff; }}
main {{ position: static; display: block; }}
.slide {{ position: static; display: block; break-after: page; background: #fff; }}
.slide img {{ width: 100%; height: auto; object-fit: contain; }}
.hud, .nav {{ display: none; }}
}}
</style>
</head>
<body>
<main>
{chr(10).join(slides)}
</main>
<button class="nav prev" type="button" aria-label="上一页"></button>
<button class="nav next" type="button" aria-label="下一页"></button>
<div class="hud" aria-live="polite">
<div class="title">{safe_title}</div>
<div class="counter"><span id="current">1</span> / <span id="total">{len(images)}</span></div>
</div>
<script>
const slides = Array.from(document.querySelectorAll('.slide'));
const current = document.getElementById('current');
const total = document.getElementById('total');
let index = 0;
total.textContent = String(slides.length);
function show(nextIndex) {{
index = Math.max(0, Math.min(slides.length - 1, nextIndex));
slides.forEach((slide, i) => slide.classList.toggle('active', i === index));
current.textContent = String(index + 1);
const hash = `#${{index + 1}}`;
if (location.hash !== hash) history.replaceState(null, '', hash);
}}
function step(delta) {{
show(index + delta);
}}
document.querySelector('.nav.prev').addEventListener('click', () => step(-1));
document.querySelector('.nav.next').addEventListener('click', () => step(1));
document.addEventListener('keydown', (event) => {{
if (['ArrowRight', 'ArrowDown', 'PageDown', ' '].includes(event.key)) {{
event.preventDefault();
step(1);
}}
if (['ArrowLeft', 'ArrowUp', 'PageUp', 'Backspace'].includes(event.key)) {{
event.preventDefault();
step(-1);
}}
if (event.key === 'Home') show(0);
if (event.key === 'End') show(slides.length - 1);
}});
const initial = Number(location.hash.replace('#', ''));
if (Number.isInteger(initial) && initial >= 1 && initial <= slides.length) {{
show(initial - 1);
}} else {{
show(0);
}}
</script>
</body>
</html>
"""
def main() -> None:
parser = argparse.ArgumentParser(description="Create a fullscreen HTML image slide deck")
parser.add_argument("images", nargs="+", help="Slide image paths")
parser.add_argument("-o", "--output", required=True, help="Output HTML path")
parser.add_argument("--title", default="Image Slide Deck", help="Document title")
args = parser.parse_args()
images = [Path(item) for item in args.images]
missing = [str(path) for path in images if not path.exists()]
if missing:
raise SystemExit("Missing images:\n" + "\n".join(missing))
output = Path(args.output)
output.parent.mkdir(parents=True, exist_ok=True)
output.write_text(build_html(images, output, args.title), encoding="utf-8")
print(f"HTML deck saved: {output.resolve()}")
if __name__ == "__main__":
main()
Related skills
FAQ
Does huashu-slide-codex work in Claude Code or Cursor?
No. It relies on Codex's built-in image_gen, which does not exist in Claude Code or Cursor, so the skill will not work as intended there.
Do I need an OpenAI or Gemini API key to use it?
No. The skill intentionally avoids nano banana, the Gemini API, and a local OPENAI_API_KEY, using Codex's included image_gen instead to save API cost.