@taloswork/ose-shared 0.1.9 → 0.1.11

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 (62) hide show
  1. package/mcp/gen/mcp.json +2 -2
  2. package/package.json +3 -3
  3. package/skills/diagram-design/SKILL.md +1 -1
  4. package/skills/document/SKILL.md +63 -75
  5. package/skills/document/bin/deck-build.cjs +51 -1
  6. package/skills/document/bin/deck-qa.cjs +18745 -279
  7. package/skills/document/bin/doc-convert.cjs +9280 -76489
  8. package/skills/document/bin/doc-fill.cjs +0 -0
  9. package/skills/document/bin/doc-gen.cjs +3043 -46825
  10. package/skills/document/bin/doc-run.cjs +65095 -1967
  11. package/skills/document/bin/doc-scan.cjs +0 -0
  12. package/skills/document/bin/doc-text.cjs +0 -0
  13. package/skills/document/bin/doc-validate.cjs +18067 -226
  14. package/skills/document/bin/doc-xml.cjs +1 -1
  15. package/skills/document/bin/docx-annotate.cjs +0 -0
  16. package/skills/document/bin/html2pptx.cjs +32498 -145280
  17. package/skills/document/bin/ocr-worker.cjs +0 -0
  18. package/skills/document/bin/ocr.cjs +0 -0
  19. package/skills/document/bin/pdf-form.cjs +0 -0
  20. package/skills/document/bin/pdf-images.cjs +0 -0
  21. package/skills/document/bin/pdf-ops.cjs +0 -0
  22. package/skills/document/bin/pdf-render.cjs +11 -9
  23. package/skills/document/bin/pdf-tables.cjs +0 -0
  24. package/skills/document/bin/pptx-clone.cjs +21 -25
  25. package/skills/document/bin/pptx-embed-fonts.cjs +8 -6
  26. package/skills/document/bin/pptx-set-image.cjs +0 -0
  27. package/skills/document/bin/pptx-slide.cjs +22 -32
  28. package/skills/document/bin/pptx-theme.cjs +1 -20
  29. package/skills/document/bin/pptx-tokenize.cjs +1 -1
  30. package/skills/document/bin/xlsx-query.cjs +0 -0
  31. package/skills/document/bin/xlsx-recalc.cjs +0 -0
  32. package/skills/document/bin-reference.md +35 -0
  33. package/skills/document/content-pipeline.md +19 -18
  34. package/skills/document/deck-design.md +110 -211
  35. package/skills/document/layouts/README.md +4 -33
  36. package/skills/document/motion/README.md +4 -2
  37. package/skills/document/office.md +5 -1
  38. package/skills/document/rewrite.md +43 -99
  39. package/skills/document/styles/README.md +0 -7
  40. package/skills/document/theme-system.md +1 -0
  41. package/skills/document/themes/README.md +5 -5
  42. package/skills/document/themes/anthropic-clay.json +1 -7
  43. package/skills/document/themes/apple-keynote.json +1 -7
  44. package/skills/document/themes/black-gold.json +1 -2
  45. package/skills/document/themes/cinereel.json +1 -2
  46. package/skills/document/themes/cool-tech.json +1 -2
  47. package/skills/document/themes/hand-drawn.json +1 -2
  48. package/skills/document/themes/ivory-gold.json +1 -2
  49. package/skills/document/themes/magazine-ink.json +1 -2
  50. package/skills/document/themes/mckinsey-consulting.json +1 -7
  51. package/skills/document/themes/mono.json +1 -2
  52. package/skills/document/themes/swiss-grid.json +1 -2
  53. package/skills/document/themes/warm-editorial.json +1 -2
  54. package/skills/image-layout/SKILL.md +1 -1
  55. package/skills/image-layout/bin/html2img.cjs +0 -0
  56. package/skills/cozy-static-svg/SKILL.md +0 -76
  57. package/skills/cozy-static-svg/references/approved-preview.png +0 -0
  58. package/skills/cozy-static-svg/references/cross-platform.md +0 -73
  59. package/skills/cozy-static-svg/references/moon_keeps_watch.svg +0 -229
  60. package/skills/cozy-static-svg/references/style-anchor.md +0 -271
  61. package/skills/cozy-static-svg/scripts/artkit.py +0 -321
  62. package/skills/cozy-static-svg/scripts/to_png.py +0 -333
@@ -1,28 +1,30 @@
1
1
  # Generate / edit documents (L3)
2
2
 
3
- ## Themes — the presentation layer for `doc-gen` DOCUMENTS (docx / pdf / spec-pptx)
3
+ ## Themes — the presentation layer for `doc-gen` DOCUMENTS (docx / pdf)
4
4
 
5
5
  > **Decks use skins, not themes.** For an html2pptx deck (路演/汇报/pitch), pick a
6
6
  > **skin** via `--style` (`styles/README.md`, the SKILL deck route) — NOT a
7
7
  > `themes/*.json`. The `themes/` + `--theme` system below is for `doc-gen`
8
- > DOCUMENTS (Word/PDF reports, structured-spec decks) — a separate, still-valid path.
8
+ > DOCUMENTS (Word/PDF reports) — a separate, still-valid path. `doc-gen` makes no
9
+ > decks at all; `html2pptx --theme` reads a theme's colors/fonts and its three
10
+ > slide colors (`pptx{background,titleColor,textColor}`).
9
11
 
10
12
  Content (the spec) and presentation (the theme) are separate. A theme is a JSON
