@iasiv5/dsh-skills 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/locale/en.json +6 -0
  2. package/locale/zh.json +6 -0
  3. package/package.json +4 -2
  4. package/skills/answer-me-with-html/SKILL.md +4 -2
  5. package/skills/answer-me-with-html/scripts/am.mjs +627 -192
  6. package/skills/guizang-ppt-skill/README.en.md +10 -8
  7. package/skills/guizang-ppt-skill/README.md +10 -8
  8. package/skills/guizang-ppt-skill/SKILL.md +20 -16
  9. package/skills/guizang-ppt-skill/assets/template-swiss.html +1068 -456
  10. package/skills/guizang-ppt-skill/assets/template.html +991 -225
  11. package/skills/guizang-ppt-skill/references/checklist.md +5 -4
  12. package/skills/guizang-ppt-skill/references/components.md +9 -5
  13. package/skills/guizang-ppt-skill/references/gz-components.md +289 -0
  14. package/skills/guizang-ppt-skill/references/layouts-swiss.md +17 -17
  15. package/skills/guizang-ppt-skill/references/layouts.md +1 -1
  16. package/skills/guizang-ppt-skill/references/themes-swiss.md +57 -86
  17. package/skills/guizang-ppt-skill/references/themes.md +65 -63
  18. package/skills/guizang-ppt-skill/scripts/gz-theme.mjs +434 -0
  19. package/skills/guizang-social-card-skill/HANDOFF.md +19 -1
  20. package/skills/guizang-social-card-skill/README.en.md +20 -7
  21. package/skills/guizang-social-card-skill/README.md +20 -7
  22. package/skills/guizang-social-card-skill/SKILL.md +7 -5
  23. package/skills/guizang-social-card-skill/assets/template-editorial-card.html +954 -126
  24. package/skills/guizang-social-card-skill/assets/template-swiss-card.html +588 -84
  25. package/skills/guizang-social-card-skill/package-lock.json +90 -1
  26. package/skills/guizang-social-card-skill/package.json +7 -4
  27. package/skills/guizang-social-card-skill/references/background-systems.md +7 -15
  28. package/skills/guizang-social-card-skill/references/components.md +16 -10
  29. package/skills/guizang-social-card-skill/references/gz-components.md +289 -0
  30. package/skills/guizang-social-card-skill/references/layout-recipes.md +1 -1
  31. package/skills/guizang-social-card-skill/references/production-workflow.md +10 -12
  32. package/skills/guizang-social-card-skill/references/style-system.md +1 -1
  33. package/skills/guizang-social-card-skill/references/theme-presets.md +59 -111
  34. package/skills/guizang-social-card-skill/scripts/gz-fonts.mjs +654 -0
  35. package/skills/guizang-social-card-skill/scripts/gz-theme.mjs +434 -0
  36. package/skills/guizang-social-card-skill/scripts/render.mjs +92 -0
  37. package/skills/guizang-social-card-skill/validate-social-deck.mjs +11 -6
@@ -86,11 +86,11 @@ Beyond Claude Code / Codex, you can also use Guizang PPT Skill on these platform
86
86
  - 📐 **Horizontal swipe navigation**: ← → arrows / scroll wheel / touch swipe / bottom dots / ESC for index
87
87
  - 🧩 **Style A 10 layouts**: cover, divider, big numbers, image/text, image grid, pipeline, comparison, and more
88
88
  - 🧱 **Style B 22 locked layouts**: Cover, Statement, KPI Tower, Loop Diagram, Duo Compare, Image Hero, Closing Manifesto, and more
89
- - 🎨 **Curated theme presets**: 5 electronic-ink themes for Style A, 4 Swiss anchor-color themes for Style B
89
+ - 🎨 **Curated theme presets**: 5 electronic-ink themes for Style A, 4 Swiss anchor-color themes for Style B; a brand color becomes a constrained brand theme generated with color science
90
90
  - 🖼 **Optional Codex image flow**: generate documentary photos, infographics, flow diagrams, system maps, and UI scenes with GPT-Image 2.0 / GPT-M 2.0, then insert them at template-safe ratios
