@topmindspace/tms-skills 0.2.0 → 0.3.0
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.
- package/CHANGELOG.md +33 -0
- package/README.en.md +47 -12
- package/README.md +46 -11
- package/bin/tms-skills.js +35 -5
- package/package.json +1 -1
- package/top-ppt-html/README.en.md +2 -2
- package/top-ppt-html/README.md +3 -3
- package/top-ppt-html/SKILL.md +4 -5
- package/top-ppt-html/references/modes.md +1 -1
- package/top-ppt-html/scripts/audit_docs.py +24 -0
- package/top-ppt-html/scripts/audit_skill.py +2 -2
- package/top-ppt-html/scripts/build_pptx.js +36 -0
- package/top-ppt-html/scripts/package_skill.py +3 -3
- package/topmind-cover/README.en.md +51 -0
- package/topmind-cover/README.md +17 -6
- package/topmind-cover/SKILL.md +25 -7
- package/topmind-cover/assets/examples/README.md +29 -0
- package/topmind-cover/assets/examples/big-poster-wechat.png +0 -0
- package/topmind-cover/assets/examples/big-poster.png +0 -0
- package/topmind-cover/assets/examples/cyber-glitch-wechat.png +0 -0
- package/topmind-cover/assets/examples/cyber-glitch.png +0 -0
- package/topmind-cover/assets/examples/guochao-wechat.png +0 -0
- package/topmind-cover/assets/examples/guochao.png +0 -0
- package/topmind-cover/assets/examples/magazine-wechat.png +0 -0
- package/topmind-cover/assets/examples/magazine.png +0 -0
- package/topmind-cover/assets/examples/minimal-wechat.png +0 -0
- package/topmind-cover/assets/examples/minimal.png +0 -0
- package/topmind-cover/assets/examples/tech-future-wechat.png +0 -0
- package/topmind-cover/assets/examples/tech-future.png +0 -0
- package/topmind-cover/references/cover-styles.md +174 -21
- package/topmind-cover/scripts/audit_docs.py +22 -0
- package/topmind-cover/scripts/crop-cover.py +1 -2
- package/topmind-wechat-post/README.en.md +63 -0
- package/topmind-wechat-post/README.md +16 -0
- package/topmind-wechat-post/SKILL.md +22 -13
- package/topmind-wechat-post/references/typography-rules.md +1 -1
- package/topmind-wechat-post/references/writing-quality.md +2 -2
- package/topmind-wechat-post/scripts/audit_docs.py +22 -0
- package/topmind-x-article/README.en.md +46 -0
- package/topmind-x-article/README.md +13 -2
- package/topmind-x-article/SKILL.md +13 -4
- package/topmind-x-article/scripts/audit_docs.py +22 -0
- package/topmind-x-article/scripts/md2x.py +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
## [0.3.0] - 2026-09-29
|
|
2
|
+
|
|
3
|
+
> 根包 0.2.0 → **0.3.0**(minor,新功能);4 个技能 `version` 保持不动(top-ppt-html 0.1.19,其余 0.1.0)。
|
|
4
|
+
> 整仓同 tag 发版,技能 `version` 独立演进(见 docs/PUBLISHING.md)。
|
|
5
|
+
|
|
6
|
+
### topmind-cover:封面风格库 + 12 张示例图(新功能)
|
|
7
|
+
|
|
8
|
+
- `references/cover-styles.md` 扩为 **6 种风格库**:震撼大字报(`big-poster`)/ 科技未来感(`tech-future`)/
|
|
9
|
+
杂志编辑风(`magazine`)/ 极简留白(`minimal`)/ 国潮插画(`guochao`)/ 赛博故障艺术(`cyber-glitch`),
|
|
10
|
+
每种含适用场景、配色 hex、字体建议、中英 prompt 配方、避坑。
|
|
11
|
+
- `assets/examples/` 新增 **12 张示例图**(6 风格 × 1200×675 主图 + 900×383 公众号中央裁剪版,共约 6.4MB),
|
|
12
|
+
附 `assets/examples/README.md`(清单 + 安全区说明 + 复用声明),随 npm 包发布。
|
|
13
|
+
- SKILL.md 工作流新增"**步骤 0 选风格**"(三步必做:按题材 6 选 1 → 看示例图 → 按配方组 prompt)。
|
|
14
|
+
- 标题**中央垂直 60% 安全区**上升为设计铁律(风格库新增"安全区铁律"章节):标题字与关键主体
|
|
15
|
+
上下各预留 13%+,否则 900×383 中央裁剪会切掉标题。
|
|
16
|
+
|
|
17
|
+
### 最佳实践整改
|
|
18
|
+
|
|
19
|
+
- top-ppt-html / topmind-wechat-post 的 SKILL.md `description` 改**第三人称**(降误触发);
|
|
20
|
+
topmind-cover `description` 同步微调("一次配齐"→"全流程覆盖"),`triggers` 新增 `缩略图` / `thumbnail`。
|
|
21
|
+
- topmind-wechat-post:站外取源坑与回推命令串收敛到 `references/workflow.md`,SKILL.md 只留索引;
|
|
22
|
+
新增跨技能路由索引(封面配图 → topmind-cover,X 长文 → topmind-x-article);
|
|
23
|
+
二级标题序号由排版层自动生成(不再手写)。
|
|
24
|
+
- 各技能 README(中/英)与 SKILL.md 对齐:cover 新增风格库与示例图章节、用法改"步骤 0 选风格";
|
|
25
|
+
x-article 转换规则补"分隔线→空行"。
|
|
26
|
+
|
|
27
|
+
### bug 修复
|
|
28
|
+
|
|
29
|
+
- topmind-x-article `scripts/md2x.py`:`---` / `***` / `___` 分隔线转**空行**(原逻辑误当 frontmatter 吞掉);
|
|
30
|
+
`***粗斜体***` 先去三重星号再处理 `**` / `__` / `*`,不再残留星号。
|
|
31
|
+
- topmind-cover `scripts/crop-cover.py`:移除 `--slug` 悬空参数
|
|
32
|
+
(用法与文档统一:`crop-cover.py <主图> --out-dir <包>/images/`)。
|
|
33
|
+
|
|
1
34
|
## [0.2.0] - 2026-09-29
|
|
2
35
|
|
|
3
36
|
### 新增三个写作/配图技能
|
package/README.en.md
CHANGED
|
@@ -9,17 +9,39 @@
|
|
|
9
9
|
[](https://github.com/topmindspace/tms-skills/actions/workflows/ci.yml)
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
|
|
12
|
-
**TopMindspace agent-skills monorepo** —
|
|
12
|
+
**TopMindspace agent-skills monorepo** — formal business presentations, WeChat articles, X long-form posts, cover art: four skills, one repo.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
### top-ppt-html · Formal business presentations
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Built for **demo reports / formal business decks**: **HTML + PPT dual delivery**. Day-to-day, present with single-file HTML like slides; export **high-fidelity editable PPTX** when needed (charts carry data you can annotate). MD3-inspired: fitting information density, restrained type / shapes / color. Formal business presenting — not decoration.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
```bash
|
|
19
|
+
npx @topmindspace/tms-skills install top-ppt-html
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### topmind-wechat-post · WeChat article authoring
|
|
23
|
+
|
|
24
|
+
Full lifecycle for WeChat articles: delivery package, review & rewrite, three quality gates (facts / logic / de-AI-flavor), WeChat inline typography (images must be embedded), publish checklist and status sync. Python stdlib only — zero dependencies.
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx @topmindspace/tms-skills install topmind-wechat-post
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### topmind-x-article · One-click X long-form publishing
|
|
31
|
+
|
|
32
|
+
Markdown draft → paste-ready plain text (`md2x.py` adapts to the X Article editor: images → `[图N]`, tables → "item: value" lists) + cover art + publish checklist. Publishing is done by hand-pasting; fetch the text back for verification after posting.
|
|
19
33
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
34
|
+
```bash
|
|
35
|
+
npx @topmindspace/tms-skills install topmind-x-article
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### topmind-cover · Cover art generation
|
|
39
|
+
|
|
40
|
+
Shared cover art for X long-form and WeChat: striking, eye-catching, theme-focused. Built-in **6-style cover style library** (bold poster / futuristic tech / editorial magazine / minimalist / guochao illustration / cyber glitch art — each with use cases, hex palettes, font suggestions, Chinese+English prompt recipes) + **12 dual-size example images** (`assets/examples/`, shipped with the package): **pick a style → check the example → compose the prompt from the recipe**, then one-click crop to both platform sizes with `crop-cover.py` (X 1200×675, WeChat 900×383).
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx @topmindspace/tms-skills install topmind-cover
|
|
44
|
+
```
|
|
23
45
|
|
|
24
46
|
> Let ideas fly — make good thinking visible.
|
|
25
47
|
|
|
@@ -27,7 +49,7 @@ Plenty of PPT skills exist — some lean gadgety, some dump consulting density b
|
|
|
27
49
|
<img src="docs/assets/tms-skills-banner.png" alt="tms-skills · top-ppt-html — formal business presentations" width="960" />
|
|
28
50
|
</p>
|
|
29
51
|
|
|
30
|
-
> **Warning**: do not install `@topmindspace/tms-skills@^2` (2.0.0–2.1.1 deprecated). Current line is **0.
|
|
52
|
+
> **Warning**: do not install `@topmindspace/tms-skills@^2` (2.0.0–2.1.1 deprecated). Current line is **0.2.x** (`latest`).
|
|
31
53
|
|
|
32
54
|
## Craft at a glance
|
|
33
55
|
|
|
@@ -70,7 +92,7 @@ Plenty of PPT skills exist — some lean gadgety, some dump consulting density b
|
|
|
70
92
|
| Fullscreen | **F** | Immersive present mode |
|
|
71
93
|
| Collapse toolbar | **B** | Mini bar (brand + expand); remembers per file |
|
|
72
94
|
|
|
73
|
-
See [top-ppt-html/README.md](./top-ppt-html/README.md) and [SKILL.md](./top-ppt-html/SKILL.md).
|
|
95
|
+
See [top-ppt-html/README.md](./top-ppt-html/README.md#html-header-toolbar) and [SKILL.md](./top-ppt-html/SKILL.md).
|
|
74
96
|
|
|
75
97
|
## Skills
|
|
76
98
|
|
|
@@ -79,9 +101,22 @@ See [top-ppt-html/README.md](./top-ppt-html/README.md) and [SKILL.md](./top-ppt-
|
|
|
79
101
|
| [`top-ppt-html`](./top-ppt-html/) | **0.1.19** | Formal business decks: paginated HTML + editable 16:9 PPTX; dual delivery · MD3-inspired density; 3 modes × 9 styles; strict 0/0 |
|
|
80
102
|
| [`topmind-wechat-post`](./topmind-wechat-post/) | **0.1.0** | WeChat article lifecycle: package, review, 3 quality gates, inline typography & publish checklist |
|
|
81
103
|
| [`topmind-x-article`](./topmind-x-article/) | **0.1.0** | X long-form one-click publish: Markdown → paste-ready plain text + cover + checklist |
|
|
82
|
-
| [`topmind-cover`](./topmind-cover/) | **0.1.0** | Cover art for X / WeChat: striking, theme-focused;
|
|
104
|
+
| [`topmind-cover`](./topmind-cover/) | **0.1.0** | Cover art for X / WeChat: striking, theme-focused; 6-style cover style library + 12 dual-size example images, size specs + crop tooling |
|
|
105
|
+
|
|
106
|
+
Installer [`@topmindspace/tms-skills`](https://www.npmjs.com/package/@topmindspace/tms-skills) is **0.3.0** (whole-repo same-tag releases).
|
|
107
|
+
|
|
108
|
+
### topmind-cover · Cover style library
|
|
109
|
+
|
|
110
|
+
| Style | In one line | Typical topics |
|
|
111
|
+
|-------|-------------|----------------|
|
|
112
|
+
| Bold poster `big-poster` | One-sentence stance, maximum impact | Opinion pieces, hot takes |
|
|
113
|
+
| Futuristic tech `tech-future` | Neon blue / electric violet on deep navy | AI / LLMs / agents |
|
|
114
|
+
| Editorial magazine `magazine` | Restrained, premium, trustworthy | In-depth interviews, profiles |
|
|
115
|
+
| Minimalist `minimal` | Vast negative space, room to breathe | Essays, book reviews, light takes |
|
|
116
|
+
| Guochao illustration `guochao` | Vermilion / dark teal / gold, cultural punch | Trad culture, festivals, heritage |
|
|
117
|
+
| Cyber glitch art `cyber-glitch` | RGB channel-split, digital-decay aesthetic | Net culture, cyberpunk |
|
|
83
118
|
|
|
84
|
-
|
|
119
|
+
**Three steps to a cover**: ① pick 1 of 6 styles by topic → ② check the matching example in [`topmind-cover/assets/examples/`](./topmind-cover/assets/examples/) → ③ compose the prompt from that style's recipe in [`references/cover-styles.md`](./topmind-cover/references/cover-styles.md). 12 example images (6 styles × 1200×675 master + 900×383 WeChat center-crop, ~6.4MB) ship with the npm package; **safe-zone rule**: title text and key subject must stay inside the central vertical 60% safe zone.
|
|
85
120
|
|
|
86
121
|
## Install
|
|
87
122
|
|
|
@@ -91,7 +126,7 @@ Installer [`@topmindspace/tms-skills`](https://www.npmjs.com/package/@topmindspa
|
|
|
91
126
|
npx @topmindspace/tms-skills list
|
|
92
127
|
npx @topmindspace/tms-skills install top-ppt-html
|
|
93
128
|
npx @topmindspace/tms-skills install top-ppt-html --to ./.claude/skills
|
|
94
|
-
npx @topmindspace/tms-skills@0.
|
|
129
|
+
npx @topmindspace/tms-skills@0.3.0 install top-ppt-html # pin
|
|
95
130
|
```
|
|
96
131
|
|
|
97
132
|
```bash
|
package/README.md
CHANGED
|
@@ -7,17 +7,39 @@
|
|
|
7
7
|
[](https://github.com/topmindspace/tms-skills/actions/workflows/ci.yml)
|
|
8
8
|
[](LICENSE)
|
|
9
9
|
|
|
10
|
-
**TopMindspace 智能体技能 monorepo**
|
|
10
|
+
**TopMindspace 智能体技能 monorepo** —— 演示报告、公众号文章、X 长文、封面配图:四个技能,一个仓库。
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
### top-ppt-html · 正式商务演示
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
为**演示报告 / 正式商务演示**而生:**HTML + PPT 双交付**。日常用单文件 HTML 等同幻灯片演示;需要时再导出**高保真可编辑 PPTX**(图表带数据、可标注)。参考 MD3:合适的信息密度、克制的文字 / 图形 / 形状 / 颜色。主场是正式商务演示,不是 gadget。
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
```bash
|
|
17
|
+
npx @topmindspace/tms-skills install top-ppt-html
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### topmind-wechat-post · 公众号创作
|
|
21
|
+
|
|
22
|
+
公众号文章全生命周期:交付包、审校改写、质量三关(事实 / 逻辑 / 去 AI 味)、微信内联排版(图片必内嵌)、发布清单与状态同步。脚本纯 Python 标准库,零依赖。
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @topmindspace/tms-skills install topmind-wechat-post
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### topmind-x-article · X 长文一键发布
|
|
29
|
+
|
|
30
|
+
Markdown 原稿 → 可直接粘贴的纯文本(`md2x.py` 按 X Article 编辑器支持转制:图片→`[图N]`、表格→"项:值"列表)+ 封面图 + 发布清单。发布走人工粘贴,发布后抓回核对。
|
|
17
31
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
32
|
+
```bash
|
|
33
|
+
npx @topmindspace/tms-skills install topmind-x-article
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### topmind-cover · 封面配图生成
|
|
37
|
+
|
|
38
|
+
X 长文与公众号共用的封面图:震撼、醒目、主题突出。内置 **6 种封面风格库**(震撼大字报 / 科技未来感 / 杂志编辑风 / 极简留白 / 国潮插画 / 赛博故障艺术,含适用场景、配色 hex、字体建议、中英 prompt 配方)+ **12 张双尺寸示例图**(`assets/examples/`,随包发布):**选风格 → 看示例 → 按配方组 prompt** 三步出图,`crop-cover.py` 一键裁出双平台尺寸(X 1200×675、公众号 900×383)。
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx @topmindspace/tms-skills install topmind-cover
|
|
42
|
+
```
|
|
21
43
|
|
|
22
44
|
> 让 idea 飞,好想法被看见。
|
|
23
45
|
|
|
@@ -25,7 +47,7 @@
|
|
|
25
47
|
<img src="docs/assets/tms-skills-banner.png" alt="tms-skills · top-ppt-html — formal business presentations" width="960" />
|
|
26
48
|
</p>
|
|
27
49
|
|
|
28
|
-
> **警告**:不要安装 `@topmindspace/tms-skills@^2`(2.0.0–2.1.1 已弃用)。当前线 **0.
|
|
50
|
+
> **警告**:不要安装 `@topmindspace/tms-skills@^2`(2.0.0–2.1.1 已弃用)。当前线 **0.2.x**(`latest`)。
|
|
29
51
|
|
|
30
52
|
## 一眼看到工艺
|
|
31
53
|
|
|
@@ -77,9 +99,22 @@
|
|
|
77
99
|
| [`top-ppt-html`](./top-ppt-html/) | **0.1.19** | 正式商务演示:HTML 可翻页 + 16:9 可编辑 PPTX;双交付 · MD3 密度克制;三模式 × 九风格;strict 0/0 |
|
|
78
100
|
| [`topmind-wechat-post`](./topmind-wechat-post/) | **0.1.0** | 公众号文章全生命周期:交付包、审校改写、质量三关、微信内联排版与发布清单 |
|
|
79
101
|
| [`topmind-x-article`](./topmind-x-article/) | **0.1.0** | X 长文一键发布:Markdown 原稿转可直接粘贴的纯文本 + 封面图 + 发布清单 |
|
|
80
|
-
| [`topmind-cover`](./topmind-cover/) | **0.1.0** | 文章封面配图(X /
|
|
102
|
+
| [`topmind-cover`](./topmind-cover/) | **0.1.0** | 文章封面配图(X / 公众号共用):震撼醒目主题突出;6 风格封面风格库 + 12 张双尺寸示例图,尺寸规范 + 裁剪落盘 |
|
|
103
|
+
|
|
104
|
+
安装器 [`@topmindspace/tms-skills`](https://www.npmjs.com/package/@topmindspace/tms-skills) 为 **0.3.0**(整仓同 tag 发版)。
|
|
105
|
+
|
|
106
|
+
### topmind-cover · 封面风格库
|
|
107
|
+
|
|
108
|
+
| 风格 | 一句话 | 典型题材 |
|
|
109
|
+
|------|--------|----------|
|
|
110
|
+
| 震撼大字报 `big-poster` | 一句话立场,冲击力拉满 | 观点评论、热点快评 |
|
|
111
|
+
| 科技未来感 `tech-future` | 霓虹蓝/电光紫,深空藏青底 | AI / 大模型 / 智能体 |
|
|
112
|
+
| 杂志编辑风 `magazine` | 克制高级,质感与信任感 | 深度访谈、人物特写 |
|
|
113
|
+
| 极简留白 `minimal` | 大面积留白,给版面呼吸感 | 随笔、书评、轻观点 |
|
|
114
|
+
| 国潮插画 `guochao` | 朱红/黛青/鎏金,文化感 | 传统文化、节气、非遗 |
|
|
115
|
+
| 赛博故障艺术 `cyber-glitch` | RGB 错位,数字 decay 美学 | 网络文化、赛博朋克 |
|
|
81
116
|
|
|
82
|
-
|
|
117
|
+
**三步出图**:① 按题材从 6 风格选 1 → ② 看 [`topmind-cover/assets/examples/`](./topmind-cover/assets/examples/) 对应示例图 → ③ 按 [`references/cover-styles.md`](./topmind-cover/references/cover-styles.md) 该风格的 prompt 配方组 prompt。12 张示例图(6 风格 × 1200×675 主图 + 900×383 公众号中央裁剪版,约 6.4MB)随 npm 包发布;**安全区铁律**:标题字与关键主体必须落在画面中央垂直 60% 安全区内。
|
|
83
118
|
|
|
84
119
|
## 安装
|
|
85
120
|
|
|
@@ -89,7 +124,7 @@
|
|
|
89
124
|
npx @topmindspace/tms-skills list
|
|
90
125
|
npx @topmindspace/tms-skills install top-ppt-html
|
|
91
126
|
npx @topmindspace/tms-skills install top-ppt-html --to ./.claude/skills
|
|
92
|
-
npx @topmindspace/tms-skills@0.
|
|
127
|
+
npx @topmindspace/tms-skills@0.3.0 install top-ppt-html # 钉版本
|
|
93
128
|
```
|
|
94
129
|
|
|
95
130
|
```bash
|
package/bin/tms-skills.js
CHANGED
|
@@ -101,10 +101,37 @@ function copyDir(src, dest) {
|
|
|
101
101
|
} else if (entry.isFile()) {
|
|
102
102
|
if (entry.name.endsWith('.pyc')) continue;
|
|
103
103
|
fs.copyFileSync(s, d);
|
|
104
|
+
} else {
|
|
105
|
+
console.warn(`warning: skipping non-regular file: ${s}`);
|
|
104
106
|
}
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
|
|
110
|
+
function normPath(p) {
|
|
111
|
+
const s = path.resolve(p);
|
|
112
|
+
return process.platform === 'win32' ? s.toLowerCase() : s;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** 安装目标守卫(审计 严重-2):
|
|
116
|
+
* dest == 技能源目录 → --force 会先 rmSync 删掉源目录,再"成功"装出空目录(数据丢失 + 虚假成功);
|
|
117
|
+
* dest 在源目录内部 → copyDir 无限递归复制直至 ENAMETOOLONG,并留下垃圾目录树。
|
|
118
|
+
* path.resolve 归一化后比对(dest === src,或 dest 以 src + 路径分隔符开头),
|
|
119
|
+
* Windows 下额外做大小写归一。无论是否 --force,一律拒绝。
|
|
120
|
+
*/
|
|
121
|
+
function assertDestOutsideSource(src, dest) {
|
|
122
|
+
const absSrc = normPath(src);
|
|
123
|
+
const absDest = normPath(dest);
|
|
124
|
+
if (absDest === absSrc || absDest.startsWith(absSrc + path.sep)) {
|
|
125
|
+
die(
|
|
126
|
+
`Refusing to install into the skill's own directory tree.\n` +
|
|
127
|
+
` skill source: ${absSrc}\n` +
|
|
128
|
+
` destination: ${absDest}\n` +
|
|
129
|
+
`Choose a --to directory outside the skill source ` +
|
|
130
|
+
`(installing into it would delete or recurse into the source).`
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
108
135
|
function install(skillId, targetRoot, { force = false } = {}) {
|
|
109
136
|
assertSkillId(skillId);
|
|
110
137
|
const src = skillDir(skillId);
|
|
@@ -112,6 +139,7 @@ function install(skillId, targetRoot, { force = false } = {}) {
|
|
|
112
139
|
die(`Skill not found: ${skillId}\nAvailable: ${listSkillIds().join(', ') || '(none)'}`);
|
|
113
140
|
}
|
|
114
141
|
const dest = path.join(targetRoot, skillId);
|
|
142
|
+
assertDestOutsideSource(src, dest);
|
|
115
143
|
fs.mkdirSync(targetRoot, { recursive: true });
|
|
116
144
|
if (fs.existsSync(dest)) {
|
|
117
145
|
if (!force) {
|
|
@@ -126,17 +154,19 @@ function install(skillId, targetRoot, { force = false } = {}) {
|
|
|
126
154
|
console.log(`Installed ${skillId}`);
|
|
127
155
|
console.log(` from ${src}`);
|
|
128
156
|
console.log(` to ${dest}`);
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
157
|
+
if (skillId === 'top-ppt-html') {
|
|
158
|
+
console.log('');
|
|
159
|
+
console.log('Optional (PPTX export only):');
|
|
160
|
+
console.log(` cd "${dest}" && npm install`);
|
|
161
|
+
}
|
|
132
162
|
}
|
|
133
163
|
|
|
134
164
|
function usageText() {
|
|
135
165
|
return `tms-skills — install TopMindspace agent skills
|
|
136
166
|
|
|
137
167
|
Usage:
|
|
138
|
-
tms-skills list
|
|
139
|
-
tms-skills install <skill-id> [--to <dir>] [--force|-f]
|
|
168
|
+
tms-skills list|ls
|
|
169
|
+
tms-skills install <skill-id> [--to|-t <dir>] [--force|-f]
|
|
140
170
|
tms-skills help
|
|
141
171
|
|
|
142
172
|
Examples (npm recommended when published):
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@ Plenty of PPT skills exist. This one is for **formal business presenting**: clea
|
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
20
|
- Skill id: `top-ppt-html`; brand: **TopPPT HTML**
|
|
21
|
-
- Version: **v0.1.19** (same tag as `@topmindspace/tms-skills@0.
|
|
21
|
+
- Version: **v0.1.19** (same tag as `@topmindspace/tms-skills@0.3.0`)
|
|
22
22
|
- **Agent entry**: `SKILL.md` → `references/playbook.md` (L1) → L2 on demand
|
|
23
23
|
- **Human maintainers**: this README (install / commands / layout); do not treat it as the generation spec
|
|
24
24
|
|
|
@@ -73,7 +73,7 @@ Also: arrow-key paging; **Esc** closes modals. After style/theme change, re-run
|
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
75
|
npx @topmindspace/tms-skills install top-ppt-html
|
|
76
|
-
npx @topmindspace/tms-skills@0.
|
|
76
|
+
npx @topmindspace/tms-skills@0.3.0 install top-ppt-html
|
|
77
77
|
npx github:topmindspace/tms-skills install top-ppt-html
|
|
78
78
|
```
|
|
79
79
|
|
package/top-ppt-html/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
20
|
- 技能标识:`top-ppt-html`;品牌名:**TopPPT HTML**
|
|
21
|
-
- 版本:**v0.1.19**(与 `@topmindspace/tms-skills@0.
|
|
21
|
+
- 版本:**v0.1.19**(与 `@topmindspace/tms-skills@0.3.0` 同 tag)
|
|
22
22
|
- **智能体入口**:`SKILL.md` → `references/playbook.md`(L1)→ L2 按需
|
|
23
23
|
- **人类维护者**:本 README(安装 / 命令 / 目录);勿把本文件当生成规范
|
|
24
24
|
|
|
@@ -170,7 +170,7 @@ top-ppt-html/
|
|
|
170
170
|
│ ├─ illustration-layout.md # L2 插画/配图 brief │
|
|
171
171
|
│ └─ …(modes / styles / design-system / content-rules / icons / default-surface / │
|
|
172
172
|
│ outline-design / pptx-export / high-fidelity / failure-modes / tech-design; │
|
|
173
|
-
│ 归档见 docs/archive/refs/) │
|
|
173
|
+
│ 归档见 ../docs/archive/refs/) │
|
|
174
174
|
├─ evals/ # Eval 框架(结果/过程/风格/效率四类目标) │
|
|
175
175
|
│ ├─ prompts.csv # 14 条 prompt(显式/隐式/上下文/负对照) │
|
|
176
176
|
│ ├─ rubric.schema.json # 风格目标结构化评分契约 │
|
|
@@ -223,7 +223,7 @@ python scripts/check_triggers.py
|
|
|
223
223
|
| `references/presentation-craft.md` | Mode A L1.5 工艺(反截断 / 大气正式) |
|
|
224
224
|
| `assets/examples/` | 3 份黄金样张(每模式 1)+ TopMind showcase |
|
|
225
225
|
| `evals/trigger-queries.json` | description 触发正/负例;`check_triggers.py` |
|
|
226
|
-
|
|
|
226
|
+
| `../docs/archive/` | 历史规范 / 旧示例 |
|
|
227
227
|
|
|
228
228
|
风格画廊与主题参考图:`assets/theme-overview*.png`(Gate 0)。完整规范索引见 playbook §十。
|
|
229
229
|
|
package/top-ppt-html/SKILL.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: top-ppt-html
|
|
3
|
-
description: "
|
|
3
|
+
description: "为正式商务演示把材料做成可视化报告:零外链可翻页 HTML(日常上台)+ 高保真可编辑 16:9 PPTX(按需)双交付;MD3 式密度克制;三模式(A 演示 / B 研究 / C 架构)× 9 风格。Use when 用户要做报告、演示、汇报、PPT、slides、deck、路演,或写研究报告、分析报告、咨询报告、白皮书、调研、评测、对标、经营分析、复盘、项目汇报、商务/HTML/网页报告,或做架构图、拓扑图、流程图、泳道图、方案图,或把材料做成可视化报告并导出 HTML/PPT/PPTX,或优化报告的排版/版式/配色/图文布局,或做报告时说快速模式/fast/直接生成/一键出稿/少问一句。Do NOT use for 纯代码工程、非报告类网页或应用开发、视频/图片生成、直接改写已有 Word/PPT 源文件本身。"
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: "Python 3 stdlib for HTML generation; Node >=18 + pptxgenjs for PPTX; optional playwright for browser regression / theme captures."
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
author: TopMindspace
|
|
6
|
+
version: 0.1.19
|
|
7
|
+
author: TopMindspace
|
|
9
8
|
---
|
|
10
9
|
# TopPPT HTML
|
|
11
10
|
|
|
@@ -88,7 +87,7 @@ metadata:
|
|
|
88
87
|
**L2 一览**(命中条件与逐任务只读清单的**详表以 playbook §十为准**,此处仅索引):
|
|
89
88
|
|
|
90
89
|
- 模式契约与锁定版式 → `references/modes.md` · 完整路径七步 → `references/outline-design.md`
|
|
91
|
-
- **A/Fast L1.5 → `default-surface.md` + `presentation-craft.md`** · 骨架 `layout-grammar.md` §七 ·
|
|
90
|
+
- **A/Fast L1.5 → `default-surface.md` + `presentation-craft.md`** · 骨架 `layout-grammar.md` §七 · 插画规范(L2)→ `illustration-layout.md`
|
|
92
91
|
- 组件/版式**代码** → `components.md` · 页型表 `page-type-matrix.md` · 图表门面 `charts.md` + 决策树 `chart-decision-tree.md`(extended 按需)· 信息图 → `infographics.md`
|
|
93
92
|
- 配色/主题/字阶 → `styles.md` + `design-system.md` · 写作 → `content-rules.md` · 图标语义 → `icons.md`
|
|
94
93
|
- PPTX 精导 → `references/pptx-export.md` · 深度高保真 → `references/high-fidelity.md` · 修复顺序 → `references/failure-modes.md` · 技能维护 → `references/tech-design.md`
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
|
|
65
65
|
---
|
|
66
66
|
|
|
67
|
-
> **六项问询**(一次问完、全部带意图推荐、不选即按推荐走):①意图与模式推荐合并确认(本表)②篇幅(A 8–15 页 / B 12–25 页 / C 1–3
|
|
67
|
+
> **六项问询**(一次问完、全部带意图推荐、不选即按推荐走):①意图与模式推荐合并确认(本表)②篇幅(A 8–15 页 / B 12–25 页 / C 1–3 张图共 6–8 页)③风格 9 套(始终选择——风格是 HTML 皮肤,与交付格式无关)④**亮暗主题**(浅色默认 / 深色沉浸;石墨深灰默认深色;HTML 与 PPTX 同主题导出——`REPORT_MODEL.theme`)⑤交付格式(仅 HTML / HTML+PPTX)⑥参考图确认(Gate 0 已展示整体图,问用户是否看到、要不要换)。载体优先结构化选项卡,宿主工具不支持则对话文本一次列全;问询顺序与完整措辞以 `SKILL.md` 为准。
|
|
68
68
|
>
|
|
69
69
|
> 六项问询收**形式参数**;模式确定后,内容主线/大纲/逐页规划走 `outline-design.md` 内容架构七步法(含按需大纲确认),再进入生成。
|
|
70
70
|
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
⑥ 任务路由可解析性 —— extract_snippet.py 的 TASK_ROUTES 每条 (文件, 节) 必须可
|
|
19
19
|
实际抽取(防「文字声明同源」漂移:路由声明的节在文件里找不到即失败;
|
|
20
20
|
空节路由 = 该文件只能整读,≥20KB 的 L2 文件不允许)
|
|
21
|
+
⑦ 反引号引用可达 —— 反引号代码引用中的 `references/*.md` / `scripts/*`
|
|
22
|
+
路径必须存在(审计 轻微-15 门禁盲区:①–⑥ 只查 [text](path) 形式,
|
|
23
|
+
`references/pan-style.md` 曾漏网;glob/占位符写法跳过)
|
|
21
24
|
|
|
22
25
|
何时跑:改 `references/*`、拆分/新增规范文件、调整选型表后(与 regression.py 互补——
|
|
23
26
|
后者管交付物正确性,本工具管规范自洽性)。
|
|
@@ -162,6 +165,27 @@ def main() -> int:
|
|
|
162
165
|
errs.append(f'任务路由空节(整读大文件,应补节号或标题关键词):{empty_routes}')
|
|
163
166
|
print(f'⑥ 任务路由可解析性:{len(ES.TASK_ROUTES)} 条路由 · 不可解析 {len(unresolved)} · 空节 {len(empty_routes)}')
|
|
164
167
|
|
|
168
|
+
# ⑦ 反引号引用可达(审计 轻微-15 门禁盲区:`references/pan-style.md` 曾漏网;
|
|
169
|
+
# glob/占位符写法(* ? < > |)跳过;先按引用文件所在目录解析,再回落技能根)
|
|
170
|
+
bt_path = re.compile(r'(references|scripts)/([\w.\-/]+)')
|
|
171
|
+
bt_suffix = re.compile(r':\d+(?:-\d+)?$')
|
|
172
|
+
backtick_bad = 0
|
|
173
|
+
for rel in doc_files():
|
|
174
|
+
mp = ROOT / rel
|
|
175
|
+
text = mp.read_text(encoding='utf-8')
|
|
176
|
+
for span in set(re.findall(r'`([^`]+)`', text)):
|
|
177
|
+
for kind, p in bt_path.findall(span):
|
|
178
|
+
p = bt_suffix.sub('', p)
|
|
179
|
+
if not p or any(c in p for c in '*?<>|'):
|
|
180
|
+
continue
|
|
181
|
+
tgt = mp.parent / kind / p
|
|
182
|
+
if not tgt.exists():
|
|
183
|
+
tgt = ROOT / kind / p
|
|
184
|
+
if not tgt.exists():
|
|
185
|
+
backtick_bad += 1
|
|
186
|
+
errs.append(f'反引号引用不可达 {rel}: `{kind}/{p}`')
|
|
187
|
+
print(f'⑦ 反引号引用可达:异常 {backtick_bad} 处')
|
|
188
|
+
|
|
165
189
|
print()
|
|
166
190
|
if errs:
|
|
167
191
|
print('审计未通过:')
|
|
@@ -159,8 +159,8 @@ def main() -> int:
|
|
|
159
159
|
chk('② compatibility', 0 < clen <= 500,
|
|
160
160
|
f'compatibility 缺失或超 500 字符({clen})',
|
|
161
161
|
f'{clen} 字符')
|
|
162
|
-
meta_ver = re.search(r'^\s
|
|
163
|
-
meta_author = re.search(r'^\s
|
|
162
|
+
meta_ver = re.search(r'^\s*version:\s*"?([\w.\-]+)"?\s*$', sk, re.M)
|
|
163
|
+
meta_author = re.search(r'^\s*author:\s*(\S+)\s*$', sk, re.M)
|
|
164
164
|
pkg_ver = ''
|
|
165
165
|
try:
|
|
166
166
|
import json as _json
|
|
@@ -62,6 +62,42 @@ const pptxgen = require('pptxgenjs');
|
|
|
62
62
|
const fs = require('fs');
|
|
63
63
|
const path = require('path');
|
|
64
64
|
|
|
65
|
+
/* ═══ CLI 参数 fail-fast(审计 中等-12)═══
|
|
66
|
+
* 未知参数一律报错退出(exit 2),不再执行默认构建并写出文件;
|
|
67
|
+
* --help / -h 打印用法并正常退出(exit 0)。
|
|
68
|
+
* 位置参数只接受一个(输出文件名)。 */
|
|
69
|
+
(function failFastOnUnknownArgs() {
|
|
70
|
+
const raw = process.argv.slice(2);
|
|
71
|
+
if (raw.includes('--help') || raw.includes('-h')) {
|
|
72
|
+
console.log(
|
|
73
|
+
`用法:
|
|
74
|
+
node scripts/build_pptx.js [输出.pptx] --model=<模型.json> [--style=<风格>] [--theme=light|dark]
|
|
75
|
+
|
|
76
|
+
1) 抽模型:python scripts/extract_model.py <报告.html>(生成 <报告>.model.json)
|
|
77
|
+
2) 生成: node scripts/build_pptx.js 报告.pptx --model=报告.model.json
|
|
78
|
+
3) 质检: python scripts/validate_pptx.py 报告.pptx --strict --model=报告.model.json
|
|
79
|
+
|
|
80
|
+
参数:
|
|
81
|
+
--model=<file> 内容模型 JSON(推荐:由 extract_model.py 从 HTML 报告抽取;缺省用内嵌示例)
|
|
82
|
+
--style=<name> 覆盖模型的风格(9 套风格 token 见 scripts/layout-constants.json)
|
|
83
|
+
--theme=light|dark 主题(--theme 覆盖 > 模型 theme > 默认 light)`);
|
|
84
|
+
process.exit(0);
|
|
85
|
+
}
|
|
86
|
+
const known = /^(--model=|--style=|--theme=)/;
|
|
87
|
+
let positional = 0;
|
|
88
|
+
for (const a of raw) {
|
|
89
|
+
if (a.startsWith('-')) {
|
|
90
|
+
if (!known.test(a)) {
|
|
91
|
+
console.error(`[build_pptx] FAIL: 未知参数 ${a} —— 拒绝执行(用 --help 查看用法)`);
|
|
92
|
+
process.exit(2);
|
|
93
|
+
}
|
|
94
|
+
} else if (++positional > 1) {
|
|
95
|
+
console.error(`[build_pptx] FAIL: 多余的位置参数 ${a} —— 只接受一个输出文件名`);
|
|
96
|
+
process.exit(2);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
})();
|
|
100
|
+
|
|
65
101
|
/* ══════════ 版式常量单源(scripts/layout-constants.json · 两通道共用,禁止在此手写常量) ══════════ */
|
|
66
102
|
const LC = JSON.parse(fs.readFileSync(path.join(__dirname, 'layout-constants.json'), 'utf-8'));
|
|
67
103
|
const STYLE_PRESETS = LC.styles; // 9 套风格 token(light)
|
|
@@ -64,11 +64,11 @@ NAME = 'top-ppt-html' # 技能全名 = 分发包顶层目
|
|
|
64
64
|
OUT = ROOT / 'dist' / f'{NAME}.zip'
|
|
65
65
|
MANIFEST = ROOT / 'dist' / f'{NAME}.manifest.json'
|
|
66
66
|
DESC_LIMIT = 1024
|
|
67
|
-
# 版本唯一事实源 =
|
|
68
|
-
#
|
|
67
|
+
# 版本唯一事实源 = SKILL.md frontmatter `version`(须与 package.json version 一致,见 --check 比对);
|
|
68
|
+
# 回退读 package.json。注意:layout-constants.json 的 `version` 是版式常量版本(0.1),不是技能版本,禁止用作技能版本。
|
|
69
69
|
try:
|
|
70
70
|
VERSION = str(json.loads(
|
|
71
|
-
(ROOT / '
|
|
71
|
+
(ROOT / 'package.json').read_text(encoding='utf-8')).get('version') or '0.0')
|
|
72
72
|
except (OSError, json.JSONDecodeError):
|
|
73
73
|
VERSION = '0.0'
|
|
74
74
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# topmind-cover · Cover Art Generation
|
|
2
|
+
|
|
3
|
+
**[中文](./README.md)** | English
|
|
4
|
+
|
|
5
|
+
A reusable skill for generating cover art for X long-form posts and WeChat articles. Goal: **striking, eye-catching, theme-focused**.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @topmindspace/tms-skills install topmind-cover
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
0. **Pick a style (3 steps, required)**: choose 1 of 6 styles from `references/cover-styles.md` by topic
|
|
16
|
+
→ check `assets/examples/<style>.png` to confirm the visual language
|
|
17
|
+
→ compose the prompt from that style's recipe (replace `{TITLE}` with the real title).
|
|
18
|
+
1. Input: article title + 3 theme keywords + platform (x / wechat / both, default both).
|
|
19
|
+
2. Generate with the agent's image-generation capability (landscape 16:9, 8% margin on all sides).
|
|
20
|
+
3. Eyeball check (required): title text correct word for word, subject complete, theme legible at a glance;
|
|
21
|
+
title text and key subject stay inside the central vertical 60% safe zone (so the 900×383 center crop never cuts the title).
|
|
22
|
+
4. Crop and save:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
python3 scripts/crop-cover.py <main-image> --out-dir <package>/images/
|
|
26
|
+
# produces 00-封面.png (1200×675) + 00-封面-公众号.png (900×383, center crop)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Style library & examples
|
|
30
|
+
|
|
31
|
+
- **Style library** `references/cover-styles.md`: 6 styles (bold poster / futuristic tech / editorial magazine / minimalist / guochao illustration / cyber glitch art), each with use cases, hex palettes, font suggestions, Chinese+English prompt recipes, and pitfalls.
|
|
32
|
+
- **Example images** [assets/examples/](./assets/examples/): 12 (6 styles × 1200×675 master + 900×383 WeChat center-crop, ~6.4MB), shipped with the package, free to reuse or adapt (manifest + safe-zone notes + reuse terms in [assets/examples/README.md](./assets/examples/README.md)).
|
|
33
|
+
- **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.
|
|
34
|
+
|
|
35
|
+
## Sizes
|
|
36
|
+
|
|
37
|
+
| Platform | Size | Aspect |
|
|
38
|
+
|----------|------|--------|
|
|
39
|
+
| X Article cover | 1200×675 | 16:9 (master image) |
|
|
40
|
+
| WeChat cover large image | 900×383 | 2.35:1 (center crop) |
|
|
41
|
+
|
|
42
|
+
## Design rules
|
|
43
|
+
|
|
44
|
+
One image, one theme; subject fills 40%+ of the frame; big title ≤ 10 chars, high contrast; avoid clutter, tiny dense text, and competing subjects.
|
|
45
|
+
|
|
46
|
+
## Development
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
python3 scripts/package_skill.py --check
|
|
50
|
+
python3 scripts/negative_tests.py
|
|
51
|
+
```
|
package/topmind-cover/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# topmind-cover · 封面配图生成
|
|
2
2
|
|
|
3
|
+
[English](./README.en.md) | 中文
|
|
4
|
+
|
|
3
5
|
为 X 长文和公众号文章生成封面图的可复用技能。目标:**震撼、醒目、主题突出**。
|
|
4
6
|
|
|
5
7
|
## 安装
|
|
@@ -10,17 +12,26 @@ npx @topmindspace/tms-skills install topmind-cover
|
|
|
10
12
|
|
|
11
13
|
## 用法
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
0. **选风格(三步,必做)**:按题材从 `references/cover-styles.md` 选 1 种风格(6 选 1)
|
|
16
|
+
→ 看 `assets/examples/<风格>.png` 示例图,确认视觉语言符合预期
|
|
17
|
+
→ 按该风格的 prompt 配方组 prompt(把 `{TITLE}` 换成实际标题)。
|
|
18
|
+
1. 输入文章标题 + 3 个主题关键词 + 平台(x / wechat / both,默认 both)。
|
|
19
|
+
2. 用 agent 的图片生成能力出图(横构图 16:9,四周留白 8%)。
|
|
20
|
+
3. 肉眼检查(必做):标题字逐字正确、主体完整、一眼能说出主题;标题字与关键主体
|
|
21
|
+
落在中央垂直 60% 安全区内(900×383 中央裁剪不切字)。
|
|
22
|
+
4. 裁剪落盘:
|
|
18
23
|
|
|
19
24
|
```bash
|
|
20
|
-
python3 scripts/crop-cover.py <主图> --
|
|
25
|
+
python3 scripts/crop-cover.py <主图> --out-dir <包>/images/
|
|
21
26
|
# 产出 00-封面.png (1200×675) + 00-封面-公众号.png (900×383,中央裁剪)
|
|
22
27
|
```
|
|
23
28
|
|
|
29
|
+
## 风格库与示例图
|
|
30
|
+
|
|
31
|
+
- **风格库** `references/cover-styles.md`:6 种风格(震撼大字报 / 科技未来感 / 杂志编辑风 / 极简留白 / 国潮插画 / 赛博故障艺术),每种含适用场景、配色 hex、字体建议、中英 prompt 配方、避坑。
|
|
32
|
+
- **示例图** [assets/examples/](./assets/examples/):12 张(6 风格 × 1200×675 主图 + 900×383 公众号中央裁剪版,约 6.4MB),随包发布,可直接拿去用/改(清单 + 安全区说明 + 复用声明见 [assets/examples/README.md](./assets/examples/README.md))。
|
|
33
|
+
- **安全区铁律**:标题字与关键主体必须落在画面中央垂直 60% 安全区内(上下各预留 13%+ 不放标题字),否则公众号中央裁剪会切掉标题。
|
|
34
|
+
|
|
24
35
|
## 尺寸
|
|
25
36
|
|
|
26
37
|
| 平台 | 尺寸 | 比例 |
|