@topmindspace/topmind-writing-skills 0.8.40 → 0.8.41
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 +10 -1
- package/README.en.md +2 -2
- package/README.md +2 -2
- package/bin/topmind-writing-skills.js +36 -11
- package/package.json +1 -1
- package/topmind-briefs/README.en.md +1 -1
- package/topmind-briefs/README.md +1 -1
- package/topmind-cover/README.en.md +1 -1
- package/topmind-cover/README.md +1 -1
- package/topmind-format/README.en.md +1 -1
- package/topmind-format/README.md +1 -1
- package/topmind-poster/README.en.md +1 -1
- package/topmind-poster/README.md +1 -1
- package/topmind-viral-posts/README.en.md +1 -1
- package/topmind-viral-posts/README.md +1 -1
- package/topmind-wechat-post/README.en.md +1 -1
- package/topmind-wechat-post/README.md +1 -1
- package/topmind-x-article/README.en.md +1 -1
- package/topmind-x-article/README.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
## [0.8.
|
|
1
|
+
## [0.8.41] - 2026-10-16
|
|
2
|
+
|
|
3
|
+
> 根包 0.8.40 → **0.8.41**(patch,仅安装器);技能版本不变。
|
|
4
|
+
|
|
5
|
+
### 变更(安装器默认升级)
|
|
6
|
+
|
|
7
|
+
- `install` 遇到已装技能时默认升级:包内版本更新(或已装版本缺失 / 解析不了)→ 直接覆盖,不备份,打印 `Upgraded <id> <旧> -> <新>`;版本相同 → `Already up to date`,exit 0,`--force` 重装;已装版本更新 → 拒绝降级,`--force` 才覆盖。
|
|
8
|
+
- 帮助文本、README 中英文同步;`test_installer_cli.js` 新增升级 / 同版本 / 已装更新 / 版本缺失用例。
|
|
9
|
+
|
|
10
|
+
- 2026-10-16
|
|
2
11
|
|
|
3
12
|
> 根包 0.8.39 → **0.8.40**(patch);技能版本:topmind-briefs 0.2.20 → 0.2.21、topmind-format 0.1.5 → 0.1.6、topmind-viral-posts 0.3.12 → 0.3.13、topmind-wechat-post 0.3.12 → 0.3.13、topmind-x-article 0.4.18 → 0.4.19。
|
|
4
13
|
|
package/README.en.md
CHANGED
|
@@ -128,7 +128,7 @@ Every skill ships sample outputs written by us (fictional or neutral topics; no
|
|
|
128
128
|
| [`topmind-format`](./topmind-format/) | **0.1.6** | X plain-text formatter: to duanzi (blank lines, no emoji) / to short post (paragraphing + sensible lists, emoji optional); layout only, words unchanged, with a fidelity check; one copy-ready plain-text body, links / images sent separately |
|
|
129
129
|
| [`topmind-poster`](./topmind-poster/) | **0.1.6** | HTML+CSS → high-res long image / poster / infographic PNG: headless Chrome 2× screenshot + auto-trim; "one image per section" batch workflow (generator + renderer) |
|
|
130
130
|
|
|
131
|
-
Installer [`@topmindspace/topmind-writing-skills`](https://www.npmjs.com/package/@topmindspace/topmind-writing-skills) is **0.8.
|
|
131
|
+
Installer [`@topmindspace/topmind-writing-skills`](https://www.npmjs.com/package/@topmindspace/topmind-writing-skills) is **0.8.41** (whole-repo same-tag releases).
|
|
132
132
|
|
|
133
133
|
### Which skill, and how they combine
|
|
134
134
|
|
|
@@ -162,7 +162,7 @@ npx github:topmindspace/topmind-writing-skills install topmind-briefs
|
|
|
162
162
|
|
|
163
163
|
Default probe order: `./.agents` → `./.claude` → `./.cursor` → `./.codex` → `./.mimocode`, then user-level `~/.claude`, etc. Or pass `--to`. When `--to` is omitted, the install summary explicitly prints the auto-detected target directory. Do not `npm install topmind-briefs` (skill id is not a standalone package).
|
|
164
164
|
|
|
165
|
-
`install` details:
|
|
165
|
+
`install` details: upgrades by default: if the installed version is older (or unreadable), it is overwritten in place (no backup) and `Upgraded <skill> <old> -> <new>` is printed; the same version prints `Already up to date` (`--force` reinstalls); an installed version newer than the package is refused unless `--force`. On success, a three-line summary is printed: where it was installed / installed skill version and installer version / next steps.
|
|
166
166
|
|
|
167
167
|
## Repo layout
|
|
168
168
|
|
package/README.md
CHANGED
|
@@ -128,7 +128,7 @@ npx @topmindspace/topmind-writing-skills install topmind-poster
|
|
|
128
128
|
| [`topmind-format`](./topmind-format/) | **0.1.6** | X 纯文本格式化:转段子(行间空行,零 emoji)/ 格式化成短文(分段 + 合理列表,emoji 可选),只动排版不改字,带原文保真校验;交付一段可复制纯文本,链接 / 原图另发 |
|
|
129
129
|
| [`topmind-poster`](./topmind-poster/) | **0.1.6** | HTML+CSS → 高清长图 / 海报 / 信息图 PNG:无头 Chrome 2× 截图 + 自动裁白;「一段一图」分段图批量出图(生成器 + 渲染器) |
|
|
130
130
|
|
|
131
|
-
安装器 [`@topmindspace/topmind-writing-skills`](https://www.npmjs.com/package/@topmindspace/topmind-writing-skills) 为 **0.8.
|
|
131
|
+
安装器 [`@topmindspace/topmind-writing-skills`](https://www.npmjs.com/package/@topmindspace/topmind-writing-skills) 为 **0.8.41**(整仓同 tag 发版)。
|
|
132
132
|
|
|
133
133
|
### 怎么选、怎么组合
|
|
134
134
|
|
|
@@ -166,7 +166,7 @@ npx github:topmindspace/topmind-writing-skills install topmind-briefs
|
|
|
166
166
|
|
|
167
167
|
默认探测:`./.agents` → `./.claude` → `./.cursor` → `./.codex` → `./.mimocode`,再用户级 `~/.claude` 等;也可用 `--to`。未给 `--to` 时安装摘要会明确打印探测到的目标目录。不要 `npm install topmind-briefs`(技能 id 不是独立包)。
|
|
168
168
|
|
|
169
|
-
`install`
|
|
169
|
+
`install` 细节:默认升级:已装版本比包里旧(或读不到版本)就直接覆盖(不备份),打印 `Upgraded <技能> <旧> -> <新>`;版本相同打印 `Already up to date`,加 `--force` 可重装;已装版本比包里新则拒绝降级,需加 `--force`。安装成功后打印三行摘要:装到哪里 / 装的技能版本与安装器版本 / 下一步。
|
|
170
170
|
|
|
171
171
|
## 仓库结构
|
|
172
172
|
|
|
@@ -193,6 +193,20 @@ function assertDestOutsideSource(src, dest) {
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
/** 比较版本 a 与 b:a>b 返回 1,相等 0,a<b -1。b 缺失或解析不了视为最旧(返回 1)。 */
|
|
197
|
+
function parseVer(v) {
|
|
198
|
+
const m = String(v || '').trim().replace(/^["']|["']$/g, '').replace(/^v/, '').match(/^(\d+)\.(\d+)\.(\d+)/);
|
|
199
|
+
return m ? m.slice(1, 4).map(Number) : null;
|
|
200
|
+
}
|
|
201
|
+
function compareVersions(a, b) {
|
|
202
|
+
const pa = parseVer(a);
|
|
203
|
+
const pb = parseVer(b);
|
|
204
|
+
if (!pb) return 1;
|
|
205
|
+
if (!pa) return -1;
|
|
206
|
+
for (let i = 0; i < 3; i++) if (pa[i] !== pb[i]) return pa[i] > pb[i] ? 1 : -1;
|
|
207
|
+
return 0;
|
|
208
|
+
}
|
|
209
|
+
|
|
196
210
|
function install(skillId, targetRoot, { force = false, defaultTarget = false } = {}) {
|
|
197
211
|
assertSkillId(skillId);
|
|
198
212
|
const src = skillDir(skillId);
|
|
@@ -210,25 +224,32 @@ function install(skillId, targetRoot, { force = false, defaultTarget = false } =
|
|
|
210
224
|
'Choose a --to directory that can be created (not a file, not unwritable).'
|
|
211
225
|
);
|
|
212
226
|
}
|
|
227
|
+
let upgradedFrom = null;
|
|
213
228
|
if (fs.existsSync(dest)) {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
229
|
+
// 已装过:默认升级。打包版本更新 → 直接覆盖(不备份);相同 → 已是最新;已装版本更新 → 需 --force。
|
|
230
|
+
const installedVer = readSkillVersion(dest);
|
|
231
|
+
const packageVer = readSkillVersion(src) || 'unknown';
|
|
232
|
+
const cmp = compareVersions(packageVer, installedVer);
|
|
233
|
+
if (!force && cmp === 0) {
|
|
234
|
+
console.log(`Already up to date: ${skillId} ${installedVer} (use --force to reinstall)`);
|
|
235
|
+
console.log(` at: ${dest}`);
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
if (!force && cmp < 0) {
|
|
218
239
|
die(
|
|
219
|
-
`
|
|
220
|
-
|
|
221
|
-
'Refusing to overwrite. Pass --force (or -f) to replace, or remove it first:\n' +
|
|
222
|
-
` topmind-writing-skills uninstall ${skillId} --to ${targetRoot}`
|
|
240
|
+
`Installed ${skillId} ${installedVer} is newer than packaged ${packageVer}; not downgrading. ` +
|
|
241
|
+
'Pass --force (or -f) to downgrade.'
|
|
223
242
|
);
|
|
224
243
|
}
|
|
244
|
+
upgradedFrom = cmp > 0 ? installedVer || 'unknown' : null;
|
|
225
245
|
fs.rmSync(dest, { recursive: true, force: true });
|
|
226
246
|
}
|
|
227
247
|
copyDir(src, dest);
|
|
228
248
|
// 安装摘要三行:装到哪里 / 装了什么版本 / 下一步。
|
|
229
249
|
const toNote = defaultTarget ? ' (default, auto-detected — no --to given)' : '';
|
|
230
250
|
const skillVer = readSkillVersion(dest) || 'unknown';
|
|
231
|
-
console.log(`
|
|
251
|
+
if (upgradedFrom) console.log(`Upgraded ${skillId} ${upgradedFrom} -> ${skillVer}`);
|
|
252
|
+
else console.log(`Installed ${skillId}`);
|
|
232
253
|
console.log(` to: ${dest}${toNote}`);
|
|
233
254
|
console.log(` version: skill ${skillVer} (installer ${installerVersion()})`);
|
|
234
255
|
console.log(` next: ${nextStep(skillId, dest)}`);
|
|
@@ -290,8 +311,12 @@ Usage:
|
|
|
290
311
|
|
|
291
312
|
Behavior:
|
|
292
313
|
install copies <skill-id>/ into <dir>/<skill-id>/. If the skill is already
|
|
293
|
-
installed
|
|
294
|
-
|
|
314
|
+
installed: a newer packaged version upgrades it in place (no backup,
|
|
315
|
+
prints "Upgraded <id> <old> -> <new>"); the same version prints
|
|
316
|
+
"Already up to date" (--force reinstalls); an installed version newer
|
|
317
|
+
than the package is refused unless --force. A missing/unparseable
|
|
318
|
+
installed version counts as an upgrade. Prints where/what-version/
|
|
319
|
+
next-steps when done.
|
|
295
320
|
uninstall removes <dir>/<skill-id>/ (refuses: not installed, not a skill
|
|
296
321
|
directory, or the package's own skill source).
|
|
297
322
|
No --to: the target directory is auto-detected (probe order below) and
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ A brief is not a long-form article — **no HTML by default**: the workflow is v
|
|
|
7
7
|
The X version is one copy-ready plain-text block (emoji optional); **links (including sources), original images and any generated images are sent separately**, never mixed into the body.
|
|
8
8
|
The WeChat version is ~300–800 Chinese characters of Markdown. With no original image it asks before generating one.
|
|
9
9
|
|
|
10
|
-
- Version: **v0.2.21** (ships with `@topmindspace/topmind-writing-skills@0.8.
|
|
10
|
+
- Version: **v0.2.21** (ships with `@topmindspace/topmind-writing-skills@0.8.41`)
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
package/topmind-briefs/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
X 版交付一段可直接复制的纯文本(emoji 可选),**链接(含来源)、原图、配图另发**,不和正文混在一起;公众号版约 300–800 字 Markdown。
|
|
8
8
|
没有原图时先问要不要配图(`topmind-cover`);链接那一条写明来源名称、发布时间与 URL。
|
|
9
9
|
|
|
10
|
-
- 版本:**v0.2.21**(随 `@topmindspace/topmind-writing-skills@0.8.
|
|
10
|
+
- 版本:**v0.2.21**(随 `@topmindspace/topmind-writing-skills@0.8.41` 发布)
|
|
11
11
|
|
|
12
12
|
## 安装
|
|
13
13
|
|
|
@@ -4,7 +4,7 @@
|
|
|
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.4.11** (ships with `@topmindspace/topmind-writing-skills@0.8.
|
|
7
|
+
- Version: **v0.4.11** (ships with `@topmindspace/topmind-writing-skills@0.8.41`)
|
|
8
8
|
|
|
9
9
|
## Style gallery
|
|
10
10
|
|
package/topmind-cover/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Lays out existing text for X: **duanzi mode** (one sentence per line, a blank line between every line, no emoji at all, bullets without symbols) or **short-post mode** (paragraphing; lists become 「·」/「1)」 or, optionally, emoji bullets; title emoji and motifs are optional). Layout only — the words are never changed; a fidelity check enforces it. Links, source lines and image notes are pulled out of the body so it stays one copy-ready plain-text block; links and images are sent separately.
|
|
6
6
|
|
|
7
|
-
- Version: **v0.1.6** (ships with `@topmindspace/topmind-writing-skills@0.8.
|
|
7
|
+
- Version: **v0.1.6** (ships with `@topmindspace/topmind-writing-skills@0.8.41`)
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
package/topmind-format/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
把现成的文字排成 X 上好读的样子:**转段子**(每句一行、行间空一行,完全不用 emoji,分点不加符号)或**格式化成短文**(合理分段换行、列表改「·」「1)」或 emoji,标题 emoji 与人设点缀可选)。只动排版,不改字,自带原文保真校验;正文里的链接、来源行、配图行会拿出来另列,交付一段可直接复制的纯文本,链接和图片另发。
|
|
6
6
|
|
|
7
|
-
- 版本:**v0.1.6**(随 `@topmindspace/topmind-writing-skills@0.8.
|
|
7
|
+
- 版本:**v0.1.6**(随 `@topmindspace/topmind-writing-skills@0.8.41` 发布)
|
|
8
8
|
|
|
9
9
|
## 安装
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Rankings, infographics, monthly-report long images, posters — plus the "one image per section" workflow for splitting a long article into N shareable images. Text is 100% controllable, diffable, and iterable.
|
|
6
6
|
|
|
7
|
-
- Version: **v0.1.6** (ships with `@topmindspace/topmind-writing-skills@0.8.
|
|
7
|
+
- Version: **v0.1.6** (ships with `@topmindspace/topmind-writing-skills@0.8.41`)
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
package/topmind-poster/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Short, real, hooked — read in 3 seconds, impossible not to like/comment/follow. 18 post types plus hook × body × closer combinations, summarised from common high-engagement writing patterns in the Chinese X community (all examples are original). Posts default to "duanzi" layout (one sentence per line, a blank line between lines), original images first, plus a hashtag set and classification tags. Existing text → `topmind-format`.
|
|
6
6
|
|
|
7
|
-
- Version: **v0.3.13** (ships with `@topmindspace/topmind-writing-skills@0.8.
|
|
7
|
+
- Version: **v0.3.13** (ships with `@topmindspace/topmind-writing-skills@0.8.41`)
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
短、真、钩子——3 秒看完,忍不住点赞/评论/关注。基于对 X 中文区常见高互动写法的归纳,提供 18 类型模板 + 钩子×主体×收尾组合玩法(示例均为自编),默认段子体排版(一句一行、行间空一行),配图原图优先,并附话题标签与分类标签。
|
|
6
6
|
|
|
7
|
-
- 版本:**v0.3.13**(随 `@topmindspace/topmind-writing-skills@0.8.
|
|
7
|
+
- 版本:**v0.3.13**(随 `@topmindspace/topmind-writing-skills@0.8.41` 发布)
|
|
8
8
|
|
|
9
9
|
## 安装
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Full lifecycle for WeChat articles: delivery package, review & rewrite, three quality gates, status sync, WeChat inline typography, and publish checklist.
|
|
6
6
|
|
|
7
|
-
- Version: **v0.3.13** (ships with `@topmindspace/topmind-writing-skills@0.8.
|
|
7
|
+
- Version: **v0.3.13** (ships with `@topmindspace/topmind-writing-skills@0.8.41`)
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Turn a Markdown draft into a "copy → paste → publish" X long-form (Article) package.
|
|
6
6
|
|
|
7
|
-
- Version: **v0.4.19** (ships with `@topmindspace/topmind-writing-skills@0.8.
|
|
7
|
+
- Version: **v0.4.19** (ships with `@topmindspace/topmind-writing-skills@0.8.41`)
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|