@topmindspace/tms-skills 0.3.1 → 0.3.6

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 (67) hide show
  1. package/CHANGELOG.md +172 -0
  2. package/README.en.md +6 -76
  3. package/README.md +7 -75
  4. package/package.json +1 -1
  5. package/top-ppt-html/README.en.md +19 -20
  6. package/top-ppt-html/README.md +36 -90
  7. package/top-ppt-html/SKILL.md +65 -60
  8. package/top-ppt-html/references/charts.md +0 -15
  9. package/top-ppt-html/references/components.md +0 -18
  10. package/top-ppt-html/references/design-system.md +2 -2
  11. package/top-ppt-html/references/icons.md +2 -2
  12. package/top-ppt-html/references/infographics.md +1 -5
  13. package/top-ppt-html/references/modes.md +4 -4
  14. package/top-ppt-html/references/tech-design.md +3 -3
  15. package/top-ppt-html/scripts/build_examples.py +4 -4
  16. package/top-ppt-html/scripts/build_pptx.js +240 -59
  17. package/top-ppt-html/scripts/check_triggers.py +10 -2
  18. package/top-ppt-html/scripts/extract_model.py +16 -5
  19. package/top-ppt-html/scripts/gen_channel_a.js +55 -10
  20. package/top-ppt-html/scripts/hydrate_charts.py +68 -13
  21. package/top-ppt-html/scripts/negative_tests.py +1 -1
  22. package/top-ppt-html/scripts/prepare_images.py +1 -1
  23. package/top-ppt-html/scripts/recommend_layout.py +26 -3
  24. package/top-ppt-html/scripts/render_from_model.py +78 -13
  25. package/top-ppt-html/scripts/scaffold_report.py +43 -3
  26. package/top-ppt-html/scripts/sync_runtime.py +32 -4
  27. package/top-ppt-html/scripts/test_feedback_gates.py +24 -0
  28. package/top-ppt-html/scripts/validate_pptx.py +10 -1
  29. package/top-ppt-html/scripts/validate_report.py +43 -7
  30. package/topmind-cover/README.en.md +11 -25
  31. package/topmind-cover/README.md +11 -25
  32. package/topmind-cover/SKILL.md +49 -38
  33. package/topmind-cover/assets/examples/README.md +15 -26
  34. package/topmind-cover/assets/examples/big-type-wechat.png +0 -0
  35. package/topmind-cover/assets/examples/big-type.png +0 -0
  36. package/topmind-cover/assets/examples/brand-launch-wechat.png +0 -0
  37. package/topmind-cover/assets/examples/brand-launch.png +0 -0
  38. package/topmind-cover/assets/examples/gan-huo-wechat.png +0 -0
  39. package/topmind-cover/assets/examples/gan-huo.png +0 -0
  40. package/topmind-cover/assets/examples/ip-fun-wechat.png +0 -0
  41. package/topmind-cover/assets/examples/ip-fun.png +0 -0
  42. package/topmind-cover/assets/examples/magazine-wechat.png +0 -0
  43. package/topmind-cover/assets/examples/magazine.png +0 -0
  44. package/topmind-cover/assets/examples/minimal-wechat.png +0 -0
  45. package/topmind-cover/assets/examples/minimal.png +0 -0
  46. package/topmind-cover/assets/examples/news-flash-wechat.png +0 -0
  47. package/topmind-cover/assets/examples/news-flash.png +0 -0
  48. package/topmind-cover/assets/examples/overview.png +0 -0
  49. package/topmind-cover/assets/examples/tutorial-steps-wechat.png +0 -0
  50. package/topmind-cover/assets/examples/tutorial-steps.png +0 -0
  51. package/topmind-cover/references/cover-styles.md +235 -264
  52. package/topmind-cover/references/impact-language.md +53 -0
  53. package/topmind-wechat-post/README.en.md +49 -1
  54. package/topmind-wechat-post/README.md +48 -2
  55. package/topmind-wechat-post/SKILL.md +35 -37
  56. package/topmind-wechat-post/references/element-spec.md +1 -1
  57. package/topmind-wechat-post/references/known-pits.md +2 -3
  58. package/topmind-wechat-post/references/typography-rules.md +1 -1
  59. package/topmind-wechat-post/references/workflow.md +3 -3
  60. package/topmind-wechat-post/references/writing-quality.md +8 -32
  61. package/topmind-wechat-post/scripts/md2wechat.py +117 -41
  62. package/topmind-wechat-post/scripts/negative_tests.py +32 -0
  63. package/topmind-x-article/README.en.md +40 -1
  64. package/topmind-x-article/README.md +42 -4
  65. package/topmind-x-article/SKILL.md +11 -5
  66. package/topmind-x-article/references/x-format.md +13 -10
  67. package/topmind-x-article/scripts/md2x.py +220 -40