91
91
  - 📰 **Social covers**: generate 21:9 WeChat cover images, 1:1 share cards, 3:4 Xiaohongshu covers, video thumbnails, and related variants
92
92
  - 🎤 **Presenter mode**: dual-window audience output, 16:9 current/next previews, speaker notes, timing and rehearsal, auto advance, laser pointer, circles, and live recovery controls
93
- - 📴 **Low-power static mode**: press `B` to turn WebGL / canvas animation into static visuals
93
+ - 📴 **Low-power static mode**: press `B` to turn WebGL / canvas animation into static visuals; on slow machines the background lowers its resolution automatically and freezes to a still frame if needed
94
94
  - 📄 **Single HTML file** — no build, no server, open directly in the browser
95
95
 
96
96
  ## Fits / Doesn't fit
@@ -327,7 +327,7 @@ guizang-ppt-skill/
327
327
 
328
328
  ## Theme presets
329
329
 
330
- Pick from `references/themes.md`. **Custom hex values are not allowed** — protecting the aesthetic matters more than freedom of choice.
330
+ Pick from `references/themes.md`. **Don't write hex values by hand** — protecting the aesthetic matters more than freedom of choice. Every theme's text, rule and small accent-text colors are derived with the same contrast rules (WCAG + APCA).
331
331
 
332
332
  ### Style A Editorial Themes
333
333
 
@@ -339,11 +339,13 @@ Pick from `references/themes.md`. **Custom hex values are not allowed** — prot
339
339
  | <img src="https://github.com/user-attachments/assets/dfea080e-e916-417e-93cd-0a3628de84ca" width="260" alt="Kraft Paper theme preview"> | 🍂 **Kraft Paper** | `#2a1e13` / `#eedfc7`. Nostalgic, humanist, literary, indie zines. |
340
340
  | <img src="https://github.com/user-attachments/assets/f3705592-9a72-4dbc-9818-df3aea61bc75" width="260" alt="Dune theme preview"> | 🌙 **Dune** | `#1f1a14` / `#f0e6d2`. Art, design, creative, fashion, gallery-like decks. |
341
341
 
342
- Switching themes only requires replacing the 6 variables at the top of `template.html`'s `:root{}` block — all other CSS flows through `var(--...)`.
342
+ To switch themes, set the theme id on the template's first line, e.g. `<html data-theme="indigo-porcelain">`. All themes are built into the template.
343
+
344
+ When the user gives a brand or logo color, run `node scripts/gz-theme.mjs brand "#4D6BFE" --family magazine` (`--family swiss` for Style B) and paste the printed theme into the deck. The script pulls the color into the lightness and chroma range the style allows and refuses it if it cannot meet the readability floors — fall back to a preset then.
343
345
 
344
346
  ### Style B Swiss Themes
345
347
 
346
- Pick from `references/themes-swiss.md`. **Custom hex values are not allowed** here either.
348
+ Pick from `references/themes-swiss.md`. **Don't write hex values by hand** here either; brand colors go through the same script.
347
349
 
348
350
  | Preview | Theme | Anchor color and best for |
349
351
  |---------|-------|---------------------------|
@@ -379,7 +381,7 @@ If the user asks for a Swiss-style deck without specifying color, default to Int
379
381
  - Add more Swiss layout validation rules
380
382
  - Improve screenshot redesign and infographic generation workflows
381
383
  - Prepare marketplace-specific variants such as WorkBuddy
382
- - Add more curated theme packs while keeping custom colors restricted
384
+ - Add more curated theme packs; brand colors stay constrained
383
385
 
384
386
  ## FAQ
385
387
 
@@ -387,7 +389,7 @@ If the user asks for a Swiss-style deck without specifying color, default to Int
387
389
  The main output is HTML. You can present it in a browser, screenshot it, or record it. PPTX conversion can be done as a separate workflow, but it is not the core path today.
388
390
 
389
391
  **Why are custom colors not allowed?**
390
- The skill is designed for stable visual output. Arbitrary colors often break the system, so decks must use curated presets.
392
+ The skill is designed for stable visual output. Arbitrary colors often break the system, so decks must use curated presets. For a brand color, generate a theme with `scripts/gz-theme.mjs`: it constrains lightness and chroma per style and checks contrast for every text role.
391
393
 