11
- file — template skills ship their own; this skill ships **8 built-ins** in `themes/`
12
- (theme = colors/fonts for `doc-gen` output): `cool-tech` · `apple-keynote` ·
13
- `mckinsey-consulting` · `anthropic-clay` · `black-gold` · `hand-drawn` · `mono` ·
14
- `warm-editorial`. For a plain Word/PDF report, `mckinsey-consulting` (white · deep
13
+ file — template skills ship their own; this skill ships **12 built-ins** in `themes/`
14
+ (theme = colors/fonts for `doc-gen` output; `themes/README.md` lists them with their
15
+ best fit): `cool-tech` · `apple-keynote` · `mckinsey-consulting` · `anthropic-clay` ·
16
+ `black-gold` · `hand-drawn` · `mono` · `warm-editorial` · `ivory-gold` · `cinereel` ·
17
+ `magazine-ink` · `swiss-grid`. For a plain Word/PDF report, `mckinsey-consulting` (white · deep
15
18
  navy · structured tables) is a safe default; `mono` for a stark minimal look.
16
19
 
17
20
  ```
18
21
  node <skill>/bin/doc-gen.cjs docx out.docx spec.json --theme <skill>/themes/mckinsey-consulting.json
19
22
  ```
20
23
 
21
- **Topic-adaptive color (pptx, when the user hasn't named a theme/brand)**: pass
22
- `--topic "<deck subject>"` (or put `"topic"` in the spec). The engine picks a
24
+ **Topic-adaptive color (when the user hasn't named a theme/brand)**: pass
25
+ `--topic "<subject>"` (or put `"topic"` in the spec). The engine picks a
23
26
  palette that FITS the subject — deterministically, by keyword then stable hash —
24
- instead of the same default on every deck (the #1 "AI-generated" tell), and turns
25
- on the richness tokens (motif + gradient wash + depth). `--palette <id>` forces a
27
+ instead of the same default every time (the #1 "AI-generated" tell). `--palette <id>` forces a
26
28
  named one; `doc-gen --list-palettes` prints the library. A `--theme` file or a
27
29
  saved/brand preference (step 1 below) still wins — use `--topic` for the "just
28
30
  make it look designed-for-this" case, not when the user has a look in mind.
@@ -60,10 +62,10 @@ existing deck can seed one too: `pptx-theme ref.pptx <skill>/themes/custom/x.jso
60
62
 
61
63
  ```
62
64
  node <skill>/bin/pptx-theme.cjs ref.pptx /tmp/ref-theme.json
63
- node <skill>/bin/doc-gen.cjs pptx out.pptx spec.json --theme /tmp/ref-theme.json
65
+ node <skill>/bin/html2pptx.cjs deck.html out.pptx --theme /tmp/ref-theme.json
64
66
  ```
65
67
 
66
- This captures colors/fonts/title-body sizes (heuristic fallbacks print on
68
+ This captures colors/fonts (heuristic fallbacks print on
67
69
  stderr), NOT slide layouts — to reuse the deck's actual LAYOUTS, tokenize it into
68
70
  a fillable template instead (see "Reuse a user's UPLOADED deck" below:
69
71
  `pptx-tokenize` → `doc-fill`).
@@ -71,26 +73,18 @@ a fillable template instead (see "Reuse a user's UPLOADED deck" below:
71
73
  Theme fields (all optional; invalid values default + warn on stderr, never fail):
72
74
  `bestFor` (one-line 适用场景, for the picker) · `fonts{heading,body}` ·
73
75
  `colors{primary,accent,secondary,text,muted,tableHeaderBg,tableBorder}`
74
- (`accent` drives timeline markers/card bars/KPI numbers and defaults to
75
- `primary`; `secondary` defaults to `muted`) ·
76
- `page{size:A4|Letter,margin,header,footer}` (`{title}` `{page}` `{pages}` interpolate;
76
+ (`accent` defaults to `primary`; `secondary` defaults to `muted`) ·
77
+ `page{size:A4|Letter,margin,header,footer}` (`margin` is a CSS length string such as `margin:"20mm"` — mm/cm/in/pt/px; a bare number is not accepted and falls back to the default margin, which changes the page count; `{title}` `{page}` `{pages}` interpolate;
77
78
  **page header/footer: prefer Latin/digits — CJK there renders blank in the PDF path**) ·
78
79
  `heading{h1..h4}{size,color,bold,spaceAfter}` (color takes hex or a palette key like `"primary"`) ·
79
80
  `body{size,lineHeight,justify}` · `cover{enabled,subtitle,date,logo}` (base64 logo; title moves onto the cover) ·
80
- `pptx{background,titleColor,textColor,titleSize,bodySize,logo,logoPos,slideNumber,
81
- motif:"none|corner|sidebar",bgWash,depth}`
82
- (dark deck = dark `background` + light `titleColor`/`textColor`; docx/PDF stay
83
- white-paper regardless. `motif` stamps a repeated accent on content slides;
84
- `bgWash` makes the master background a subtle gradient; `depth` gives statement
85
- slides (cover/section/ending) a gradient background + an oversized ghosted accent
86
- shape (layered, not flat). Background lives on the slide MASTER — edit it once in
87
- PowerPoint to reflow every slide.)
81
+ `pptx{background,titleColor,textColor}` — read only by `html2pptx --theme`, as the
82
+ slide background / title / body CSS colors (dark deck = dark `background` + light
83
+ `titleColor`/`textColor`; docx/PDF stay white-paper regardless).
88
84
 
89
85
  Per format the theme becomes: **pdf** CSS + cover page + live page headers/footers;
90
86
  **docx** real document styles (Heading1–4, default font/size, table header shading)
91
- + header/footer parts + cover page; **pptx** a slide master (background/logo/footer/
92
- slide numbers) + themed title/body — and content **flow-layouts**: it never overlaps,
93
- overflow spills to a "(续)" continuation slide. A spec may embed `"theme": {...}`;
87
+ + header/footer parts + cover page. A spec may embed `"theme": {...}`;
94
88
  `--theme <file>` wins.
95
89
 
96
90
  ## Template decks — `bin/pptx-clone` (one styled slide per data item)
@@ -192,18 +186,20 @@ each, drop the template slide).
192
186
  layouts → `pptx-theme` (extract palette) + our families. Repeat a styled slide
193
187
  per data row → `pptx-clone`.
194
188
 
195
- All-Node generation (no Python): `docx`, `pptxgenjs`, `exceljs`, `pdf-lib`. Same
196
- capability tier as the Anthropic docx/pptx/xlsx skills.
189
+ All-Node generation (no Python): `docx`, `exceljs`, and Chromium for PDF; decks go
190
+ through html2pptx. Same capability tier as the Anthropic docx/pptx/xlsx skills.
197
191
 
198
192
  ## Generate — `bin/doc-gen` (self-contained; no npm install, works offline)
199
193
 
200
194
  ```
201
- node <skill>/bin/doc-gen.cjs <docx|xlsx|pptx|pdf> <out> <spec.json>
195
+ node <skill>/bin/doc-gen.cjs <docx|xlsx|pdf> <out> <spec.json>
202
196
  ```
203
197
  Simple spec shapes:
204
198
  - **docx / pdf**: `{ "title"?: "...", "paragraphs": ["...", ...] }`
205
199
  - **xlsx**: `{ "sheets": { "SheetName": [["h1","h2"], ["a", 1], ...] } }` (row 1 = bold header)
206
- - **pptx**: `{ "slides": [{ "title"?: "...", "bullets"?: ["...", ...] }] }`
200
+
201
+ `doc-gen pptx` exits 64 and points at html2pptx: decks are laid out as HTML
202
+ (deck-design.md), never generated from a slide spec.
207
203
 
208
204
  `doc-gen` validates these shapes **strictly before rendering**: unknown fields are
209
205
  errors, not ignored. For DOCX/PDF use `paragraphs` and/or `blocks`—never
@@ -221,76 +217,20 @@ Rich spec shapes (use these for real documents, not just prose):
221
217
  - **xlsx** per sheet, either the row array above OR
222
218
  `{ "rows": [...], "header"?, "columnWidths"?: [n...], "numFmt"?: ["#,##0.00"...] }`.
223
219
  A cell string starting with `=` is written as a **live formula** (e.g. `"=SUM(A2:A3)"`).
224
- - **pptx** per slide, add any of `"table": [[...]]`, `"image": {data, x,y,w,h}`,
225
- `"chart": {type:"bar|line|pie|doughnut|area", labels:[...], series:[{name, values:[...]}]}` —
226
- charts are NATIVE (PowerPoint-editable c:chart parts), series colors cycle the
227
- theme's layered palette (accent→secondary→primary), dark decks get readable
228
- axis/legend text automatically. Prefer a chart over a numbers table when the
229
- point is a trend or comparison.
230
- - **pptx design archetypes** (per slide — USE THESE for pitch/roadshow decks
231
- (路演/汇报/评审/宣讲), not bullets-of-everything; all theme-colored,
232
- flow-layouted, overflow-safe). **For a substantive deck, first read
233
- content-pipeline.md** (research → pyramid structure → per-page content
234
- structure → the mapping to these archetypes → density + diversity rules).
235
- Catalog:
236
- - **Role**: `"cover": {title, subtitle?, presenter?, date?, variant?}` (封面,
237
- own slide) · `"toc": {items:[{index?,title,desc?}], variant?:"numbered|grid"}`
238
- (目录) · `"section": {title, subtitle?, index?, variant?:"centered|left|index"}`
239
- (章节页,own slide) · `"ending": {message, cta?, contact?, variant?}` (结尾).
240
- - **Metrics**: `"kpiCards"` — array OR `{items:[{value,label?,delta?,icon?}], variant?:"row|grid|hero|iconTop"}`
241
- ("+x%" green, "-x%" red; `iconTop` shows the card's lucide `icon` above the number) ·
242
- `"bigStat": {value, label?, context?, sub?:[kpi]}` (单个巨型数字).
243
- - **Content**: `"cards"` — array OR `{items:[{title,text?,accent?,icon?,image?}], variant?:"accentBar|numbered|iconCircle|imageTop"}`
244
- (`iconCircle` = lucide `icon` in an accent circle; `imageTop` = the card's base64 `image` as a top banner) ·
245
- `"comparison": {columns:[{title,badge?,rows:[…],recommended?}], dimensions?:[…], variant?:"columns|matrix"}`
246
- (2–3 栏对比;`matrix` = 特性打勾矩阵,cells 是 有/是/✓ → 绿勾、无/否/- → 叉,否则文字) ·
247
- `"quadrant": {xAxis?,yAxis?, cells:[TL,TR,BL,BR]}` (2×2 矩阵) ·
248
- `"iconList": {items:[{icon?,title,text?,accent?}], variant?:"rows|grid"}` (icon = a
249
- lucide name e.g. "zap"/"shield"/"target"/"users"/"trending-up"; unknown → marker fallback) ·
250
- `"quote": {text, author?, role?}`.
251
- - **Process/time**: `"steps": {items:[{label,detail?,output?,duration?}], variant?:"horizontal|vertical"}` ·
252
- `"timeline"` — array OR `{items:[{label,text?}], variant?:"horizontal|vertical|detailCards"}`
253
- (`detailCards` = nodes on a line each with a styled detail card beneath).
254
- - **Media**: `"splitImage": {image:{data}, side?:"left|right", title?, bullets?:[…], cards?:[…]}`.
255
- Render order within a slide: kpiCards → cards → comparison → quadrant → bigStat →
256
- quote → toc → steps → iconList → splitImage → timeline → bullets → table → image → chart.
257
- **Vary variants across pages** (content-pipeline.md diversity rule) — a
258
- monotone deck of one variant reads as lazy.
259
-
260
- **Designed HTML render (`--design html`, in-app, magazine ceiling)**: the SAME
261
- spec, but `cover`/`section`/`bigStat`/`comparison`/`quadrant`/`splitImage`/
262
- `iconList` slides render through curated HTML/CSS templates (fuller design)
263
- instead of native shapes:
264
- `doc-gen.cjs pptx out.pptx spec.json --theme <t> --design html`.
265
- Trade-off — richer look, but the output is a flat collage (editable text, **no
266
- master/placeholder structure**); charts fall back to native. It needs the
267
- app's Chromium; **headless or any slide without a designed template auto-falls
268
- back to the native renderer** (same spec, no failure). Use it when the user
269
- wants a polished pitch/cover and the deck is mostly the covered archetypes;
270
- stick with the default (native) for editable structure, charts, or headless.
271
- A layout the templates still can't express → deck-design.md freeform html2pptx.
272
-
273
- Under the hood it uses `docx` / `exceljs` / `pptxgenjs` / `pdf-lib` — the same
220
+ Under the hood it uses `docx` / `exceljs`, and prints PDF in Chromium — the same
274
221
  tier as the Anthropic docx/pptx/xlsx skills, but all-Node (no Python /
275
222
  LibreOffice) and bundled into the script. For anything past these shapes, write a
276
223
  short Node script using those libraries directly (they are on the skill's path).
277
224
 
278
- **PDF rendering (two engines, automatic):**
279
- - **In-app (default): Chromium `printToPDF`.** When running inside Talos,
280
- `doc-gen pdf` renders your spec as HTML through the main process → professional
281
- CJK line-breaking, per-glyph font fallback (Latin + 中文 mixed just works),
282
- justification, tables. This is the formal-delivery path. Output tags
283
- `[pdf (chromium)]`. The spec's `blocks` (headings/lists/tables) are supported
284
- here too, not just `title`/`paragraphs`.
285
- - **Headless fallback: pdf-lib.** Outside the app (no render service), it uses the
286
- bundled pdf-lib engine (word-wrap + CJK char-wrap + per-script fonts). For CJK
287
- it embeds a subset Unicode font from a system font or `$TALOS_PDF_FONT` /
288
- `spec.fontPath`; if none is found it errors clearly — set `$TALOS_PDF_FONT`, or
289
- generate `.docx` (OOXML references fonts by name, so CJK just works). Output
290
- tags `[pdf (pdf-lib)]`.
291
-
292
- Either way, **prefer `.docx` for the richest CJK layout** when a PDF isn't
293
- strictly required.
225
+ **PDF rendering (always Chromium, one layout everywhere):** `doc-gen pdf`
226
+ renders your spec as themed HTML and prints it in Chromium — professional CJK
227
+ line-breaking, per-glyph font fallback (Latin + 中文 mixed just works),
228
+ justification, tables, clickable links that wrap inside the page, and the
229
+ theme's page size and margin. Inside Talos it goes through the app's service
230
+ (`[pdf (chromium)]`); elsewhere it uses a headless Chromium
231
+ (`[pdf (headless chromium)]`, needs Playwright). With neither it exits 69 and
232
+ writes nothing — tell the user the PDF could not be produced. The spec's
233
+ `blocks` (headings/lists/tables) are supported, not just `title`/`paragraphs`.
294
234
 
295
235
  ## Fill a template — `bin/doc-fill` (preserves styling; the best "edit" path)
296
236
 
@@ -361,9 +301,13 @@ node <skill>/bin/doc-run.cjs --list # the guaranteed module registry
361
301
  ```
362
302
 
363
303
  Inside the script, plain CommonJS `require()` of these names is guaranteed:
364
- `pptxgenjs` (decks) · `docx` (Word) · `xlsx` (SheetJS workbooks) ·
365
- `pdf-lib` (PDF assembly) · `jszip` / `pizzip` (OOXML zip surgery) ·
366
- `hyperformula` (formula evaluation). Nothing else is guaranteed — do not
304
+ `pptxgenjs` (non-deck pptx only — data tables, one-off shapes; every deck goes through html2pptx) · `docx` (Word) · `exceljs` (formatted workbooks: fills,
305
+ fonts, borders, merges, formulas) · `xlsx` (SheetJS: reading and plain-data
306
+ workbooks only — it writes no cell styles) · `pdf-lib` (PDF assembly) ·
307
+ `jszip` / `pizzip` (OOXML zip surgery) · `hyperformula` (formula evaluation).
308
+ An exceljs formula is written without a cached result; run
309
+ `bin/xlsx-recalc.cjs` on the file when the values must show before Excel
310
+ recalculates. Nothing else is guaranteed — do not
367
311
  `require` other packages, and never run `npm install`.
368
312
 
369
313
  Rules of the tier ladder (try in this order, don't skip levels). **NOTE — decks
@@ -126,13 +126,6 @@ Opt-outs (auto-pick skips these; `--backdrop` still works explicitly if ever
126
126
  needed): `mckinsey`, `mono` → 纯色(no backdrop, by design) · `cinereel` → 常驻胶片
127
127
  取景框(每页恒定,故意排除在自动挑选之外).
128
128
 
129
- Leave `--backdrop` unset and html2pptx **auto-picks one of the skin's available
130
- `backdrop*.html` variants**, seeded by the deck's HTML content — the same
131
- deck.html always resolves to the same variant (stable across the QA fix-loop's
132
- re-renders), but different decks land on different variants, so repeat
133
- generations of the same skin don't all look identical. Pass `--backdrop
134
- <variant>` only when you need a specific one pinned.
135
-
136
129
  ## Extend
137
130
 
138
131
  Add a skin = **one `styles/<name>/skin.css`** defining the full class contract
@@ -43,6 +43,7 @@ rewrite a layout.
43
43
  ```json
44
44
  {
45
45
  "style": "cool",
46
+ "scenario": "发布会",
46
47
  "themeVersion": 2,
47
48
  "decorRhythm": "auto",
48
49
  "mediaStyle": "device-stage",
@@ -1,11 +1,11 @@
1
1
  # Built-in themes
2
2
 
3
- **12 套主题**,`doc-gen --theme themes/<name>.json` 或 `html2pptx --theme` 使用。每个文件
4
- 是 doc-theme 契约的纯 JSON(`bestFor` = 适用场景)。
3
+ **12 套主题**,给 `doc-gen --theme themes/<name>.json`(Word/PDF 文档)使用;`html2pptx --theme`
4
+ 是 legacy 路径,deck 一律用 `--style <catalog id>`。每个文件是 doc-theme 契约的纯 JSON
5
+ (`bestFor` = 适用场景)。
5
6
 
6
- **一个主题 = 一套自洽视觉**,与一个 `templates/<家族>` **一一对应**:主题管**颜色 / 字体**,
7
- 家族管**版式**(slide 布局 + 签名装饰)。用户选一次主题 = 同时定了配色和布局。
8
- 非 deck 文档(Word/PDF/Excel)没有家族概念,只吃主题的调色板(白纸 + 品牌色标题/表格)。
7
+ 主题只管**颜色 / 字体**;"配对家族"一列是同名 deck 风格(`catalog.json` 的 entry),
8
+ 方便文档与 deck 配色一致。非 deck 文档没有版式概念,只吃主题的调色板(白纸 + 品牌色标题/表格)。
9
9
 
10
10
  | 主题 | 配对家族 | 基调 | 适用场景 |
11
11
  |---|---|---|---|
@@ -33,12 +33,6 @@
33
33
  "pptx": {
34
34
  "background": "#f0eee6",
35
35
  "titleColor": "#191919",
36
- "textColor": "#191919",
37
- "titleSize": 26,
38
- "bodySize": 16,
39
- "motif": "none",
40
- "bgWash": true,
41
- "depth": true,
42
- "slideNumber": true
36
+ "textColor": "#191919"
43
37
  }
44
38
  }
@@ -25,12 +25,6 @@
25
25
  "pptx": {
26
26
  "background": "#000000",
27
27
  "titleColor": "#f5f5f7",
28
- "textColor": "#f5f5f7",
29
- "titleSize": 32,
30
- "bodySize": 18,
31
- "motif": "none",
32
- "bgWash": true,
33
- "depth": false,
34
- "slideNumber": false
28
+ "textColor": "#f5f5f7"
35
29
  }
36
30
  }
@@ -18,7 +18,6 @@
18
18
  "pptx": {
19
19
  "background": "#0b0b0d",
20
20
  "titleColor": "#f5e6b8",
21
- "textColor": "#cbbd97",
22
- "slideNumber": true
21
+ "textColor": "#cbbd97"
23
22
  }
24
23
  }
@@ -18,7 +18,6 @@
18
18
  "pptx": {
19
19
  "background": "#0D0D0C",
20
20
  "titleColor": "#F5F4F0",
21
- "textColor": "#C7C5BE",
22
- "slideNumber": true
21
+ "textColor": "#C7C5BE"
23
22
  }
24
23
  }
@@ -18,7 +18,6 @@
18
18
  "pptx": {
19
19
  "background": "#0a0e1a",
20
20
  "titleColor": "#ffffff",
21
- "textColor": "#aab6d4",
22
- "slideNumber": true
21
+ "textColor": "#aab6d4"
23
22
  }
24
23
  }
@@ -18,7 +18,6 @@
18
18
  "pptx": {
19
19
  "background": "#fbfaf6",
20
20
  "titleColor": "#2b2b2b",
21
- "textColor": "#3a3a3a",
22
- "slideNumber": true
21
+ "textColor": "#3a3a3a"
23
22
  }
24
23
  }
@@ -18,7 +18,6 @@
18
18
  "pptx": {
19
19
  "background": "#EEE8DA",
20
20
  "titleColor": "#A97C3F",
21
- "textColor": "#2B2823",
22
- "slideNumber": true
21
+ "textColor": "#2B2823"
23
22
  }
24
23
  }