@@ -28,6 +28,7 @@ research / architecture 仍须显式传 --layout-qa(不强制)。
28
28
  import sys
29
29
  import re
30
30
  import json
31
+ import base64
31
32
  import hashlib
32
33
  from typing import Optional
33
34
  from html.parser import HTMLParser
@@ -914,7 +915,11 @@ def _check_v9_hard_gates(txt, chk, model):
914
915
  ctype = 'donut'
915
916
  if ctype not in skew_types:
916
917
  continue
917
- vals = [float(v) for v in (ch.get('values') or []) if v is not None]
918
+ try:
919
+ vals = [float(v) for v in (ch.get('values') or []) if v is not None]
920
+ except (TypeError, ValueError):
921
+ skew_hits.append(f"第{si}章 {ctype} values 含非数值(图表数据非法,无法判定占比)")
922
+ continue
918
923
  vals = [v for v in vals if v >= 0]
919
924
  if len(vals) < 2:
920
925
  continue
@@ -1194,6 +1199,28 @@ def _img_srcs(img):
1194
1199
  return srcs
1195
1200
 
1196
1201
 
1202
+ def _img_alt_ok(tag: str) -> bool:
1203
+ """alt 存在且非空(alt="" 视为缺失)。"""
1204
+ m = re.search(r'alt\s*=\s*("([^"]*)"|\'([^\']*)\')', tag)
1205
+ if not m:
1206
+ return False
1207
+ val = m.group(2) if m.group(2) is not None else m.group(3)
1208
+ return bool(val and val.strip())
1209
+
1210
+
1211
+ def _data_uri_bytes(tag: str):
1212
+ """解码 data: URI 的实际字节数;非 base64 或解码失败时回落为载荷字符数。"""
1213
+ m = (re.search(r'src\s*=\s*"data:[^"\',]*,([^"]*)"', tag)
1214
+ or re.search(r"src\s*=\s*'data:[^\"\',]*,([^']*)'", tag))
1215
+ if not m:
1216
+ return None
1217
+ payload = re.sub(r'\s', '', m.group(1))
1218
+ try:
1219
+ return len(base64.b64decode(payload))
1220
+ except Exception:
1221
+ return len(payload)
1222
+
1223
+
1197
1224
  def _check_media(txt, chk, model):