392
394
  **Can I add my own layout?**
393
395
  Yes. Style A layouts can be extended in `references/layouts.md`. Style B is stricter: update `template-swiss.html`, `layouts-swiss.md`, `swiss-layout-lock.md`, and the validator together.
@@ -414,7 +416,7 @@ Bugs, layout issues, new layout requests — Issues and PRs welcome. Prioritize:
414
416
  - Presenter runtime changes must land in both templates and pass `scripts/check-presenter-runtime-sync.mjs`; CI rejects CSS / JavaScript drift
415
417
  - Presenter-note or live-behavior changes must also update `references/presenter-mode.md`, `references/checklist.md`, and `scripts/validate-presenter-mode.mjs`
416
418
  - Log pitfalls into `checklist.md` at the matching P0 / P1 / P2 / P3 tier
417
- - New theme colors go into `themes.md` with a recommended use case
419
+ - Themes, type sizes, fonts and background effects come from a shared design system: the templates' `GZ:FONTS` / `GZ:TOKENS` / `GZ:EFFECTS` blocks and the `GZ:THEMES` blocks in `themes*.md` are generated — don't edit them by hand; open an issue for new theme colors or type changes
418
420
 
419
421
  ## License
420
422
 
@@ -88,11 +88,11 @@ Guizang PPT Skill 的持续迭代获得 **360 安全龙虾**、**Kimi work**、*
88
88
  - 📐 **横向左右翻页**:键盘 ← → / 滚轮 / 触屏滑动 / 底部圆点 / ESC 索引
89
89
  - 🧩 **Style A 10 种布局**:封面、章节、数据大字报、图文、图片网格、Pipeline、对比等
90
90
  - 🧱 **Style B 22 种锁定版式**:Cover、Statement、KPI Tower、Loop Diagram、Duo Compare、Image Hero、Closing Manifesto 等
91
- - 🎨 **主题色预设**:Style A 5 套电子墨水主题,Style B 4 套瑞士高饱和锚点色
91
+ - 🎨 **主题色预设**:Style A 5 套电子墨水主题,Style B 4 套瑞士高饱和锚点色;给品牌色时按色彩科学生成受约束的品牌主题
92
92
  - 🖼 **Codex 可选配图流程**:可用 GPT-Image 2.0 / GPT-M 2.0 生成纪实照片、信息图、流程图、系统关系图、UI 情景图,并按模板比例插入
93
93
  - 📰 **多平台封面**:可用同一套视觉规则生成公众号 21:9、公众号分享卡 1:1、小红书 3:4、视频号横版等封面
94
94
  - 🎤 **演讲者模式**:双窗口观众屏、当前页/下一页 16:9 预览、演讲备注、计时排练、自动翻页、激光笔、圈选和现场故障恢复
95
- - 📴 **低性能静态模式**:按 `B` 可关闭 WebGL / canvas 动画,让动态内容退回静态背景
95
+ - 📴 **低性能静态模式**:按 `B` 可关闭 WebGL / canvas 动画,让动态内容退回静态背景;电脑带不动时背景会自动降分辨率,再不行就定格成静态
96
96
  - 📄 **单文件 HTML**:不需要构建、不需要服务器,浏览器直接打开
97
97
 
98
98
  ## 适合 / 不适合
@@ -328,7 +328,7 @@ guizang-ppt-skill/
328
328
 
329
329
  ## 主题色预设
330
330
 
331
- 从 `references/themes.md` 里选一套——**不允许自定义 hex 值**,保护美学比给自由更重要。
331
+ 从 `references/themes.md` 里选一套——**不允许随手写 hex 值**,保护美学比给自由更重要。所有主题的文字色、线条色和强调色小字都按同一套对比度规则(WCAG + APCA)算出来。
332
332
 
333
333
  ### Style A 电子杂志主题
334
334
 