@@ -18,7 +18,6 @@
18
18
  "pptx": {
19
19
  "background": "#F1F3F5",
20
20
  "titleColor": "#0A1F3D",
21
- "textColor": "#384962",
22
- "slideNumber": true
21
+ "textColor": "#384962"
23
22
  }
24
23
  }
@@ -41,12 +41,6 @@
41
41
  "pptx": {
42
42
  "background": "#ffffff",
43
43
  "titleColor": "#051c2c",
44
- "textColor": "#1c2b3a",
45
- "titleSize": 24,
46
- "bodySize": 15,
47
- "motif": "none",
48
- "bgWash": false,
49
- "depth": false,
50
- "slideNumber": true
44
+ "textColor": "#1c2b3a"
51
45
  }
52
46
  }
@@ -14,7 +14,6 @@
14
14
  "pptx": {
15
15
  "background": "#ffffff",
16
16
  "titleColor": "#0a0a0a",
17
- "textColor": "#555555",
18
- "slideNumber": true
17
+ "textColor": "#555555"
19
18
  }
20
19
  }
@@ -18,7 +18,6 @@
18
18
  "pptx": {
19
19
  "background": "#FAFAF8",
20
20
  "titleColor": "#0A0A0A",
21
- "textColor": "#3D3D3B",
22
- "slideNumber": true
21
+ "textColor": "#3D3D3B"
23
22
  }