1198
1225
  """素材图片与配图占位:零外链铁律(<img> 只允许 data: 内联或相对路径);
1199
1226
  alt 可访问性;配图占位必须有可见标签;模型 image 三选一(src/items/placeholder)
@@ -1203,13 +1230,15 @@ def _check_media(txt, chk, model):
1203
1230
  bad = [t for t in imgs if re.search(r'src\s*=\s*["\']\s*(?:https?:)?//', t)]
1204
1231
  chk("图片源无外链(data: 内联或相对路径,零外链铁律)", not bad,
1205
1232
  f"{len(bad)} 处外链图片" if bad else "")
1206
- noalt = [t for t in imgs if 'alt=' not in t]
1233
+ noalt = [t for t in imgs if not _img_alt_ok(t)]
1207
1234
  chk("图片均带 alt(可访问性)", not noalt,
1208
- f"{len(noalt)} 处缺 alt" if noalt else "", level="WARN")
1235
+ f"{len(noalt)} 处缺 alt(含空 alt)" if noalt else "", level="WARN")
1209
1236
  data_imgs = [t for t in imgs if re.search(r'src\s*=\s*["\']\s*data:', t)]
1210
- inline_bytes = sum(len(t) for t in data_imgs)
1211
- chk("单图 data: 内联体积在上限内", all(len(t) <= IMAGE_MAX_INLINE for t in data_imgs),
1212
- f"最大 {max((len(t) for t in data_imgs), default=0) // 1024}KB > 上限 {IMAGE_MAX_INLINE // 1024}KB",
1237
+ data_sizes = [(_data_uri_bytes(t), t) for t in data_imgs]
1238
+ max_bytes = max((b or 0 for b, _ in data_sizes), default=0)
1239
+ inline_bytes = sum(b if b is not None else len(t) for b, t in data_sizes)
1240
+ chk("单图 data: 内联体积在上限内", all((b or 0) <= IMAGE_MAX_INLINE for b, _ in data_sizes),
1241
+ f"最大 {max_bytes // 1024}KB > 上限 {IMAGE_MAX_INLINE // 1024}KB(按解码后字节计)",
1213
1242
  level="WARN")
1214
1243
  chk("报告内联图片总量在上限内", inline_bytes <= IMAGE_MAX_TOTAL,
1215
1244
  f"{inline_bytes // 1024}KB > 上限 {IMAGE_MAX_TOTAL // 1024}KB(改用相对路径)",
@@ -1610,7 +1639,14 @@ def main():
1610
1639
  if not path.exists():
1611
1640
  print(f"文件不存在: {path}")
1612
1641
  return 2
1613
- txt = path.read_text(encoding='utf-8')
1642
+ try:
1643
+ txt = path.read_text(encoding='utf-8')
1644
+ except UnicodeDecodeError as e:
1645
+ print(f"文件不是合法 UTF-8: {path}({e})")
1646
+ return 2
1647
+ except OSError as e:
1648
+ print(f"无法读取文件: {path}({e})")
1649
+ return 2
1614
1650
 
1615
1651
  v = Struct()
1616
1652
  v.feed(txt)
@@ -4,22 +4,15 @@
4
4
 
5
5
  A reusable skill for generating cover art for X long-form posts and WeChat articles. Goal: **striking, eye-catching, theme-focused**.
6
6
 
7
+ - Version: **v0.1.0** (same tag as `@topmindspace/tms-skills@0.3.6`)
8
+
7
9
  ## Style gallery
8
10
 
9
11
  <p align="center">
10
12
  <img src="https://github.com/topmindspace/tms-skills/raw/main/topmind-cover/assets/examples/overview.png" alt="topmind-cover · 8 cover-style overview" width="960" />
11
13
  </p>
12
14
 
13
- | Style | Best for |
14
- |-------|----------|
15
- | Viral dry-goods `gan-huo` | Tested picks, reviews, roundups; default for first-person "I tried it all for you" posts |
16
- | Giant-type manifesto `big-type` | Opinion pieces, deep essays, launch manifestos; default for one-sentence-stance pieces |
17
- | Brand launch `brand-launch` | Product launches, version updates, official best practices / whitepapers; first choice when a brand is the subject |
18
- | Tutorial steps `tutorial-steps` | Tutorials, onboarding guides, step-by-step walkthroughs, beginner-proof recipes |
19
- | Fun IP `ip-fun` | Case studies, data recaps, retrospectives, series (part 1 / part 2) |
20
- | News flash `news-flash` | News, flashes, hot-topic explainers, interview teasers, "myth-busting" angles |
21
- | Minimal `minimal` | Essays, book reviews, light takes, lifestyle musings; WeChat "light reading" pieces |
22
- | Editorial magazine `magazine` | In-depth interviews, profiles, business analysis, year-in-review; when "craft / trust" matters |
15
+ 8 styles (viral dry-goods / giant-type manifesto / brand launch / tutorial steps / fun IP / news flash / minimalist / editorial magazine): use cases, palette stories, abstract design principles, and Chinese+English prompt recipes in [`references/cover-styles.md`](./references/cover-styles.md); full-size per-style shots in [`assets/examples/`](./assets/examples/).
23
16
 
24
17
  ## Install
25
18
 
@@ -29,26 +22,19 @@ npx @topmindspace/tms-skills install topmind-cover
29
22
 
30
23
  ## Usage
31
24
 
32
- 0. **Pick a style (3 steps, required)**: choose 1 of 8 styles from `references/cover-styles.md` by topic
33
- → check `assets/examples/<style>.png` to confirm the visual language
34
- → compose the prompt from that style's recipe (replace `{TITLE}` with the real title).
35
- 1. Input: article title + 3 theme keywords + platform (x / wechat / both, default both).
36
- 2. Generate with the agent's image-generation capability (landscape 16:9, 8% margin on all sides).
37
- 3. Eyeball check (required): title text correct word for word, subject complete, theme legible at a glance;
38
- title text and key subject stay inside the central vertical 60% safe zone (so the 900×383 center crop never cuts the title).
39
- 4. Crop and save:
25
+ 0. **Pick a style**: choose 1 of 8 styles from `references/cover-styles.md` by topic → check the example image to confirm the visual language.
26
+ 1. **Refine the title**: lock the title copy first (usually ≤ 10 chars) using that style's title rules; rewrite until it lands — no drawing yet.
27
+ 2. **Composition brief**: one-sentence brief (theme / audience / mood / visual metaphor / palette direction) before composing the prompt.
28
+ 3. Input: article title + 3 theme keywords + platform (x / wechat / both, default both).
29
+ 4. Generate with the agent's image-generation capability (landscape 16:9, 8% margin on all sides).
30
+ 5. **Impact self-check** (required): pass every item in the [impact self-check list](./SKILL.md#冲击力自检清单); on failure, tweak the prompt and regenerate, max 3 attempts.
31
+ 6. Crop and save:
40
32
 
41
33
  ```bash
42
34
  python3 scripts/crop-cover.py <main-image> --out-dir <package>/images/
43
35
  # produces 00-封面.png (1200×675) + 00-封面-公众号.png (900×383, center crop)
44
36
  ```
45
37
 
46
- ## Style library & examples
47
-
48
- - **Style library** `references/cover-styles.md`: 8 styles (viral dry-goods / giant-type manifesto / brand launch / tutorial steps / fun IP / news flash / minimalist / editorial magazine), each with use cases, hex palettes, font suggestions, Chinese+English prompt recipes, and pitfalls.
49
- - **Example images** [assets/examples/](./assets/examples/): 17 (8 styles × 1200×675 master + 900×383 WeChat center-crop + `overview.png` 8-grid overview, ~7.5MB), shipped with the package, free to reuse or adapt (manifest + safe-zone notes + reuse terms in [assets/examples/README.md](./assets/examples/README.md)).
50
- - **Safe-zone rule**: title text and key subject must stay inside the central vertical 60% safe zone (keep the top/bottom 13%+ free of title text), or the WeChat center crop will cut the title.
51
-
52
38
  ## Sizes
53
39
 
54
40
  | Platform | Size | Aspect |
@@ -58,7 +44,7 @@ python3 scripts/crop-cover.py <main-image> --out-dir <package>/images/
58
44
 
59
45
  ## Design rules
60
46
 
61
- One image, one theme; subject fills 40%+ of the frame; big title ≤ 10 chars, high contrast; avoid clutter, tiny dense text, and competing subjects.
47
+ One image, one theme; subject fills 40%+ of the frame; big title ≤ 10 chars, high contrast; avoid clutter, tiny dense text, and competing subjects. **Safe-zone rule**: title text and key subject must stay inside the central vertical 60% safe zone.
62
48
 
63
49
  ## Development
64
50
 
@@ -4,22 +4,15 @@
4
4
 
5
5
  为 X 长文和公众号文章生成封面图的可复用技能。目标:**震撼、醒目、主题突出**。
6
6
 
7
+ - 版本:**v0.1.0**(与 `@topmindspace/tms-skills@0.3.6` 同 tag)
8
+
7
9
  ## 风格样张
8
10
 
9
11
  <p align="center">
10
12
  <img src="https://github.com/topmindspace/tms-skills/raw/main/topmind-cover/assets/examples/overview.png" alt="topmind-cover · 8 封面风格总览" width="960" />
11
13
  </p>
12
14
 
13
- | 风格 | 适用场景 |
14
- |------|----------|
15
- | 爆款干货 `gan-huo` | 干货清单、评测、盘点、实测筛选;"我替你试完了/筛完了"类第一人称实测文默认选它 |
16
- | 巨字宣言 `big-type` | 观点评论、深度长文、产品/版本发布宣言;"一句话立场"类文章默认选它 |
17
- | 品牌发布 `brand-launch` | 产品发布、版本更新、官方最佳实践/白皮书;有明确品牌主体的内容首选 |
18
- | 教程步骤 `tutorial-steps` | 教程、上手指南、分步实操、保姆级攻略 |
19
- | IP 趣味 `ip-fun` | 实战案例、数据战报、复盘、系列连载(上/下篇) |
20
- | 资讯快报 `news-flash` | 资讯、快讯、热点解读、人物专访预告、"祛魅/揭秘"类选题 |
21
- | 极简留白 `minimal` | 随笔、书评、轻观点、生活感悟;公众号"轻阅读"类文章 |
22
- | 杂志编辑 `magazine` | 深度访谈、人物特写、商业分析、年度盘点;需要"质感/信任感"时用它 |
15
+ 8 种风格(爆款干货 / 巨字宣言 / 品牌发布 / 教程步骤 / IP 趣味 / 资讯快报 / 极简留白 / 杂志编辑):适用场景、配色故事、抽象设计原则、中英 prompt 配方见 [`references/cover-styles.md`](./references/cover-styles.md);单风格大图在 [`assets/examples/`](./assets/examples/)。
23
16
 
24
17
  ## 安装
25
18
 
@@ -29,26 +22,19 @@ npx @topmindspace/tms-skills install topmind-cover
29
22
 
30
23
  ## 用法
31
24
 
32
- 0. **选风格(三步,必做)**:按题材从 `references/cover-styles.md` 选 1 种风格(8 选 1)
33
- → 看 `assets/examples/<风格>.png` 示例图,确认视觉语言符合预期
34
- → 按该风格的 prompt 配方组 prompt(把 `{TITLE}` 换成实际标题)。
35
- 1. 输入文章标题 + 3 个主题关键词 + 平台(x / wechat / both,默认 both)。
36
- 2. 用 agent 的图片生成能力出图(横构图 16:9,四周留白 8%)。
37
- 3. 肉眼检查(必做):标题字逐字正确、主体完整、一眼能说出主题;标题字与关键主体
38
- 落在中央垂直 60% 安全区内(900×383 中央裁剪不切字)。
39
- 4. 裁剪落盘:
25
+ 0. **选风格**:按题材从 `references/cover-styles.md` 选 1 种(8 选 1)→ 看示例图确认视觉语言。
26
+ 1. **标题提炼**:先定标题文案(一般 ≤10 字),用该风格章节的标题写法规范;不满意重写,不先画图。
27
+ 2. **构图简报**:一句话 brief(主题/受众/情绪/视觉隐喻/配色方向),组 prompt 前先写。
28
+ 3. 输入文章标题 + 3 个主题关键词 + 平台(x / wechat / both,默认 both)。
29
+ 4. 用 agent 的图片生成能力出图(横构图 16:9,四周留白 8%)。
30
+ 5. **冲击力自检**(必做):按 [SKILL.md 冲击力自检清单](./SKILL.md#冲击力自检清单) 逐项过;不通过→调 prompt 重生成,最多 3 次。
31
+ 6. 裁剪落盘:
40
32
 
41
33
  ```bash
42
34
  python3 scripts/crop-cover.py <主图> --out-dir <包>/images/
43
35
  # 产出 00-封面.png (1200×675) + 00-封面-公众号.png (900×383,中央裁剪)
44
36
  ```
45
37
 
46
- ## 风格库与示例图
47
-
48
- - **风格库** `references/cover-styles.md`:8 种风格(爆款干货 / 巨字宣言 / 品牌发布 / 教程步骤 / IP 趣味 / 资讯快报 / 极简留白 / 杂志编辑),每种含适用场景、配色 hex、字体建议、中英 prompt 配方、避坑。
49
- - **示例图** [assets/examples/](./assets/examples/):17 张(8 风格 × 1200×675 主图 + 900×383 公众号中央裁剪版 + `overview.png` 8 宫格总览,约 7.5MB),随包发布,可直接拿去用/改(清单 + 安全区说明 + 复用声明见 [assets/examples/README.md](./assets/examples/README.md))。
50
- - **安全区铁律**:标题字与关键主体必须落在画面中央垂直 60% 安全区内(上下各预留 13%+ 不放标题字),否则公众号中央裁剪会切掉标题。
51
-
52
38
  ## 尺寸
53
39
 
54
40
  | 平台 | 尺寸 | 比例 |
@@ -58,7 +44,7 @@ python3 scripts/crop-cover.py <主图> --out-dir <包>/images/
58
44
 
59
45
  ## 设计铁律
60
46
 
61
- 一图一主题;主体占画面 40%+;大标题 ≤10 字高对比;忌元素堆砌、小字密排、多主体打架。
47
+ 一图一主题;主体占画面 40%+;大标题 ≤10 字高对比;忌元素堆砌、小字密排、多主体打架。**安全区铁律**:标题字与关键主体必须落在画面中央垂直 60% 安全区内。
62
48
 
63
49
  ## 开发
64
50
 
@@ -1,19 +1,24 @@
1
1
  ---
2
2
  name: topmind-cover
3
3
  version: 0.1.0
4
- description: "文章封面配图生成:X 长文与公众号共用。震撼、醒目、主题突出;平台尺寸规范、风格模板、命名落盘、成图检查全流程覆盖。Use when 封面、封面图、头图、配图、cover。Do NOT use for 正文插图、PPT/报告封面。"
4
+ description: "文章封面配图生成:X 长文与公众号共用。震撼、醒目、主题突出;平台尺寸规范、风格模板、命名落盘、成图检查全流程覆盖。Use when 文章封面、封面图、头图、题图、cover。Do NOT use for 正文插图、PPT/报告封面。"
5
5
  action_category: write
6
6
  triggers:
7
7
  - 封面
8
8
  - 封面图
9
9
  - 头图
10
+ - 题图
11
+ - 首图
10
12
  - 配图
11
13
  - 缩略图
14
+ - banner
12
15
  - cover
13
16
  - thumbnail
14
17
  triggers_cn:
15
18
  - 公众号封面
19
+ - 公众号题图
16
20
  - X 封面
21
+ - X 首图
17
22
  - 文章封面
18
23
  author: TopMindspace
19
24
  license: MIT
@@ -23,30 +28,30 @@ updated: 2026-09-29
23
28
 
24
29
  # topmind-cover · 封面配图生成
25
30
 
26
- 为 X 长文和公众号文章生成封面图的可复用技能。目标:**震撼、醒目、主题突出**。
31
+ 为 X 长文和公众号文章生成封面图。目标:**震撼、醒目、主题突出**。
27
32
 
28
33
  ```
29
- 标题/主题 → 风格模板 → 生成 → 检查 → 裁剪双尺寸 → 落盘命名
34
+ 标题提炼 → 构图简报 → 风格模板 → 生成 → 冲击力自检 → 裁剪双尺寸 → 落盘命名
30
35
  ```
31
36
 
32
- ## 风格样张
37
+ ## 风格索引
33
38
 
34
- <p align="center">
35
- <img src="https://github.com/topmindspace/tms-skills/raw/main/topmind-cover/assets/examples/overview.png" alt="topmind-cover · 8 封面风格总览" width="960" />
36
- </p>
39
+ 风格总览图见 `assets/examples/overview.png`(8 宫格,离线可看)。
37
40
 
38
- | 风格 | 适用场景 |
41
+ | 风格 | 首选题材 |
39
42
  |------|----------|
40
- | 爆款干货 `gan-huo` | 干货清单、评测、盘点、实测筛选;"我替你试完了/筛完了"类第一人称实测文默认选它 |
41
- | 巨字宣言 `big-type` | 观点评论、深度长文、产品/版本发布宣言;"一句话立场"类文章默认选它 |
42
- | 品牌发布 `brand-launch` | 产品发布、版本更新、官方最佳实践/白皮书;有明确品牌主体的内容首选 |
43
- | 教程步骤 `tutorial-steps` | 教程、上手指南、分步实操、保姆级攻略 |
44
- | IP 趣味 `ip-fun` | 实战案例、数据战报、复盘、系列连载(上/下篇) |
45
- | 资讯快报 `news-flash` | 资讯、快讯、热点解读、人物专访预告、"祛魅/揭秘"类选题 |
46
- | 极简留白 `minimal` | 随笔、书评、轻观点、生活感悟;公众号"轻阅读"类文章 |
47
- | 杂志编辑 `magazine` | 深度访谈、人物特写、商业分析、年度盘点;需要"质感/信任感"时用它 |
43
+ | 爆款干货 `gan-huo` | 干货清单、评测、盘点、实测筛选 |
44
+ | 巨字宣言 `big-type` | 观点评论、深度长文、发布宣言 |
45
+ | 品牌发布 `brand-launch` | 产品发布、版本更新、官方白皮书 |
46
+ | 教程步骤 `tutorial-steps` | 教程、上手指南、分步实操 |
47
+ | IP 趣味 `ip-fun` | 实战案例、数据战报、复盘、连载 |
48
+ | 资讯快报 `news-flash` | 资讯快讯、热点解读、揭秘类选题 |
49
+ | 极简留白 `minimal` | 随笔、书评、轻观点 |
50
+ | 杂志编辑 `magazine` | 深度访谈、人物特写、商业分析 |
48
51
 
49
- 单风格大图:`assets/examples/<style>.png`;配方:`references/cover-styles.md`。
52
+ 适用场景细则、配色故事、prompt 配方见 `references/cover-styles.md`;单风格大图 `assets/examples/<style>.png`。
53
+
54
+ > 示例图为原创演示:只学设计原则,不临摹第三方版式(详见 `references/cover-styles.md` 顶部"原创铁律")。
50
55
 
51
56
  ## 尺寸表
52
57
 
@@ -59,29 +64,36 @@ updated: 2026-09-29
59
64
 
60
65
  ## 工作流
61
66
 
62
- 0. **选风格(三步,必做)**:
63
- ① 按题材从 `references/cover-styles.md` 选 1 种风格(8 选 1);
64
- ② 看 `assets/examples/<style>.png` 示例图,确认视觉语言符合预期;
65
- ③ 按该风格的 prompt 配方组 prompt(把 `{TITLE}` 换成实际标题)。
66
- 示例清单见 `assets/examples/README.md`。
67
- 1. **输入**:文章标题、3 个主题关键词、平台(`x` / `wechat` / `both`,默认 both)、
68
- 风格(默认按题材自动选,见 `references/cover-styles.md`)。
69
- 平台只影响生成 prompt 的侧重;裁剪落盘永远产出双尺寸。
70
- 2. **组 prompt**:按 `references/cover-styles.md` 对应风格的配方组装
71
- (标题 ≤10 字逐字写明,防 AI 自造错别字)。
72
- 3. **生成**:`media.generate_image`,`name` 用 `<slug>-cover`。
73
- 4. **检查**(必做,肉眼看一遍):
74
- - 标题字逐字正确,无错别字、无多字少字
75
- - 主体完整不被裁切,画面不杂乱
76
- - 一眼能说出主题;说不出就重生成
77
- - 900×383 版复查:标题字、关键主体不被中央裁剪裁掉(见风格库"安全区铁律")
78
- 5. **裁剪落盘**:
67
+ 0. **选风格(三步,必做)**:① 按题材从 `references/cover-styles.md` 选 1 种(8 选 1)→ ② 看 `assets/examples/<style>.png` 确认视觉语言 → ③ 看该风格章节的标题写法规范,心里有标题雏形。
68
+ 1. **标题提炼**(先定文案,不画图):用所选风格在 `cover-styles.md` 对应章节的标题写法规范提炼标题(一般 ≤10 字);不满意就重写,满意再进下一步。
69
+ - 坏:"关于 Manus 2.0 的一些思考与体验"(长、没钩子)→ 好:"Manus 2.0 实测"(短、有断言)
70
+ 2. **构图简报**(一句话 brief,组 prompt 前先写):主题 + 受众 + 情绪 + 视觉隐喻 + 配色方向。
71
+ - 例:"给 AI 从业者看的 Manus 2.0 实测封面,情绪'震撼但可信',视觉隐喻是破壳而出的机械手,深空黑底 + 电光蓝强调。"
72
+ 3. **输入与组 prompt**:用步骤 1 定下的标题 + 3 个主题关键词 + 平台(`x` / `wechat` / `both`,默认 both;平台只影响 prompt 侧重,裁剪落盘永远产出双尺寸)。按风格配方组装 prompt,标题逐字写明(防 AI 自造错别字)。
73
+ 4. **生成**:`media.generate_image`,`name` 用 `<slug>-cover`。
74
+ 5. **冲击力自检**(必做):必过下方"冲击力自检清单" 8 项;不通过→调整 prompt 重生成,最多 3 次;3 次仍不过→换一种风格,或回步骤 1 重写标题。
75
+ 6. **裁剪落盘**:
79
76
  ```bash
80
77
  python3 scripts/crop-cover.py <主图> --out-dir <包>/images/
81
78
  ```
82
79
  产出 `00-封面.png`(1200×675,X/公众号共用主文件)与 `00-封面-公众号.png`(900×383)。
83
80
  公众号包规约:正文引用 `images/00-封面.png`,`图片上传清单.md` 登记两版。
84
- 6. **系列感**:同一系列文章固定色系 + 版式语言,prompt 复用同一风格模板。
81
+ 7. **系列感**:同一系列固定色系 + 版式语言,prompt 复用同一风格模板。
82
+
83
+ ## 冲击力自检清单
84
+
85
+ **生成后必过**:不通过→调整 prompt 重生成,最多 3 次;3 次仍不过→换风格或重写标题。
86
+
87
+ | # | 检查项 | 不通过怎么改 |
88
+ |---|--------|--------------|
89
+ | 1 | 3 秒测试:缩到 120px 宽,3 秒内读出标题并说清"这是什么" | 放大标题,删小字 |
90
+ | 2 | 标题字高 ≥ 画面高度 1/4 | 放大标题,其他元素让路 |
91
+ | 3 | 对比果断:字色与底色明度差拉满(拒绝灰底白字式低对比) | 底色走极端(极深或极浅) |
92
+ | 4 | 记忆点:3 秒后能向人描述出一个具体的东西 | 加一个形象/数字/符号/质感记忆点 |
93
+ | 5 | 质感:背景有纹理、光影或描边,拒绝纯色死平 | 背景层加一层纸纹/噪点/光影 |
94
+ | 6 | 标题字逐字正确,无 AI 自造错别字 | 修正标题写法、缩短标题后重生成 |
95
+ | 7 | 标题与关键主体落在中央垂直 60% 安全区(900×383 裁剪不切字) | 把元素收拢进安全区 |
96
+ | 8 | `references/impact-language.md` 20 条原则快速勾选 | 按"保守陷阱清单"逐项纠正 |
85
97
 
86
98
  ## 设计铁律
87
99
 
@@ -92,9 +104,8 @@ updated: 2026-09-29
92
104
 
93
105
  ## 外部依赖 / 规约来源
94
106
 
95
- - "公众号包规约"(正文引用 `images/00-封面.png`、`图片上传清单.md` 登记两版)
96
- 来自用户侧 workbuddy 环境,仓库内无此文件;缺失时仍按固定命名落盘,
97
- 不阻塞核心流程。
107
+ "公众号包规约"(正文引用 `images/00-封面.png`、`图片上传清单.md` 登记两版)来自用户侧
108
+ workbuddy 环境,仓库内无此文件;缺失时仍按固定命名落盘,不阻塞核心流程。
98
109
 
99
110
  ## When NOT to use
100
111
 
@@ -1,37 +1,26 @@
1
1
  # 封面风格示例图
2
2
 
3
- 8 种风格 × 2 种尺寸 = 16 张示例(共约 7.5MB,随 npm 包发布,npx 安装即得),
4
- 另附 `overview.png`(8 宫格总览,2360×854)。
3
+ 8 种风格 × 2 种尺寸 = 16 张示例(随 npm 包发布,npx 安装即得),
4
+ 另附 `overview.png`(8 宫格总览,2260×806)。
5
5
 
6
6
  - `<style>.png`(1200×675,X 长文封面 / 公众号共用主尺寸)
7
- - `<style>-wechat.png`(900×383,公众号封面大图,`scripts/crop-cover.py` 中央裁剪版)
7
+ - `<style>-wechat.png`(900×383,公众号封面大图,中央裁剪版)
8
8
  - `overview.png`(8 宫格总览:2 行 × 4 列缩略图 + 风格名标注,选风格时先看它)
9
9
 
10
- | 文件 | 风格 | 适用场景(一句话) |
11
- |------|------|--------------------|
12
- | `gan-huo.png` / `gan-huo-wechat.png` | 爆款干货 | 干货清单、评测、盘点、实测筛选;"我替你试完了/筛完了"类第一人称实测文默认选它 |
13
- | `big-type.png` / `big-type-wechat.png` | 巨字宣言 | 观点评论、深度长文、产品/版本发布宣言;"一句话立场"类文章默认选它 |
14
- | `brand-launch.png` / `brand-launch-wechat.png` | 品牌发布 | 产品发布、版本更新、官方最佳实践/白皮书;有明确品牌主体的内容首选 |
15
- | `tutorial-steps.png` / `tutorial-steps-wechat.png` | 教程步骤 | 教程、上手指南、分步实操、保姆级攻略 |
16
- | `ip-fun.png` / `ip-fun-wechat.png` | IP 趣味 | 实战案例、数据战报、复盘、系列连载(上/下篇) |
17
- | `news-flash.png` / `news-flash-wechat.png` | 资讯快报 | 资讯、快讯、热点解读、人物专访预告、"祛魅/揭秘"类选题 |
18
- | `minimal.png` / `minimal-wechat.png` | 极简留白 | 随笔、书评、轻观点、生活感悟;公众号"轻阅读"类文章 |
19
- | `magazine.png` / `magazine-wechat.png` | 杂志编辑 | 深度访谈、人物特写、商业分析、年度盘点;需要"质感/信任感"时用它 |
10
+ 8 种风格(爆款干货 `gan-huo` / 巨字宣言 `big-type` / 品牌发布 `brand-launch` / 教程步骤
11
+ `tutorial-steps` / IP 趣味 `ip-fun` / 资讯快报 `news-flash` / 极简留白 `minimal` /
12
+ 杂志编辑 `magazine`):适用场景索引与配方见 `../references/cover-styles.md`。
20
13
 
21
- 详细配方(配色 hex / 字体 / 中英 prompt / 避坑)见 `../references/cover-styles.md`。
14
+ ## 原创与虚构声明(重要)
22
15
 
23
- ## 安全区说明(重要)
24
-
25
- 所有示例的标题字与关键元素都落在**中央垂直 60% 安全区**(画面垂直 20%~80%)内——
26
- 这正是 `900×383` 中央裁剪版(保留画面垂直 21.6%~78.4%)标题不被裁掉的原因。
27
- 自己组 prompt 时务必遵守:标题/关键主体不得超出上下各 13% 的禁区,否则公众号版会被切掉。
28
- 反例:胶囊标签条/副标题横条压在底部 85% 以下时,`-wechat.png` 里会只剩半截或完全消失
29
- (本轮重制时 gan-huo / big-type / brand-launch / tutorial-steps 均因此返工过)。
16
+ 本目录 16 张示例图均为**原创设计**(只演示抽象设计原则,不临摹任何第三方封面的
17
+ 版式与配色;复用本库设计时亦不得与第三方封面构成实质相似——只学原则,不学版式)。
18
+ 图中标题文案、数字、品牌名、署名均为**虚构演示内容**(如"破晓 6.0"、
19
+ "@老周带单")——直接复用前请换成自己的真实标题;凡封面上的数字必须在正文中有
20
+ 出处,严禁编造数据。
30
21
 
31
22
  ## 复用声明
32
23
 
33
- **示例图可直接拿去用/改,作封面底图或风格参考。**
34
- 拿去用时建议按 `scripts/crop-cover.py` 的流程重新裁剪双尺寸并按包规约命名落盘;
35
- 改图时保留原风格的配色与版式语言,只换主体与标题字,以维持系列感。
36
- 注意:示例标题均为虚构演示文案(如"星火最佳实践""100天"),直接复用前请换成自己的真实标题;
37
- 凡封面上的数字必须在正文中有出处,严禁编造数据。
24
+ **示例图可直接拿去用/改,作封面底图或风格参考。**拿去用时按 `scripts/crop-cover.py`
25
+ 的流程重新裁剪双尺寸并按包规约命名落盘;改图时保留原风格的配色与版式语言,
26
+ 只换主体与标题字,以维持系列感。