@@ -340,11 +340,13 @@ guizang-ppt-skill/
340
340
  | <img src="https://github.com/user-attachments/assets/dfea080e-e916-417e-93cd-0a3628de84ca" width="260" alt="牛皮纸主题预览"> | 🍂 **牛皮纸** | `#2a1e13` / `#eedfc7`。怀旧、人文、阅读、历史、文学分享。 |
341
341
  | <img src="https://github.com/user-attachments/assets/f3705592-9a72-4dbc-9818-df3aea61bc75" width="260" alt="沙丘主题预览"> | 🌙 **沙丘** | `#1f1a14` / `#f0e6d2`。艺术、设计、创意、时尚和画廊感内容。 |
342
342
 
343
- 切换主题只需替换 `template.html` 开头 `:root{}` 里的 6 行变量,其他 CSS 全走 `var(--...)`。
343
+ 切换主题只需把模板第一行 `<html data-theme="…">` 改成主题 id,例如 `data-theme="indigo-porcelain"`,全部主题都已内置在模板里。
344
+
345
+ 用户给了品牌色或 logo 主色时,运行 `node scripts/gz-theme.mjs brand "#4D6BFE" --family magazine`(瑞士风用 `--family swiss`),把输出的主题贴进 deck。脚本会把品牌色收进这套风格允许的明度和彩度范围,达不到可读性要求就拒绝,这时回到预设。
344
346
 
345
347
  ### Style B 瑞士主题
346
348
 
347
- 瑞士风从 `references/themes-swiss.md` 里选一套,同样**不允许自定义 hex 值**。
349
+ 瑞士风从 `references/themes-swiss.md` 里选一套,同样**不允许随手写 hex 值**,品牌色走同一个脚本。
348
350
 
349
351
  | 预览 | 主题 | 锚点色与适合场景 |
350
352
  |------|------|------------------|
@@ -380,7 +382,7 @@ guizang-ppt-skill/
380
382
  - 增加更多瑞士风版式校验规则
381
383
  - 优化截图再设计和信息图生成工作流
382
384
  - 整理 WorkBuddy 等平台上架版本
383
- - 增加更多主题包,但继续限制自定义颜色
385
+ - 增加更多主题包,品牌色继续走受约束生成
384
386
 
385
387
  ## FAQ
386
388
 
@@ -388,7 +390,7 @@ guizang-ppt-skill/
388
390
  当前核心交付是 HTML。你可以用浏览器演示、截图或录屏。如果需要 PPTX,建议把 HTML 页面作为视觉稿再转换,但这不是当前主流程。
389
391
 
390
392
  **为什么不允许自定义颜色?**
391
- 这个 Skill 的重点是稳定产出。自由选色很容易破坏整体风格,所以只允许从预设主题里选。
393
+ 这个 Skill 的重点是稳定产出。自由选色很容易破坏整体风格,所以只允许从预设主题里选。需要品牌色时用 `scripts/gz-theme.mjs` 生成,它会按风格约束明度和彩度,并检查每个文字角色的对比度。
392
394
 
393
395
  **我能加自己的版式吗?**
394
396
  可以。Style A 可以在 `references/layouts.md` 里扩展;Style B 更严格,需要同步更新 `template-swiss.html`、`layouts-swiss.md`、`swiss-layout-lock.md` 和校验器。
@@ -415,7 +417,7 @@ Bug、排版问题、新布局需求——欢迎开 Issue 或 PR。改动请优
415
417
  - 演讲者运行时必须同时更新两套模板,并运行 `scripts/check-presenter-runtime-sync.mjs`;CI 会拦截两份模板的 CSS / JavaScript 漂移
416
418
  - 演讲备注或现场行为变化时,同步更新 `references/presenter-mode.md`、`references/checklist.md` 和 `scripts/validate-presenter-mode.mjs`
417
419
  - 把踩过的坑写到 `checklist.md` 对应的 P0 / P1 / P2 / P3 级别
418
- - 新主题色进 `themes.md` 并给出适合的场景
420
+ - 主题、字号、字体和背景特效来自共享设计系统,模板里 `GZ:FONTS` / `GZ:TOKENS` / `GZ:EFFECTS` 区块和 `themes*.md` 的 `GZ:THEMES` 区块是生成的,不要手改;新主题色或字号调整请提 Issue
419
421
 