24
23
  }
@@ -18,7 +18,6 @@
18
18
  "pptx": {
19
19
  "background": "#f7f2ea",
20
20
  "titleColor": "#241a12",
21
- "textColor": "#6b5d4c",
22
- "slideNumber": true
21
+ "textColor": "#6b5d4c"
23
22
  }
24
23
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: image-layout
3
- description: "Use this skill whenever the user wants EXISTING images combined or altered as pixels — 拼图 / 拼接 / 拼一张 / 宫格 / 九宫格 / 长图 / 对比图 / 前后对比 / 加水印 / 加标签 / 加边框 / 裁剪 / 圆角 / 缩放, or stitch / combine / merge images / collage / contact sheet / side-by-side / before-after / watermark / label / crop / round corners / resize. Examples: 'combine these four into one picture', '把生成的几张图拼成九宫格', 'add a caption under each'. Method: HTML+CSS rendered by this skill's bin/html2img.cjs. The mechanical test: if the images do not exist as files yet, this is NOT the skill. Do NOT trigger for: generating NEW images, INCLUDING when the request names a layout word — '生成一张九宫格的图' asks for ONE generated picture whose COMPOSITION is a grid, not for tiling existing files; documents / PDF / PowerPoint (document skill); Xiaohongshu cards (talos-xhs-ops); or upscaling / background removal / content-aware fill, which need a model, not CSS."
3
+ description: "Use when EXISTING images (files already on disk) are combined or altered as pixels: 拼图 / 拼接 / 宫格 / 九宫格 / 长图 / 对比图 / 加水印 / 加标签 / 裁剪 / 圆角 / 缩放, stitch / combine / collage / contact sheet / side-by-side / before-after / watermark / label / crop / resize. The mechanical test: if the images do not exist as files yet, this is NOT the skill. Do NOT trigger for generating NEW images, INCLUDING when the request names a layout word ('生成一张九宫格的图' is one generated picture); documents (document skill); Xiaohongshu cards (talos-xhs-ops); or upscaling / background removal, which need a model."
4
4
  license: Proprietary. LICENSE.txt has complete terms
