mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-07-12 13:59:47 +08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a44bb08360 | |||
| a07669136c | |||
| b7298a60c6 | |||
| 309f078efb | |||
| 8958ba5409 | |||
| e6612628dc | |||
| bd5745f837 | |||
| cb26732559 | |||
| 9baf570caa |
@@ -6,7 +6,7 @@
|
||||
},
|
||||
"metadata": {
|
||||
"description": "Skills shared by Baoyu for improving daily work efficiency",
|
||||
"version": "1.116.4"
|
||||
"version": "1.117.0"
|
||||
},
|
||||
"plugins": [
|
||||
{
|
||||
|
||||
@@ -2,6 +2,23 @@
|
||||
|
||||
English | [中文](./CHANGELOG.zh.md)
|
||||
|
||||
## 1.117.0 - 2026-05-16
|
||||
|
||||
### Features
|
||||
- `baoyu-article-illustrator`: add batch generation policy — backend native batch first, runtime parallel calls second, sequential fallback; configurable `generation_batch_size` and `--batch-size` option
|
||||
- `baoyu-comic`: add batch generation policy with dependency-aware ordering (character sheet before pages) and configurable `--batch-size`
|
||||
- `baoyu-image-cards`: add batch generation policy honoring image-1 anchor chain, with configurable `--batch-size`
|
||||
- `baoyu-slide-deck`: add batch generation policy for slide image rendering with configurable `--batch-size`
|
||||
- `baoyu-xhs-images`: sync batch generation policy from baoyu-image-cards
|
||||
|
||||
## 1.116.5 - 2026-05-14
|
||||
|
||||
### Features
|
||||
- `baoyu-post-to-wechat`: send WeChat login QR code to Telegram when `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID` env vars are set, enabling headless / remote login flows (by @beforesun)
|
||||
|
||||
### Refactor
|
||||
- `baoyu-post-to-wechat`: harden Telegram QR notification — add 10s fetch timeout, defer the 2s QR-render wait until env vars are configured, and use viewport screenshot as fallback
|
||||
|
||||
## 1.116.4 - 2026-05-14
|
||||
|
||||
### Refactor
|
||||
|
||||
@@ -2,6 +2,23 @@
|
||||
|
||||
[English](./CHANGELOG.md) | 中文
|
||||
|
||||
## 1.117.0 - 2026-05-16
|
||||
|
||||
### 新功能
|
||||
- `baoyu-article-illustrator`:新增批量生成策略 —— 优先使用后端原生批量接口,其次运行时并行调用,最后顺序生成;支持 `generation_batch_size` 配置和 `--batch-size` 参数
|
||||
- `baoyu-comic`:新增批量生成策略,支持依赖感知排序(角色图先于页面)和 `--batch-size` 参数
|
||||
- `baoyu-image-cards`:新增批量生成策略,遵循 image-1 锚定链,支持 `--batch-size` 参数
|
||||
- `baoyu-slide-deck`:新增幻灯片图片批量生成策略,支持 `--batch-size` 参数
|
||||
- `baoyu-xhs-images`:同步 baoyu-image-cards 的批量生成策略
|
||||
|
||||
## 1.116.5 - 2026-05-14
|
||||
|
||||
### 新功能
|
||||
- `baoyu-post-to-wechat`:当设置 `TELEGRAM_BOT_TOKEN` 和 `TELEGRAM_CHAT_ID` 环境变量时,自动将微信登录二维码发送到 Telegram,支持无显示器/远程登录场景 (by @beforesun)
|
||||
|
||||
### 重构
|
||||
- `baoyu-post-to-wechat`:加固 Telegram QR 通知逻辑 —— 增加 10 秒 fetch 超时、未配置环境变量时不再无谓等待 2 秒、回退截图改为视口范围以减小体积
|
||||
|
||||
## 1.116.4 - 2026-05-14
|
||||
|
||||
### 重构
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: baoyu-article-illustrator
|
||||
description: Analyzes article structure, identifies positions requiring visual aids, generates illustrations with Type × Style × Palette three-dimension approach. Use when user asks to "illustrate article", "add images", "generate images for article", or "为文章配图".
|
||||
version: 1.58.0
|
||||
version: 1.59.0
|
||||
metadata:
|
||||
openclaw:
|
||||
homepage: https://github.com/JimLiu/baoyu-skills#baoyu-article-illustrator
|
||||
@@ -42,6 +42,22 @@ Setting `preferred_image_backend: ask` forces the step-3 prompt every run regard
|
||||
|
||||
Concrete tool names (`imagegen`, `image_generate`, `baoyu-imagine`) above are examples — substitute the local equivalents under the same rule.
|
||||
|
||||
## Batch Generation Policy
|
||||
|
||||
After every prompt file for the run has been saved and verified, generate images in batches by default.
|
||||
|
||||
Priority order:
|
||||
|
||||
1. Use the chosen backend's native batch / multi-task interface if it exists. Each task must keep its own prompt file, output path, aspect ratio, and direct reference images.
|
||||
2. If no native batch interface exists but the runtime can issue parallel tool calls, dispatch up to `generation_batch_size` images at a time. Default: `4`. An explicit user request in the current message, such as `--batch-size 4` or "并行4张一起生成", overrides EXTEND.md.
|
||||
3. If neither native batch nor parallel tool calls are available, generate sequentially.
|
||||
|
||||
Rules:
|
||||
|
||||
- Never start the first batch until all prompt files for that batch exist on disk.
|
||||
- Retry failed items once without regenerating successful items.
|
||||
- Do not use subagents merely to parallelize image rendering. Use subagents only for separate prompt iteration or creative exploration.
|
||||
|
||||
## Confirmation Policy
|
||||
|
||||
Default behavior: **confirm before generation**.
|
||||
@@ -167,7 +183,7 @@ Full template: [references/workflow.md](references/workflow.md#step-4-generate-o
|
||||
4. LABELS **MUST** include article-specific data: actual numbers, terms, metrics, quotes
|
||||
5. **DO NOT** pass ad-hoc inline prompts to `--prompt` without saving prompt files first
|
||||
6. Select the backend via the `## Image Generation Tools` rule at the top: use whatever is available; if multiple, ask the user once. Do this once per session before any generation.
|
||||
7. **Execution strategy**: When multiple illustrations have saved prompt files and the task is now plain generation, prefer the chosen backend's batch interface (if it offers one) over spawning subagents. Use subagents only when each image still needs separate prompt iteration or creative exploration. If the backend has no batch interface, generate sequentially.
|
||||
7. **Execution strategy**: Generate in batches per the `## Batch Generation Policy`: backend native batch first, runtime parallel tool calls second, sequential only as fallback. Default batch size is 4 unless EXTEND.md or the current request overrides it.
|
||||
8. Process references (`direct`/`style`/`palette`) per prompt frontmatter
|
||||
9. Apply watermark if EXTEND.md enabled
|
||||
10. Generate from saved prompt files; retry once on failure
|
||||
@@ -239,5 +255,6 @@ EXTEND.md lives at the first matching path listed in Step 1.5. Three ways to cha
|
||||
- `preferred_image_backend: codex-imagegen` — pin to Codex's built-in.
|
||||
- `preferred_image_backend: baoyu-imagine` — pin to the baoyu-imagine skill.
|
||||
- `preferred_image_backend: ask` — confirm backend every run.
|
||||
- `generation_batch_size: 4` — default number of images to render concurrently when the runtime supports parallel generation calls.
|
||||
- `preferred_type: infographic`, `preferred_style: notion`, `preferred_palette: macaron`, `language: zh`.
|
||||
- `default_output_dir: imgs-subdir` — where to write generated images relative to the article.
|
||||
|
||||
@@ -129,12 +129,15 @@ preferred_style:
|
||||
default_output_dir: imgs-subdir # same-dir | imgs-subdir | illustrations-subdir | independent
|
||||
language: null
|
||||
preferred_image_backend: auto
|
||||
generation_batch_size: 4
|
||||
custom_styles: []
|
||||
---
|
||||
```
|
||||
|
||||
`preferred_image_backend: auto` is the baked-in default — first-time setup does not ask about it. The `## Image Generation Tools` rule in SKILL.md then picks the runtime-native tool (Codex `imagegen`, Hermes `image_generate`, etc.) when available, and falls back to installed backends.
|
||||
|
||||
`generation_batch_size: 4` is the baked-in default for batch rendering. The current user request may override it for one run.
|
||||
|
||||
## Modifying Preferences Later
|
||||
|
||||
See the `## Changing Preferences` section in `SKILL.md` for the canonical list of common edits (pin backend, change defaults, retrigger setup). Full schema: `preferences-schema.md`.
|
||||
|
||||
@@ -28,6 +28,8 @@ default_output_dir: null # same-dir|illustrations-subdir|independent
|
||||
|
||||
preferred_image_backend: auto # auto|ask|<backend-id>
|
||||
|
||||
generation_batch_size: 4 # 1-8, used when backend/runtime supports batch or parallel generation
|
||||
|
||||
custom_styles:
|
||||
- name: my-style
|
||||
description: "Style description"
|
||||
@@ -55,6 +57,7 @@ custom_styles:
|
||||
| `language` | string | null | Output language (null = auto-detect) |
|
||||
| `default_output_dir` | enum | null | Output directory preference (null = ask each time) |
|
||||
| `preferred_image_backend` | string | `auto` | Image backend selection. `auto` = prefer runtime-native tool, fall back to the only installed backend, ask if multiple non-native are present. `ask` = always confirm on every run. `<backend-id>` (e.g., `codex-imagegen`, `baoyu-imagine`, `image_generate`) = pin this backend when available; fall back to `auto` when it isn't. Absent = `auto`. Resolution logic is documented in `SKILL.md`'s `## Image Generation Tools` section. |
|
||||
| `generation_batch_size` | int | 4 | Number of images to dispatch per batch when the backend has native batch support or the runtime can issue parallel generation calls. Clamp invalid values to 1-8. Current user request overrides this value. |
|
||||
| `custom_styles` | array | [] | User-defined styles |
|
||||
|
||||
## Position Options
|
||||
@@ -118,6 +121,8 @@ language: zh
|
||||
|
||||
preferred_image_backend: codex-imagegen
|
||||
|
||||
generation_batch_size: 4
|
||||
|
||||
custom_styles:
|
||||
- name: corporate
|
||||
description: "Professional B2B style"
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
# Specify density
|
||||
/baoyu-article-illustrator path/to/article.md --density rich
|
||||
|
||||
# Generate up to 4 images in parallel after prompts are saved
|
||||
/baoyu-article-illustrator path/to/article.md --batch-size 4
|
||||
|
||||
# Direct content input (paste mode)
|
||||
/baoyu-article-illustrator
|
||||
[paste content]
|
||||
@@ -31,6 +34,7 @@
|
||||
| `--style <name>` | Visual style (see references/styles.md) |
|
||||
| `--preset <name>` | Shorthand for type + style combo (see [references/style-presets.md](references/style-presets.md)) |
|
||||
| `--density <level>` | Image count: minimal / balanced / rich |
|
||||
| `--batch-size <n>` | Temporary generation batch size for this run. Default: `generation_batch_size` from EXTEND.md, otherwise 4. Clamp to 1-8. |
|
||||
|
||||
## Input Modes
|
||||
|
||||
|
||||
@@ -335,8 +335,11 @@ Prompt Files:
|
||||
**DO NOT** pass ad-hoc inline text to `--prompt` without first saving prompt files. The generation command should either use `--promptfiles prompts/NN-{type}-{slug}.md` or read the saved file content for `--prompt`.
|
||||
|
||||
**Execution choice**:
|
||||
- If multiple illustrations already have saved prompt files and the task is now plain generation, prefer the chosen backend's batch interface (if it offers one); otherwise generate sequentially
|
||||
- Use subagents only when each illustration still needs separate prompt rewriting, style exploration, or other per-image reasoning before generation
|
||||
- If multiple illustrations already have saved prompt files and the task is now plain generation, use batch generation by default.
|
||||
- Prefer the chosen backend's native batch / multi-task interface when available.
|
||||
- If the backend has no native batch interface but the runtime can issue parallel tool calls, dispatch up to `generation_batch_size` tasks at a time. Default: `4`. The current user request overrides EXTEND.md.
|
||||
- Generate sequentially only when neither backend batch nor runtime parallel calls are available.
|
||||
- Use subagents only when each illustration still needs separate prompt rewriting, style exploration, or other per-image reasoning before generation. Do not use subagents just to parallelize rendering.
|
||||
|
||||
**CRITICAL - References in Frontmatter**:
|
||||
- Only add `references` field if files ACTUALLY EXIST in `references/` directory
|
||||
@@ -394,12 +397,18 @@ Add: `Include a subtle watermark "[content]" at [position].`
|
||||
|
||||
### 5.5 Generate
|
||||
|
||||
1. For each illustration:
|
||||
- **Backup rule**: If image file exists, rename to `NN-{type}-{slug}-backup-YYYYMMDD-HHMMSS.md`
|
||||
- If references with `direct` usage: include `--ref` parameter
|
||||
- Generate image
|
||||
2. After each: "Generated X/N"
|
||||
3. On failure: retry once, then log and continue
|
||||
1. Build a generation task list from saved prompt files:
|
||||
- `prompt_file`: `{output-dir}/prompts/NN-{type}-{slug}.md`
|
||||
- `output_file`: `{output-dir}/NN-{type}-{slug}.png`
|
||||
- `aspect_ratio`: from prompt frontmatter or prompt body
|
||||
- `refs`: only verified `direct` references from prompt frontmatter
|
||||
2. **Backup rule**: Before dispatching a task, if its output image already exists, rename it to `NN-{type}-{slug}-backup-YYYYMMDD-HHMMSS.{ext}`.
|
||||
3. Dispatch tasks in batches:
|
||||
- Native batch backend: send all eligible tasks, or chunks of `generation_batch_size` if the backend has a practical limit.
|
||||
- Runtime parallel calls: issue up to `generation_batch_size` image calls concurrently, then continue with the next chunk.
|
||||
- Sequential fallback: process one task at a time.
|
||||
4. After each completed task, record: "Generated X/N: filename".
|
||||
5. On failure: retry the failed task once from the same saved prompt file. Keep successful outputs and continue.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: baoyu-comic
|
||||
description: Knowledge comic creator supporting multiple art styles and tones. Creates original educational comics with detailed panel layouts and sequential image generation. Use when user asks to create "知识漫画", "教育漫画", "biography comic", "tutorial comic", or "Logicomix-style comic".
|
||||
version: 1.56.1
|
||||
description: Knowledge comic creator supporting multiple art styles and tones. Creates original educational comics with detailed panel layouts and batch-capable image generation. Use when user asks to create "知识漫画", "教育漫画", "biography comic", "tutorial comic", or "Logicomix-style comic".
|
||||
version: 1.57.0
|
||||
metadata:
|
||||
openclaw:
|
||||
homepage: https://github.com/JimLiu/baoyu-skills#baoyu-comic
|
||||
@@ -46,6 +46,23 @@ Setting `preferred_image_backend: ask` forces the step-3 prompt every run regard
|
||||
|
||||
Concrete tool names (`imagegen`, `image_generate`, `baoyu-imagine`) above are examples — substitute the local equivalents under the same rule.
|
||||
|
||||
## Batch Generation Policy
|
||||
|
||||
After every prompt file for the current generation group has been saved and verified, generate images in batches by default.
|
||||
|
||||
Priority order:
|
||||
|
||||
1. Use the chosen backend's native batch / multi-task interface if it exists. Each task must keep its own prompt file, output path, aspect ratio, session ID, and direct reference images.
|
||||
2. If no native batch interface exists but the runtime can issue parallel tool calls, dispatch up to `generation_batch_size` images at a time. Default: `4`. An explicit user request in the current message, such as `--batch-size 4` or "并行4张一起生成", overrides EXTEND.md.
|
||||
3. If neither native batch nor parallel tool calls are available, generate sequentially.
|
||||
|
||||
Rules:
|
||||
|
||||
- Honor workflow dependencies first: generate `characters/characters.png` before pages that use it as a reference.
|
||||
- Never start the first page batch until all selected page prompt files exist on disk.
|
||||
- Retry failed items once without regenerating successful items.
|
||||
- Do not use subagents merely to parallelize image rendering. Use subagents only for separate prompt iteration or creative exploration.
|
||||
|
||||
## Reference Images
|
||||
|
||||
Users may supply reference images to guide art style, palette, scene composition, or subject. This is **separate from** the auto-generated character sheet (Step 7.1) — both can coexist: user refs guide the look, the character sheet anchors recurring character identity.
|
||||
@@ -90,6 +107,7 @@ references:
|
||||
| `--aspect` | 3:4 (default, portrait), 4:3 (landscape), 16:9 (widescreen) | Page aspect ratio |
|
||||
| `--lang` | auto (default), zh, en, ja, etc. | Output language |
|
||||
| `--ref <files...>` | File paths | Reference images applied to every page for style / palette / scene guidance. See [Reference Images](#reference-images) above. |
|
||||
| `--batch-size <n>` | 1-8 | Temporary page generation batch size for this run. Default: `generation_batch_size` from EXTEND.md, otherwise 4. |
|
||||
|
||||
### Partial Workflow Options
|
||||
|
||||
@@ -237,6 +255,8 @@ Analyze → [Check Existing?] → [Confirm: Style + Reviews] → Storyboard →
|
||||
| Exists | Not supported | Prepend character descriptions to every prompt file |
|
||||
| Skipped | — | All descriptions inline in prompt |
|
||||
|
||||
**Execution strategy**: Generate the character sheet first when needed. Then build the selected page task list from saved prompt files and dispatch pages in batches per the `## Batch Generation Policy`: backend native batch first, runtime parallel tool calls second, sequential only as fallback. `--regenerate N` and `--images-only` apply the same batching rules to the selected existing prompts.
|
||||
|
||||
**Backup rule**: existing `prompts/…md` and `…png` files → rename with `-backup-YYYYMMDD-HHMMSS` suffix before regenerating. Aspect ratio from storyboard (default `3:4`; preset may override).
|
||||
|
||||
**`--ref` failure recovery**: compress sheet → retry → still fails → drop `--ref` and embed character descriptions in the prompt text.
|
||||
@@ -257,7 +277,7 @@ If EXTEND.md is not found, first-time setup is **blocking** — complete it befo
|
||||
| Found | Read, parse, display summary → continue |
|
||||
| Not found | ⛔ Run first-time setup ([references/config/first-time-setup.md](references/config/first-time-setup.md)) → save EXTEND.md → continue |
|
||||
|
||||
**EXTEND.md supports**: watermark, preferred art/tone/layout, custom style definitions, character presets, language preference. Schema: [references/config/preferences-schema.md](references/config/preferences-schema.md).
|
||||
**EXTEND.md supports**: watermark, preferred art/tone/layout, custom style definitions, character presets, language preference, preferred image backend, generation batch size. Schema: [references/config/preferences-schema.md](references/config/preferences-schema.md).
|
||||
|
||||
## References
|
||||
|
||||
@@ -316,4 +336,5 @@ EXTEND.md lives at `.baoyu-skills/baoyu-comic/EXTEND.md` (project) or `~/.baoyu-
|
||||
- `preferred_image_backend: codex-imagegen` — pin to Codex's built-in.
|
||||
- `preferred_image_backend: baoyu-imagine` — pin to the baoyu-imagine skill.
|
||||
- `preferred_image_backend: ask` — confirm backend every run.
|
||||
- `generation_batch_size: 4` — default number of page images to render concurrently when the backend/runtime supports batch or parallel generation.
|
||||
- `watermark.enabled: true`, `preferred_art`, `preferred_tone`, `preferred_layout`, `language` — shift the auto-selection defaults and cosmetic choices.
|
||||
|
||||
@@ -143,12 +143,15 @@ preferred_layout: null
|
||||
preferred_aspect: null
|
||||
language: [selected or null]
|
||||
preferred_image_backend: auto
|
||||
generation_batch_size: 4
|
||||
character_presets: []
|
||||
---
|
||||
```
|
||||
|
||||
`preferred_image_backend: auto` is the baked-in default — first-time setup does not ask about it. The `## Image Generation Tools` rule in SKILL.md then picks the runtime-native tool (Codex `imagegen`, Hermes `image_generate`, etc.) when available, and falls back to installed backends.
|
||||
|
||||
`generation_batch_size: 4` is the baked-in default for page batch rendering. The current user request may override it for one run.
|
||||
|
||||
## Modifying Preferences Later
|
||||
|
||||
See the `## Changing Preferences` section in `SKILL.md` for the canonical list of common edits (pin backend, change defaults, retrigger setup). Full schema: `config/preferences-schema.md`.
|
||||
|
||||
@@ -25,6 +25,8 @@ language: null # zh|en|ja|ko|auto
|
||||
|
||||
preferred_image_backend: auto # auto|ask|<backend-id>
|
||||
|
||||
generation_batch_size: 4 # 1-8, used when backend/runtime supports batch or parallel page generation
|
||||
|
||||
character_presets:
|
||||
- name: my-characters
|
||||
roles:
|
||||
@@ -49,6 +51,7 @@ character_presets:
|
||||
| `preferred_aspect` | string | null | Aspect ratio (3:4, 4:3, 16:9) |
|
||||
| `language` | string | null | Output language (null = auto-detect) |
|
||||
| `preferred_image_backend` | string | `auto` | Image backend selection. `auto` = prefer runtime-native tool, fall back to the only installed backend, ask if multiple non-native are present. `ask` = always confirm on every run. `<backend-id>` (e.g., `codex-imagegen`, `baoyu-imagine`, `image_generate`) = pin this backend when available; fall back to `auto` when it isn't. Absent = `auto`. Resolution logic is documented in `SKILL.md`'s `## Image Generation Tools` section. |
|
||||
| `generation_batch_size` | int | 4 | Number of page images to dispatch per batch when the backend has native batch support or the runtime can issue parallel generation calls. Clamp invalid values to 1-8. Current user request overrides this value. |
|
||||
| `character_presets` | array | [] | Preset character roles for styles like ohmsha |
|
||||
|
||||
## Art Style Options
|
||||
@@ -127,6 +130,8 @@ language: zh
|
||||
|
||||
preferred_image_backend: codex-imagegen
|
||||
|
||||
generation_batch_size: 4
|
||||
|
||||
character_presets:
|
||||
- name: tech-tutorial
|
||||
roles:
|
||||
|
||||
@@ -488,12 +488,19 @@ When character sheet was skipped or `--ref` failed:
|
||||
- No `--ref` parameter needed
|
||||
- Rely on detailed text descriptions for character consistency
|
||||
|
||||
**For each page (cover + pages)**:
|
||||
1. Read prompt from `prompts/NN-{cover|page}-[slug].md`
|
||||
2. **Backup rule**: If image file exists, rename to `NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.png`
|
||||
3. Generate image using Strategy A, B, or C
|
||||
4. Save to `NN-{cover|page}-[slug].png`
|
||||
5. Report progress after each generation: "Generated X/N: [page title]"
|
||||
**Page batch generation (cover + pages)**:
|
||||
1. Build a page task list from selected saved prompts:
|
||||
- `prompt_file`: `prompts/NN-{cover|page}-[slug].md`
|
||||
- `output_file`: `NN-{cover|page}-[slug].png`
|
||||
- `aspect_ratio`: from storyboard (default `3:4`; preset may override)
|
||||
- `refs`: character sheet and verified direct user refs when Strategy A is active
|
||||
2. **Backup rule**: Before dispatching a task, if its image file exists, rename it to `NN-{cover|page}-[slug]-backup-YYYYMMDD-HHMMSS.png`.
|
||||
3. Dispatch tasks in batches:
|
||||
- Native batch backend: send all eligible page tasks, or chunks of `generation_batch_size` if the backend has a practical limit.
|
||||
- Runtime parallel calls: issue up to `generation_batch_size` image calls concurrently, then continue with the next chunk.
|
||||
- Sequential fallback: process one page at a time.
|
||||
4. After each completed task, report: "Generated X/N: [page title]".
|
||||
5. On failure, retry the failed task once from the same saved prompt file. Keep successful outputs and continue.
|
||||
|
||||
**Session Management**:
|
||||
If image generation skill supports `--sessionId`:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: baoyu-image-cards
|
||||
description: Generates infographic image card series with 12 visual styles, 8 layouts, and 3 color palettes. Breaks content into 1-10 cartoon-style image cards optimized for social media engagement. Use when user mentions "小红书图片", "小红书种草", "小绿书", "微信图文", "微信贴图", "image cards", "图片卡片", or wants social media infographic series.
|
||||
version: 1.56.2
|
||||
version: 1.57.0
|
||||
metadata:
|
||||
openclaw:
|
||||
homepage: https://github.com/JimLiu/baoyu-skills#baoyu-image-cards
|
||||
@@ -42,6 +42,23 @@ Setting `preferred_image_backend: ask` forces the step-3 prompt every run regard
|
||||
|
||||
Concrete tool names (`imagegen`, `image_generate`, `baoyu-imagine`) above are examples — substitute the local equivalents under the same rule.
|
||||
|
||||
## Batch Generation Policy
|
||||
|
||||
After every prompt file for the current generation group has been saved and verified, generate images in batches by default.
|
||||
|
||||
Priority order:
|
||||
|
||||
1. Use the chosen backend's native batch / multi-task interface if it exists. Each task must keep its own prompt file, output path, aspect ratio, session ID, and direct reference images.
|
||||
2. If no native batch interface exists but the runtime can issue parallel tool calls, dispatch up to `generation_batch_size` images at a time. Default: `4`. An explicit user request in the current message, such as `--batch-size 4` or "并行4张一起生成", overrides EXTEND.md.
|
||||
3. If neither native batch nor parallel tool calls are available, generate sequentially.
|
||||
|
||||
Rules:
|
||||
|
||||
- Honor the image-1 anchor chain: generate image 1 first, then batch images 2+ using image 1 as the reference.
|
||||
- Never start a batch until every selected prompt file for that batch exists on disk.
|
||||
- Retry failed items once without regenerating successful items.
|
||||
- Do not use subagents merely to parallelize image rendering. Use subagents only for separate prompt iteration or creative exploration.
|
||||
|
||||
## Confirmation Policy
|
||||
|
||||
Default behavior: **confirm before generation**.
|
||||
@@ -64,6 +81,7 @@ Respond in the user's language across questions, progress, errors, and completio
|
||||
| `--palette <name>` | Color override: macaron / warm / neon |
|
||||
| `--preset <name>` | Style + layout + optional palette shorthand (see Presets below; per-preset prompt fragments in `references/style-presets.md`) |
|
||||
| `--ref <files...>` | Reference images applied to image 1 as the series anchor |
|
||||
| `--batch-size <n>` | Temporary generation batch size for this run. Default: `generation_batch_size` from EXTEND.md, otherwise 4. Clamp to 1-8. |
|
||||
| `--yes` | Non-interactive: skip all confirmations, use EXTEND.md or built-in defaults, auto-confirm recommended plan (Path A) |
|
||||
|
||||
## Dimensions
|
||||
@@ -299,7 +317,7 @@ Check these paths in order; first hit wins:
|
||||
- **Not found + interactive** → run first-time setup (see `references/config/first-time-setup.md`) and save before anything else. Do NOT analyze content or ask style questions until preferences exist — this keeps first-run behavior predictable.
|
||||
- **Not found + `--yes`** → skip setup, use built-in defaults (no watermark, style/layout auto-selected, language from content). Do not prompt, do not create EXTEND.md.
|
||||
|
||||
**EXTEND.md keys**: watermark, preferred style/layout, custom style definitions, language preference. Schema: `references/config/preferences-schema.md`.
|
||||
**EXTEND.md keys**: watermark, preferred style/layout, custom style definitions, language preference, preferred image backend, generation batch size. Schema: `references/config/preferences-schema.md`.
|
||||
|
||||
### Step 1: Analyze Content → `analysis.md`
|
||||
|
||||
@@ -348,14 +366,13 @@ With confirmed outline + style + layout + palette:
|
||||
|
||||
**Visual consistency — image-1 anchor chain**: character / mascot / color rendering drifts between calls unless you anchor them. Generate image 1 (cover) first WITHOUT `--ref`, then pass image 1 as `--ref` to every subsequent image. This is the single most important consistency trick for this skill — don't skip it even if the backend also supports a session ID.
|
||||
|
||||
For each image (cover, content, ending):
|
||||
Generation flow:
|
||||
|
||||
1. Write the full prompt to `prompts/NN-{type}-{slug}.md` in the user's preferred language (backup rule applies).
|
||||
2. Generate:
|
||||
- **Image 1**: no `--ref` (establishes the anchor).
|
||||
- **Images 2+**: add `--ref <path-to-image-01.png>`.
|
||||
- Backup rule applies to the PNG files.
|
||||
3. Report progress after each image.
|
||||
1. Write the full prompt for every image to `prompts/NN-{type}-{slug}.md` in the user's preferred language (backup rule applies), then verify all selected prompt files exist.
|
||||
2. Generate **image 1** first without `--ref`; backup rule applies to the PNG file. This establishes the anchor.
|
||||
3. Build a task list for **images 2+** using image 1 as `--ref <path-to-image-01.png>`.
|
||||
4. Dispatch images 2+ in batches per the `## Batch Generation Policy`: backend native batch first, runtime parallel tool calls second, sequential only as fallback.
|
||||
5. Report progress after each completed image. On failure, retry only the failed item once from the same saved prompt file.
|
||||
|
||||
**Watermark** (if enabled in EXTEND.md): append to the generation prompt:
|
||||
|
||||
@@ -450,5 +467,6 @@ EXTEND.md lives at the first matching path listed in Step 0. Three ways to chang
|
||||
- `preferred_image_backend: codex-imagegen` — pin to Codex's built-in.
|
||||
- `preferred_image_backend: baoyu-imagine` — pin to the baoyu-imagine skill.
|
||||
- `preferred_image_backend: ask` — confirm backend every run.
|
||||
- `generation_batch_size: 4` — default number of images to render concurrently when the backend/runtime supports batch or parallel generation.
|
||||
- `preferred_style: notion`, `preferred_layout: dense`, `preferred_palette: macaron`, `language: zh`.
|
||||
- `watermark.enabled: true` + `watermark.content: "@handle"` — add a watermark.
|
||||
|
||||
@@ -111,12 +111,15 @@ preferred_style:
|
||||
preferred_layout: null
|
||||
language: null
|
||||
preferred_image_backend: auto
|
||||
generation_batch_size: 4
|
||||
custom_styles: []
|
||||
---
|
||||
```
|
||||
|
||||
`preferred_image_backend: auto` is the baked-in default — first-time setup does not ask about it. The `## Image Generation Tools` rule in SKILL.md then picks the runtime-native tool (Codex `imagegen`, Hermes `image_generate`, etc.) when available, and falls back to installed backends.
|
||||
|
||||
`generation_batch_size: 4` is the baked-in default for batch rendering. The current user request may override it for one run.
|
||||
|
||||
## Modifying Preferences Later
|
||||
|
||||
See the `## Changing Preferences` section in `SKILL.md` for the canonical list of common edits (pin backend, change defaults, retrigger setup). Full schema: `preferences-schema.md`.
|
||||
|
||||
@@ -26,6 +26,8 @@ language: null # zh|en|ja|ko|auto
|
||||
|
||||
preferred_image_backend: auto # auto|ask|<backend-id>
|
||||
|
||||
generation_batch_size: 4 # 1-8, used when backend/runtime supports batch or parallel generation
|
||||
|
||||
custom_styles:
|
||||
- name: my-style
|
||||
description: "Style description"
|
||||
@@ -52,6 +54,7 @@ custom_styles:
|
||||
| `preferred_layout` | string | null | Layout preference or null |
|
||||
| `language` | string | null | Output language (null = auto-detect) |
|
||||
| `preferred_image_backend` | string | `auto` | Image backend selection. `auto` = prefer runtime-native tool, fall back to the only installed backend, ask if multiple non-native are present. `ask` = always confirm on every run. `<backend-id>` (e.g., `codex-imagegen`, `baoyu-imagine`, `image_generate`) = pin this backend when available; fall back to `auto` when it isn't. Absent = `auto`. Resolution logic is documented in `SKILL.md`'s `## Image Generation Tools` section. |
|
||||
| `generation_batch_size` | int | 4 | Number of images to dispatch per batch when the backend has native batch support or the runtime can issue parallel generation calls. Clamp invalid values to 1-8. Current user request overrides this value. |
|
||||
| `custom_styles` | array | [] | User-defined styles |
|
||||
|
||||
## Position Options
|
||||
@@ -109,6 +112,8 @@ language: zh
|
||||
|
||||
preferred_image_backend: codex-imagegen
|
||||
|
||||
generation_batch_size: 4
|
||||
|
||||
custom_styles:
|
||||
- name: corporate
|
||||
description: "Professional B2B style"
|
||||
|
||||
@@ -245,7 +245,7 @@ Files created:
|
||||
|-------|-----|
|
||||
| Missing API credentials | Follow guided setup in Step 2 |
|
||||
| Access token error | Verify credentials valid and not expired |
|
||||
| Not logged in (browser) | First run opens browser — scan QR to log in |
|
||||
| Not logged in (browser) | First run opens browser — scan QR to log in. Set `TELEGRAM_BOT_TOKEN` + `TELEGRAM_CHAT_ID` to receive the QR image via Telegram |
|
||||
| Chrome not found | Set `WECHAT_BROWSER_CHROME_PATH` |
|
||||
| Title/summary missing | Use auto-generation or provide manually |
|
||||
| No cover image | Add frontmatter cover or place `imgs/cover.png` in article directory |
|
||||
|
||||
@@ -31,7 +31,98 @@ interface ArticleOptions {
|
||||
cdpPort?: number;
|
||||
}
|
||||
|
||||
async function sendQrToTelegram(session: ChromeSession): Promise<void> {
|
||||
const botToken = process.env.TELEGRAM_BOT_TOKEN;
|
||||
const chatId = process.env.TELEGRAM_CHAT_ID;
|
||||
if (!botToken || !chatId) return;
|
||||
|
||||
// Wait for QR to render before extracting
|
||||
await sleep(2000);
|
||||
|
||||
try {
|
||||
// Try to extract QR image from DOM first (avoids full-page screenshot noise)
|
||||
const domResult = await session.cdp.send<{ result: { value: string } }>('Runtime.evaluate', {
|
||||
expression: `
|
||||
(function() {
|
||||
const selectors = [
|
||||
'.login__type__container__scan img',
|
||||
'.login_img img',
|
||||
'#login_container img',
|
||||
'.qrcode img',
|
||||
'img[src*="qrcode"]',
|
||||
'img[src*="login"]',
|
||||
];
|
||||
for (const sel of selectors) {
|
||||
const el = document.querySelector(sel);
|
||||
if (el?.src && !el.src.startsWith('data:,')) return el.src.startsWith('data:') ? el.src : 'url:' + el.src;
|
||||
}
|
||||
const canvas = document.querySelector('canvas');
|
||||
if (canvas) try { return canvas.toDataURL('image/png'); } catch {}
|
||||
return '';
|
||||
})()
|
||||
`,
|
||||
returnByValue: true,
|
||||
}, { sessionId: session.sessionId });
|
||||
|
||||
const raw = (domResult.result.value as string) ?? '';
|
||||
let imgBuffer: Buffer;
|
||||
|
||||
if (raw.startsWith('data:image')) {
|
||||
imgBuffer = Buffer.from(raw.split(',')[1] ?? '', 'base64');
|
||||
} else if (raw.startsWith('url:')) {
|
||||
// Fetch inside Chrome to carry WeChat session cookies
|
||||
const imgUrl = raw.slice(4);
|
||||
const inBrowserFetch = await session.cdp.send<{ result: { value: string } }>('Runtime.evaluate', {
|
||||
expression: `
|
||||
(async () => {
|
||||
const resp = await fetch(${JSON.stringify(imgUrl)}, { credentials: 'include' });
|
||||
const buf = await resp.arrayBuffer();
|
||||
const bytes = new Uint8Array(buf);
|
||||
let b = '';
|
||||
for (let i = 0; i < bytes.length; i++) b += String.fromCharCode(bytes[i]);
|
||||
return btoa(b);
|
||||
})()
|
||||
`,
|
||||
returnByValue: true,
|
||||
awaitPromise: true,
|
||||
}, { sessionId: session.sessionId });
|
||||
imgBuffer = Buffer.from((inBrowserFetch.result.value as string) ?? '', 'base64');
|
||||
} else {
|
||||
// Fallback: viewport screenshot (smaller than full-page; QR is usually in viewport)
|
||||
const screenshotResp = await session.cdp.send<{ data: string }>(
|
||||
'Page.captureScreenshot', { format: 'png', captureBeyondViewport: false }, { sessionId: session.sessionId }
|
||||
);
|
||||
imgBuffer = Buffer.from(screenshotResp.data ?? '', 'base64');
|
||||
}
|
||||
|
||||
const boundary = `tgboundary${Date.now()}`;
|
||||
const parts: Buffer[] = [
|
||||
Buffer.from(`--${boundary}\r\nContent-Disposition: form-data; name="chat_id"\r\n\r\n${chatId}\r\n`),
|
||||
Buffer.from(`--${boundary}\r\nContent-Disposition: form-data; name="caption"\r\n\r\nWeChat QR code — please scan to log in\r\n`),
|
||||
Buffer.from(`--${boundary}\r\nContent-Disposition: form-data; name="photo"; filename="qr.png"\r\nContent-Type: image/png\r\n\r\n`),
|
||||
imgBuffer,
|
||||
Buffer.from(`\r\n--${boundary}--\r\n`),
|
||||
];
|
||||
const tgResp = await fetch(`https://api.telegram.org/bot${botToken}/sendPhoto`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': `multipart/form-data; boundary=${boundary}` },
|
||||
body: Buffer.concat(parts),
|
||||
signal: AbortSignal.timeout(10_000),
|
||||
});
|
||||
const tgJson = await tgResp.json() as { ok: boolean; description?: string };
|
||||
if (tgJson.ok) {
|
||||
console.log('[wechat] QR code sent to Telegram.');
|
||||
} else {
|
||||
console.error('[wechat] Telegram send failed:', tgJson.description);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('[wechat] Failed to send QR to Telegram:', err);
|
||||
}
|
||||
}
|
||||
|
||||
async function waitForLogin(session: ChromeSession, timeoutMs = 120_000): Promise<boolean> {
|
||||
// Notify via Telegram if configured (no-op when env vars absent)
|
||||
await sendQrToTelegram(session);
|
||||
const start = Date.now();
|
||||
while (Date.now() - start < timeoutMs) {
|
||||
const url = await evaluate<string>(session, 'window.location.href');
|
||||
@@ -557,7 +648,8 @@ export async function postArticle(options: ArticleOptions): Promise<void> {
|
||||
|
||||
const url = await evaluate<string>(session, 'window.location.href');
|
||||
if (!url.includes('/cgi-bin/')) {
|
||||
console.log('[wechat] Not logged in. Please scan QR code...');
|
||||
const hasTelegram = !!(process.env.TELEGRAM_BOT_TOKEN && process.env.TELEGRAM_CHAT_ID);
|
||||
console.log(`[wechat] Not logged in. Please scan QR code...${hasTelegram ? ' (sending to Telegram)' : ''}`);
|
||||
const loggedIn = await waitForLogin(session);
|
||||
if (!loggedIn) throw new Error('Login timeout');
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: baoyu-slide-deck
|
||||
description: Generates professional slide deck images from content. Creates outlines with style instructions, then generates individual slide images. Use when user asks to "create slides", "make a presentation", "generate deck", "slide deck", or "PPT".
|
||||
version: 1.56.2
|
||||
version: 1.57.0
|
||||
metadata:
|
||||
openclaw:
|
||||
homepage: https://github.com/JimLiu/baoyu-skills#baoyu-slide-deck
|
||||
@@ -46,6 +46,23 @@ Setting `preferred_image_backend: ask` forces the step-3 prompt every run regard
|
||||
|
||||
Concrete tool names (`imagegen`, `image_generate`, `baoyu-imagine`) above are examples — substitute the local equivalents under the same rule.
|
||||
|
||||
## Batch Generation Policy
|
||||
|
||||
After every prompt file for the current generation group has been saved and verified, generate slide images in batches by default.
|
||||
|
||||
Priority order:
|
||||
|
||||
1. Use the chosen backend's native batch / multi-task interface if it exists. Each task must keep its own prompt file, output path, aspect ratio, session ID, and direct reference images.
|
||||
2. If no native batch interface exists but the runtime can issue parallel tool calls, dispatch up to `generation_batch_size` slide images at a time. Default: `4`. An explicit user request in the current message, such as `--batch-size 4` or "并行4张一起生成", overrides EXTEND.md.
|
||||
3. If neither native batch nor parallel tool calls are available, generate sequentially.
|
||||
|
||||
Rules:
|
||||
|
||||
- Never start the first batch until all selected slide prompt files exist on disk.
|
||||
- Retry failed items once without regenerating successful items.
|
||||
- Do not use subagents merely to parallelize image rendering. Use subagents only for separate prompt iteration or creative exploration.
|
||||
- Merge PPTX/PDF only after all selected slide images are generated.
|
||||
|
||||
## Confirmation Policy
|
||||
|
||||
Default behavior: **confirm before generation**.
|
||||
@@ -77,6 +94,7 @@ Respond in the user's language across questions, progress reports, error message
|
||||
| `--lang <code>` | Output language (en, zh, ja, ...) |
|
||||
| `--slides <N>` | Target slide count (8-25 recommended, max 30) |
|
||||
| `--ref <files...>` | Reference images applied per slide (style / palette / composition / subject) |
|
||||
| `--batch-size <n>` | Temporary slide image generation batch size for this run. Default: `generation_batch_size` from EXTEND.md, otherwise 4. Clamp to 1-8. |
|
||||
| `--outline-only` | Stop after outline |
|
||||
| `--prompts-only` | Stop after prompts (skip image generation) |
|
||||
| `--images-only` | Skip to Step 7; requires existing `prompts/` |
|
||||
@@ -223,7 +241,7 @@ Copy this checklist and check off items as you complete them:
|
||||
| `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-slide-deck/EXTEND.md` | XDG |
|
||||
| `$HOME/.baoyu-skills/baoyu-slide-deck/EXTEND.md` | User home |
|
||||
|
||||
If found, read, parse, and print a summary (style / audience / language / review). If not, proceed with defaults — first-time setup is not blocking for this skill. Schema: `references/config/preferences-schema.md`.
|
||||
If found, read, parse, and print a summary (style / audience / language / review / generation batch size). If not, proceed with defaults — first-time setup is not blocking for this skill. Schema: `references/config/preferences-schema.md`.
|
||||
|
||||
**1.2 Analyze content** — follow `references/analysis-framework.md`: classify content, detect language, note signals for style selection, estimate slide count from length (see the **Slide Count Heuristic** in Style System above), generate topic slug. Save source as `source.md` (honor backup rule if one exists).
|
||||
|
||||
@@ -279,7 +297,8 @@ Display the prompts index (`# | Filename | Slide Title`) and ask: proceed / edit
|
||||
1. Resolve the image backend via the Image Generation Tools rule at the top — ask once if multiple are installed.
|
||||
2. Confirm every `prompts/NN-slide-{slug}.md` exists (hard requirement; prompt files are the reproducibility record regardless of backend).
|
||||
3. Session ID: `slides-{topic-slug}-{timestamp}` — pass to the backend only if it supports sessions.
|
||||
4. For each slide: generate sequentially, reusing the session ID. Backup rule applies to PNG files. Report progress as `Generated X/N`. Auto-retry once on failure before reporting an error.
|
||||
4. Build a task list for selected slides with each slide's prompt file, output PNG path, aspect ratio, session ID, and verified direct references.
|
||||
5. Dispatch slide images in batches per the `## Batch Generation Policy`: backend native batch first, runtime parallel tool calls second, sequential only as fallback. Backup rule applies to PNG files before dispatch. Report progress as `Generated X/N`. Retry only failed items once before reporting an error.
|
||||
|
||||
`--regenerate N` jumps to this step for the named slides only. `--images-only` starts here with existing prompts.
|
||||
|
||||
@@ -352,4 +371,5 @@ EXTEND.md lives at the first matching path listed in Step 1.1. Two ways to chang
|
||||
- `preferred_image_backend: codex-imagegen` — pin to Codex's built-in.
|
||||
- `preferred_image_backend: baoyu-imagine` — pin to the baoyu-imagine skill.
|
||||
- `preferred_image_backend: ask` — confirm backend every run.
|
||||
- `generation_batch_size: 4` — default number of slide images to render concurrently when the backend/runtime supports batch or parallel generation.
|
||||
- `preferred_style: blueprint`, `preferred_audience: experts`, `language: zh`.
|
||||
|
||||
@@ -13,6 +13,7 @@ audience: general # beginners | intermediate | experts | executives
|
||||
language: auto # auto | en | zh | ja | etc.
|
||||
review: true # true = review outline before generation
|
||||
preferred_image_backend: auto # auto | ask | <backend-id>
|
||||
generation_batch_size: 4 # 1-8, used when backend/runtime supports batch or parallel slide generation
|
||||
|
||||
## Custom Dimensions (only when style: custom)
|
||||
dimensions:
|
||||
@@ -42,6 +43,7 @@ custom_styles:
|
||||
| `language` | string | `auto` | Output language (auto = detect from input) |
|
||||
| `review` | boolean | `true` | Show outline review before generation |
|
||||
| `preferred_image_backend` | string | `auto` | Image backend selection. `auto` = prefer runtime-native tool, fall back to the only installed backend, ask if multiple non-native are present. `ask` = always confirm on every run. `<backend-id>` (e.g., `codex-imagegen`, `baoyu-imagine`, `image_generate`) = pin this backend when available; fall back to `auto` when it isn't. Absent = `auto`. Resolution logic is documented in `SKILL.md`'s `## Image Generation Tools` section. |
|
||||
| `generation_batch_size` | int | 4 | Number of slide images to dispatch per batch when the backend has native batch support or the runtime can issue parallel generation calls. Clamp invalid values to 1-8. Current user request overrides this value. |
|
||||
|
||||
### Custom Dimensions
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
name: baoyu-xhs-images
|
||||
description: "[Deprecated: use baoyu-image-cards] Generates Xiaohongshu (Little Red Book) image card series with 12 visual styles, 8 layouts, and 3 color palettes. Breaks content into 1-10 cartoon-style image cards optimized for XHS engagement. Use when user mentions \"小红书图片\", \"XHS images\", \"RedNote infographics\", \"小红书种草\", \"小绿书\", \"微信图文\", \"微信贴图\", or wants social media infographic series for Chinese platforms."
|
||||
version: 1.56.2
|
||||
version: 1.57.0
|
||||
metadata:
|
||||
openclaw:
|
||||
homepage: https://github.com/JimLiu/baoyu-skills#baoyu-xhs-images
|
||||
@@ -43,6 +43,23 @@ Setting `preferred_image_backend: ask` forces the step-3 prompt every run regard
|
||||
|
||||
Concrete tool names (`imagegen`, `image_generate`, `baoyu-imagine`) above are examples — substitute the local equivalents under the same rule.
|
||||
|
||||
## Batch Generation Policy
|
||||
|
||||
After every prompt file for the current generation group has been saved and verified, generate images in batches by default.
|
||||
|
||||
Priority order:
|
||||
|
||||
1. Use the chosen backend's native batch / multi-task interface if it exists. Each task must keep its own prompt file, output path, aspect ratio, session ID, and direct reference images.
|
||||
2. If no native batch interface exists but the runtime can issue parallel tool calls, dispatch up to `generation_batch_size` images at a time. Default: `4`. An explicit user request in the current message, such as `--batch-size 4` or "并行4张一起生成", overrides EXTEND.md.
|
||||
3. If neither native batch nor parallel tool calls are available, generate sequentially.
|
||||
|
||||
Rules:
|
||||
|
||||
- Honor the image-1 anchor chain: generate image 1 first, then batch images 2+ using image 1 as the reference.
|
||||
- Never start a batch until every selected prompt file for that batch exists on disk.
|
||||
- Retry failed items once without regenerating successful items.
|
||||
- Do not use subagents merely to parallelize image rendering. Use subagents only for separate prompt iteration or creative exploration.
|
||||
|
||||
## Confirmation Policy
|
||||
|
||||
Default behavior: **confirm before generation**.
|
||||
@@ -65,6 +82,7 @@ Respond in the user's language across questions, progress, errors, and completio
|
||||
| `--palette <name>` | Color override: macaron / warm / neon |
|
||||
| `--preset <name>` | Style + layout + optional palette shorthand (see Presets below; per-preset prompt fragments in `references/style-presets.md`) |
|
||||
| `--ref <files...>` | Reference images applied to image 1 as the series anchor |
|
||||
| `--batch-size <n>` | Temporary generation batch size for this run. Default: `generation_batch_size` from EXTEND.md, otherwise 4. Clamp to 1-8. |
|
||||
| `--yes` | Non-interactive: skip all confirmations, use EXTEND.md or built-in defaults, auto-confirm recommended plan (Path A) |
|
||||
|
||||
## Dimensions
|
||||
@@ -300,7 +318,7 @@ Check these paths in order; first hit wins:
|
||||
- **Not found + interactive** → run first-time setup (see `references/config/first-time-setup.md`) and save before anything else. Do NOT analyze content or ask style questions until preferences exist — this keeps first-run behavior predictable.
|
||||
- **Not found + `--yes`** → skip setup, use built-in defaults (no watermark, style/layout auto-selected, language from content). Do not prompt, do not create EXTEND.md.
|
||||
|
||||
**EXTEND.md keys**: watermark, preferred style/layout, custom style definitions, language preference. Schema: `references/config/preferences-schema.md`.
|
||||
**EXTEND.md keys**: watermark, preferred style/layout, custom style definitions, language preference, preferred image backend, generation batch size. Schema: `references/config/preferences-schema.md`.
|
||||
|
||||
### Step 1: Analyze Content → `analysis.md`
|
||||
|
||||
@@ -349,14 +367,13 @@ With confirmed outline + style + layout + palette:
|
||||
|
||||
**Visual consistency — image-1 anchor chain**: character / mascot / color rendering drifts between calls unless you anchor them. Generate image 1 (cover) first WITHOUT `--ref`, then pass image 1 as `--ref` to every subsequent image. This is the single most important consistency trick for this skill — don't skip it even if the backend also supports a session ID.
|
||||
|
||||
For each image (cover, content, ending):
|
||||
Generation flow:
|
||||
|
||||
1. Write the full prompt to `prompts/NN-{type}-{slug}.md` in the user's preferred language (backup rule applies).
|
||||
2. Generate:
|
||||
- **Image 1**: no `--ref` (establishes the anchor).
|
||||
- **Images 2+**: add `--ref <path-to-image-01.png>`.
|
||||
- Backup rule applies to the PNG files.
|
||||
3. Report progress after each image.
|
||||
1. Write the full prompt for every image to `prompts/NN-{type}-{slug}.md` in the user's preferred language (backup rule applies), then verify all selected prompt files exist.
|
||||
2. Generate **image 1** first without `--ref`; backup rule applies to the PNG file. This establishes the anchor.
|
||||
3. Build a task list for **images 2+** using image 1 as `--ref <path-to-image-01.png>`.
|
||||
4. Dispatch images 2+ in batches per the `## Batch Generation Policy`: backend native batch first, runtime parallel tool calls second, sequential only as fallback.
|
||||
5. Report progress after each completed image. On failure, retry only the failed item once from the same saved prompt file.
|
||||
|
||||
**Watermark** (if enabled in EXTEND.md): append to the generation prompt:
|
||||
|
||||
@@ -451,5 +468,6 @@ EXTEND.md lives at the first matching path listed in Step 0. Three ways to chang
|
||||
- `preferred_image_backend: codex-imagegen` — pin to Codex's built-in.
|
||||
- `preferred_image_backend: baoyu-imagine` — pin to the baoyu-imagine skill.
|
||||
- `preferred_image_backend: ask` — confirm backend every run.
|
||||
- `generation_batch_size: 4` — default number of images to render concurrently when the backend/runtime supports batch or parallel generation.
|
||||
- `preferred_style: notion`, `preferred_layout: dense`, `preferred_palette: macaron`, `language: zh`.
|
||||
- `watermark.enabled: true` + `watermark.content: "@handle"` — add a watermark.
|
||||
|
||||
@@ -111,12 +111,15 @@ preferred_style:
|
||||
preferred_layout: null
|
||||
language: null
|
||||
preferred_image_backend: auto
|
||||
generation_batch_size: 4
|
||||
custom_styles: []
|
||||
---
|
||||
```
|
||||
|
||||
`preferred_image_backend: auto` is the baked-in default — first-time setup does not ask about it. The `## Image Generation Tools` rule in SKILL.md then picks the runtime-native tool (Codex `imagegen`, Hermes `image_generate`, etc.) when available, and falls back to installed backends.
|
||||
|
||||
`generation_batch_size: 4` is the baked-in default for batch rendering. The current user request may override it for one run.
|
||||
|
||||
## Modifying Preferences Later
|
||||
|
||||
See the `## Changing Preferences` section in `SKILL.md` for the canonical list of common edits (pin backend, change defaults, retrigger setup). Full schema: `preferences-schema.md`.
|
||||
|
||||
@@ -26,6 +26,8 @@ language: null # zh|en|ja|ko|auto
|
||||
|
||||
preferred_image_backend: auto # auto|ask|<backend-id>
|
||||
|
||||
generation_batch_size: 4 # 1-8, used when backend/runtime supports batch or parallel generation
|
||||
|
||||
custom_styles:
|
||||
- name: my-style
|
||||
description: "Style description"
|
||||
@@ -52,6 +54,7 @@ custom_styles:
|
||||
| `preferred_layout` | string | null | Layout preference or null |
|
||||
| `language` | string | null | Output language (null = auto-detect) |
|
||||
| `preferred_image_backend` | string | `auto` | Image backend selection. `auto` = prefer runtime-native tool, fall back to the only installed backend, ask if multiple non-native are present. `ask` = always confirm on every run. `<backend-id>` (e.g., `codex-imagegen`, `baoyu-imagine`, `image_generate`) = pin this backend when available; fall back to `auto` when it isn't. Absent = `auto`. Resolution logic is documented in `SKILL.md`'s `## Image Generation Tools` section. |
|
||||
| `generation_batch_size` | int | 4 | Number of images to dispatch per batch when the backend has native batch support or the runtime can issue parallel generation calls. Clamp invalid values to 1-8. Current user request overrides this value. |
|
||||
| `custom_styles` | array | [] | User-defined styles |
|
||||
|
||||
## Position Options
|
||||
@@ -109,6 +112,8 @@ language: zh
|
||||
|
||||
preferred_image_backend: codex-imagegen
|
||||
|
||||
generation_batch_size: 4
|
||||
|
||||
custom_styles:
|
||||
- name: corporate
|
||||
description: "Professional B2B style"
|
||||
|
||||
Reference in New Issue
Block a user