420
422
  ## License
421
423
 
@@ -202,27 +202,30 @@ cp "<SKILL_ROOT>/assets/template-swiss.html" "项目/XXX/ppt/index.html"
202
202
 
203
203
  每次拷贝完 template.html 第一件事:grep 一下"[必填]" 确认全部替换完。
204
204
 
205
- #### 2.2 · 选定主题色(5 套预设 · 不允许自定义)
205
+ #### 2.2 · 选定主题色(预设优先 · 品牌色受约束生成)
206
206
 
207
- 本 skill **只允许从 5 套精心调配的预设里选一套**,不接受用户自定义 hex 值——颜色搭配错了画面瞬间变丑,保护美学比给自由更重要。
207
+ 颜色搭配错了画面瞬间变丑,所以**不直接使用用户给的任何颜色值**。默认从精调预设里选一套;用户明确有品牌色或 logo 主色时,用脚本生成一套受约束的品牌主题。
208
208
 
209
- | # | 主题 | 适合 |
209
+ | # | 杂志风主题 (`themes.md`) | 适合 |
210
210
  |---|------|------|
211
- | 1 | 🖋 墨水经典 | 通用 / 商业发布 / 不知道选啥的默认 |
212
- | 2 | 🌊 靛蓝瓷 | 科技 / 研究 / 数据 / 技术发布会 |
213
- | 3 | 🌿 森林墨 | 自然 / 可持续 / 文化 / 非虚构 |
214
- | 4 | 🍂 牛皮纸 | 怀旧 / 人文 / 文学 / 独立杂志 |
215
- | 5 | 🌙 沙丘 | 艺术 / 设计 / 创意 / 画廊 |
211
+ | 1 | 🖋 墨水经典 `ink-classic` | 通用 / 商业发布 / 不知道选啥的默认 |
212
+ | 2 | 🌊 靛蓝瓷 `indigo-porcelain` | 科技 / 研究 / 数据 / 技术发布会 |
213
+ | 3 | 🌿 森林墨 `forest-ink` | 自然 / 可持续 / 文化 / 非虚构 |
214
+ | 4 | 🍂 牛皮纸 `kraft-paper` | 怀旧 / 人文 / 文学 / 独立杂志 |
215
+ | 5 | 🌙 沙丘 `dune` | 艺术 / 设计 / 创意 / 画廊 |
216
+
217
+ 瑞士风 4 套(`ikb` / `lemon` / `lemon-green` / `safety-orange`)见 `themes-swiss.md`。
216
218
 
217
219
  **操作**:
218
220
  1. 基于内容主题推荐一套,或直接问用户选哪一套
219
- 2. 打开 `references/themes.md`,找到对应主题的 `:root` 块
220
- 3. **整体替换** `assets/template.html`(已拷贝版本)开头 `:root{` 块里标有"主题色"注释的那几行(`--ink` / `--ink-rgb` / `--paper` / `--paper-rgb` / `--paper-tint` / `--ink-tint`)
221
- 4. 其他 CSS 都走 `var(--...)`,无需任何其他改动
221
+ 2. 把拷贝好的模板第一行 `<html>` 的 `data-theme` 改成主题 id,例如 `data-theme="indigo-porcelain"`。全部主题都已内置在模板的 `GZ:TOKENS` 区块里,**不要改那个区块**
222
+ 3. 用户给了品牌色:运行 `node <SKILL_ROOT>/scripts/gz-theme.mjs brand "#4D6BFE" --family magazine`(瑞士风用 `--family swiss`),把输出的 `[data-theme="brand"]{…}` 贴到 deck `<style>` 末尾,再把 `data-theme` 改成 `brand`。脚本判定不达标时会说明原因,这时回到预设
223
+
224
+ **颜色变量**(页面里只用这些,不写 hex):文字 `--text-primary` / `--text-body` / `--text-secondary` / `--text-helper`;线条 `--line` / `--line-strong`;强调色色块 `--accent`;强调色当小字 `--accent-ink`、当大字 `--accent-display`;强调色块上的文字 `--accent-on`。
222
225
 