5
5
  ---
6
6
 
File without changes
@@ -1,76 +0,0 @@
1
- ---
2
- name: cozy-static-svg
3
- description: "手工编写纯静态 SVG 插画:柔和渐变、圆润主体、舒适留白,可配温柔短句或贴题的唐宋诗词;色系自由、默认明快。适用于手绘 SVG、静态插画、治愈插画、诗词配图、沿用上次画风、再画一张等请求。"
4
- ---
5
-
6
- # 温柔静态 SVG 插画
7
-
8
- ## 使用依据与范围
9
-
10
- 用户以《月亮替你值夜班》为准,认可这套画风、精细度与制作流程;要求**手写直出原生 SVG、不转 PNG**:以速查表约束画风,以质检脚本守住最后质量。
11
-
12
- - 认可原作:`references/moon_keeps_watch.svg`;风格参考:`references/approved-preview.png`。
13
- - **速查与配方(每幅开画前必读)**:`references/style-anchor.md`。
14
- - **跨平台速查**:`references/cross-platform.md`(macOS / Windows 命令对照、字体差异、转 PNG、故障对照)。
15
- - **脚本(两平台共用同一份,不写死绝对路径)**:`scripts/artkit.py` 质检(结构校验+画风合规报告,秒级,不出图、不转 PNG;文件 / 目录 / 通配符都收,纯标准库);`scripts/to_png.py` 转 PNG(仅在用户明确要 PNG 时用,跨平台自动挑后端)。
16
- - 首幅或题材类型首次出现时,可对照原作与风格参考复习一次;之后速查表+质检即可。
17
- - 固定的是画风、方法、完成度,不是题材;不要每张重复同一主体、结构或坐标;成批出图按速查表的「题材轮换」主动错开。
18
- - 拼接已有作品用 image-layout 技能,保持原图,不要用简化重绘冒充。
19
- - 不改动原作母版;每次新建独立文件。
20
-
21
- ## 提速工作流(默认按此执行)
22
-
23
- 1. **一句话定创意**:主体姿态+环境结构+主光源位置。用户给了内容就直接用,不追问低风险细节。
24
- 2. **读速查表**:`references/style-anchor.md`(画风、硬底线、题材轮换、配方与清单都在里面)。
25
- 3. **手写整幅 SVG**:一次写全;defs+use 复用重复小元素;落盘前按速查表「开画前自查清单」过一遍。
26
- 4. **一条命令质检**:
27
-
28
- ```bash
29
- python3 scripts/artkit.py 作品.svg # macOS / Linux
30
- py -3 scripts\artkit.py 作品.svg # Windows
31
- ```
32
-
33
- 参数给目录或通配符即为批量(如 `python3 scripts/artkit.py .`),通配符由脚本自己展开,
34
- 两个平台写法一致;细节见 `references/cross-platform.md`。
35
- 报告含结构、圆角裁切、引用、字体、调色清单、文案清单;**无 ✗ 才算过**。不通过就用 edit 精准修复(只动需要动的坐标 / 路径 / 层级),再跑一次;成功报告留着核对文案与调色。
36
- 5. **交付**:`present_file` 直出原生 SVG;预览、脚本不交付。质检报告核对过后,直接用温柔、贴合画面意境的一两句话交付,**严禁输出“质检通过、直出原生 SVG”这类生硬的技术汇报**。
37
-
38
- - **成批出图**:先按顺序写完所有 SVG,再用一条命令批量质检(传目录或通配符即可),逐个按报告核对。
39
- - **不拆子 agent**:画 SVG 全程自己完成,不派子 agent、不并行外发。逐张手写、逐张落盘、最后统一质检;成批也是串行画完再批量质检,不用子 agent 分担画面。
40
- - **默认不渲染、不转 PNG**:直接交付原生 SVG。
41
- - 不调用生图模型替代手绘;不把位图包进 SVG。
42
-
43
- ## 画风与底线(细节与配方见速查表)
44
-
45
- **画风(长什么样)**
46
- - 情绪:安静、柔软、温暖、有一点生活趣味;每张只讲一个看得懂的小故事。
47
- - 形状:手写贝塞尔与基础几何,圆润自然;大形先成立,细节克制;不以元素数量代替质量。
48
- - 构图:默认 1200×900;舒服的留白;远/中/近与承托面分层;全幅圆角由最外层 clipPath 统一裁切(含文字)。
49
- - 光与渐变:渐变过渡自然、层次分明、主光源统一(暖灯 / 冷月 / 落日 / 晨雾 / 日间自然光皆可)。
50
-
51
- **硬底线(不可让步,详见速查表)**
52
- - 明度均衡:不设固定色板——每幅按题材与情绪自由发挥、可多变;保持整幅协调;**默认明快,亮调与中间调为主,深色夜景只做少数**(原作那套夜色不是默认值)。
53
- - 对比度:明快不等于发飘——亮底要有深色锚点,深底要有大面积亮部;整幅留一处明确的明暗落差,且集中在少数区域。
54
- - 文字可读性:按文字所在区域的实际底色选色(不是按整幅平均色);亮底深字、暗底亮字;字号越小对比要求越高;脸、轮廓、文字对比必须清楚。详见速查表的「文字可读性」。
55
- - 题材轮换:连续两张不同类型,每 4 张覆盖三类以上,同一母题最多两次。详见速查表的「题材轮换」。
56
-
57
- **文案与落款**
58
- - 上限:最多标题+一句温柔注脚(+少量落款);字体栈含中文系统回退。
59
- - 诗词版:画面相宜时左下角可改题一首贴题的唐宋诗词(诗句两行+出处一行),此时**去掉右下小字**,全图五处文字(左上标题、右上落款、左下诗句与出处);标题写自己的话、诗句引原典,两者不重复。结构与对比照速查表的「诗词版」。
60
- - 落款名不写死:按当前使用者的称呼填写;不确定就改用中性落款(如「晚安」),宁可无名字也不要猜错。详见速查表的「落款名:按使用者替换,不要照抄」。
61
-
62
- **技术与可访问性**
63
- - 含命名空间;显式 width/height/viewBox;`role="img"` 与 `aria-labelledby`;title/desc 如实;纯静态、纯矢量、自包含(无动画 / 脚本 / 外链 / 位图)。
64
-
65
- ## 交付前质量核对
66
-
67
- - 质检报告无 ✗:结构、圆角裁切(全部内容在框内)、引用、字体栈、静态底线。
68
- - 文字可读性已核对:各处文字(标题、注脚、诗词、落款、小字)在其底色上都能轻松读出来;没有低对比或横跨明暗交界的句子。
69
- - 对比度已核对:有一处明确的明暗落差,且集中在少数区域,没有整幅发飘或处处高对比。
70
- - 落款名已核对:是当前使用者的称呼,或中性落款;没有照抄示例里的名字。
71
- - 若用了诗词版:五处文字齐全(左上标题、右上落款、左下诗句与出处),右下无小字。
72
- - 成批时题材轮换已核对:连续两张不同类型,母题未超两次。
73
- - 整幅用色协调统一(色系自由、可多变);文案逐句核对无错字、无残缺句。
74
- - 自查清单已勾完;最终交付 = 质检通过的最新版原生 SVG。
75
-
76
-
@@ -1,73 +0,0 @@
1
- # 跨平台速查(macOS / Windows / Linux)
2
-
3
- 这套技能本体是「手写 SVG 文本 + 纯标准库 Python 脚本」,没有平台依赖。
4
- 真正需要按系统调整的只有两件事:**质检命令怎么写**、**转 PNG 用什么工具**。
5
-
6
- ## 一、质检命令
7
-
8
- 脚本 `scripts/artkit.py` 只用 Python 标准库(需 **Python 3.9+**),两个平台都能跑。
9
- 参数支持**文件 / 目录 / 通配符**——目录会递归找全部 `.svg`;通配符由脚本自己展开,
10
- 所以 PowerShell 不必先替命令展开 `*.svg`,两边的写法才真正一致。
11
-
12
- | 场景 | macOS / Linux | Windows |
13
- | --- | --- | --- |
14
- | 单张 | `python3 scripts/artkit.py 作品.svg` | `py -3 scripts\artkit.py 作品.svg` |
15
- | 整批(当前目录) | `python3 scripts/artkit.py .` | `py -3 scripts\artkit.py .` |
16
- | 整批(通配符) | `python3 scripts/artkit.py "out/*.svg"` | `py -3 scripts\artkit.py "out\*.svg"` |
17
- | 严格模式 | 加 `--strict`(提示也算不合格) | 同左 |
18
-
19
- - Windows 上用 `py -3` 最稳;若装了新版 Python 且 PATH 里有 `python`,也可用 `python scripts\artkit.py`。
20
- - 脚本已强制 UTF-8 输出,中文报告在 PowerShell / cmd 里不会乱码;个别老终端若仍乱码,先跑 `chcp 65001`。
21
- - 退出码:0 通过,1 有不合格项 —— 可接进任何平台的脚本里做关卡。
22
-
23
- ## 二、转 PNG(默认不做,用户明确要才做)
24
-
25
- 默认工作流是**直出原生 SVG,不转 PNG**。用户明确要 PNG 时用 `scripts/to_png.py`,
26
- 它自动探测本机可用的后端,两个平台命令一致:
27
-
28
- ```bash
29
- python3 scripts/to_png.py 作品.svg # macOS / Linux
30
- py -3 scripts\to_png.py 作品.svg # Windows
31
- python3 scripts/to_png.py --scale 2 . # 整目录,2 倍图
32
- python3 scripts/to_png.py -o out 作品目录 # 指定输出目录
33
- ```
34
-
35
- 后端优先级:`rsvg-convert` → `inkscape` → `cairosvg` → `chrome/edge`(找不到可用的会给出安装提示)。
36
- 也可以 `--backend inkscape` 手动指定。
37
-
38
- | 后端 | macOS | Windows | 备注 |
39
- | --- | --- | --- | --- |
40
- | rsvg-convert | `brew install librsvg` | MSYS2 `pacman -S mingw-w64-x86_64-librsvg` | 与手绘流程同源,首选 |
41
- | Inkscape | `brew install --cask inkscape` | 官网安装包(自带你丢命令行) | 图形界面顺手可编辑 |
42
- | cairosvg | `pip install cairosvg` | 同左(wheel 自带 cairo) | 纯 Python 路线 |
43
- | chrome / edge | 系统已有 Chrome/Edge 即可 | 系统自带 Edge 即可 | 零安装兜底,`--backend chrome` |
44
-
45
- - 默认**保留透明底**(画风四角是圆角);要白底加 `--background FFFFFF`。
46
- - 不指定尺寸时按 SVG 原始宽高输出(默认画布 1200×900),`--scale 2` 得 2400×1800。
47
- - 不要用「截图整个屏幕」的方式凑 PNG;也不要把位图塞回 SVG。
48
-
49
- ## 三、字体差异(唯一会看出区别的地方)
50
-
51
- 字体栈固定为 `'PingFang SC','Noto Sans CJK SC','Microsoft YaHei',sans-serif`:
52
-
53
- - macOS → **苹方**(PingFang SC);Windows → **微软雅黑**(Microsoft YaHei);两者都不会掉成方块。
54
- - 字形与字宽略有差异(雅黑略宽、笔画更方),同一句话两平台占宽差几个百分点。
55
- 本套画风标题与注脚都留了大片留白,**不会溢出画布**;做像素级对齐要求极高的活儿时,
56
- 要么目标平台上装苹方(字体授权自行确认),要么把文字转成路径(代价:以后不能改文案)。
57
- - Linux 上若两者都没有,装 `fonts-noto-cjk` 即可命中第二顺位。
58
-
59
- ## 四、常见问题对照
60
-
61
- | 现象 | 处理 |
62
- | --- | --- |
63
- | `python3: command not found`(Windows) | 改用 `py -3`;或到 python.org 装新版并勾选 Add to PATH |
64
- | PowerShell 报找不到 `*.svg` | 参数用目录 `.`,或给通配符加引号 `"out\*.svg"`,脚本会自己展开 |
65
- | 报告中文乱码 | 脚本已强制 UTF-8;老终端再执行 `chcp 65001` |
66
- | `rsvg-convert` 不存在(Windows) | 用 `--backend inkscape` 或 `--backend chrome`(系统自带 Edge) |
67
- | PNG 四角是透明格子 | 正常,画风就是圆角;要白底加 `--background FFFFFF` |
68
- | 提示缺少 Python 版本 | 需 3.9+(用到 `str.removesuffix`),脚本会直接告诉你当前版本 |
69
-
70
- ## 五、底线
71
-
72
- - 交付物永远是**质检通过的原生 SVG**;PNG 只是复制品,改图只改 SVG 源文件。
73
- - 两个平台跑同一份 `scripts/`,不各自维护两套;路径一律相对技能目录,不写死绝对路径。