223
226
  **硬规则**:
224
227
  - 一份 deck 只用一套主题,不要中途换色
225
- - 不要接受用户给的任意 hex 值——委婉拒绝并展示 5 套让选
228
+ - 不要把用户给的 hex 值直接写进页面——走品牌色脚本
226
229
  - 不要混搭(例如 ink 取墨水经典、paper 取沙丘)——会彻底违和
227
230
 
228
231
  ### Step 3 · 填充内容
@@ -435,7 +438,7 @@ cp "<SKILL_ROOT>/assets/template-swiss.html" "项目/XXX/ppt/index.html"
435
438
  **硬规则:**
436
439
  - 同一页内,字号越小的元素字重必须 ≥ 字号越大的元素(不允许 16px 正文用 300 而 1.8vw 标题用 500)
437
440
  - 16px 左右的小字拒绝使用 weight 300(太细不可读),最低 400,推荐 500
438
- - 封面/IkB 反白大标题内强调字用 `italic + weight 300`,不要用 accent 色(蓝压蓝看不见)
441
+ - 封面/IKB 反白大标题内强调字:英文用 `italic + weight 300`,中文用 `font-weight:400`(中文不用斜体),不要用 accent 色(蓝压蓝看不见)
439
442
 
440
443
  组件细节(字体、颜色、网格、图标、callout、stat-card 等)在 `references/components.md`。
441
444
 
@@ -549,11 +552,12 @@ open "项目/XXX/ppt/index.html"
549
552
  guizang-ppt-skill/
550
553
  ├── SKILL.md ← 你正在读
551
554
  ├── assets/
552
- │ ├── template.html ← 风格 A · 电子杂志风模板(种子文件)
555
+ │ ├── template.html ← 风格 A · 电子杂志风模板(种子文件;GZ:* 标记区由 guizang-design 生成,不要手改)
553
556
  │ ├── template-swiss.html ← 风格 B · 瑞士国际主义风模板(种子文件)
554
557
  │ ├── screenshot-backgrounds/ ← 截图美化内置背景(WebP):style-a 5 套 / style-b 4 套
555
558
  │ └── motion.min.js ← Motion One 本地副本(离线兜底,约 64KB,共用)
556
559
  ├── scripts/
560
+ │ ├── gz-theme.mjs ← 品牌色 → 受约束主题(由 guizang-design 生成,零依赖)
557
561
  │ ├── validate-swiss-deck.mjs ← 风格 B 静态校验:登记版式、图片槽位、SVG 文本、标题对齐
558
562
  │ └── validate-presenter-mode.mjs ← 两种风格共用:页面 ID、演讲备注、时长和演讲者运行时校验
559
563
  └── references/
@@ -562,8 +566,8 @@ guizang-ppt-skill/
562
566
  ├── swiss-layout-lock.md ← 风格 B · 原始 22P 版式锁,正文页必须按这里登记
563
567
  ├── layouts-swiss.md ← 风格 B · 原始 22P 骨架说明 + 少量明确标注的实验区
564
568
  ├── swiss-map-component.md ← 风格 B · S08 地图扩展组件(MapLibre 点位/连线/卡片/控制)
565
- ├── themes.md ← 风格 A · 5 套主题色预设(只能选不能自定义)
566
- ├── themes-swiss.md ← 风格 B · 4 套瑞士风主题色预设(IKB / 柠檬黄 / 柠檬绿 / 安全橙)
569
+ ├── themes.md ← 风格 A · 5 套主题色预设 + 品牌色流程(主题部分由 guizang-design 生成)
570
+ ├── themes-swiss.md ← 风格 B · 4 套瑞士风主题色预设 + 品牌色流程(主题部分由 guizang-design 生成)
567
571
  ├── image-prompts.md ← GPT-M 2.0 配图类型、比例和基础提示词
568
572
  ├── screenshot-framing.md ← CleanShot X 式截图适配语义 + 内置背景资产映射
569
573
  ├── presenter-mode.md ← 演讲者 UI、AI 备注结构、观众屏同步与恢复契约