{"slug":"baoyu-comic","title":"\u77e5\u8bc6\u6f2b\u753b","description":"\u628a\u77e5\u8bc6\u5185\u5bb9\u505a\u6210\u591a\u753b\u98ce\u3001\u591a\u8bed\u6c14\u7684\u539f\u521b\u79d1\u666e\u6f2b\u753b\u3002","category":"\u526a\u8f91\u4e0e\u5305\u88c5","tags":["\u6f2b\u753b","\u79d1\u666e","\u89c6\u89c9"],"author":"\u5b9d\u7389","source_url":"https://github.com/JimLiu/baoyu-skills/blob/main/skills/baoyu-comic/SKILL.md","license":"MIT","status":"published","verification":"source_reviewed","verification_notes":"\u6765\u6e90 JimLiu/baoyu-skills\uff08skills/baoyu-comic/SKILL.md\uff09\uff0c\u672c\u5730\u6253\u5305\u4e0a\u4f20\uff1b\u672a\u6267\u884c\u5305\u5185\u811a\u672c\u3002","revision":"c284b0523b7741bf82b678862d367ca6","created_at":"2026-10-28T08:05:08+00:00","updated_at":"2026-10-28T08:05:16+00:00","source_repo":"","source_path":"","source_commit":"","source_updated_at":"","stars":0,"proxy_score":null,"score":null,"grade":null,"dimensions":{},"evaluation":{},"installs":0,"platforms":[],"formats":[],"category_slug":"packaging","category_name":"\u526a\u8f91\u4e0e\u5305\u88c5","usage_guide":{},"read_url":"https://shiliuai.cn/api/v2/skills/baoyu-comic","skill_url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/SKILL.md","download_url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/download","install_url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/install","files":[{"path":"SKILL.md","bytes":22517,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/SKILL.md"},{"path":"references/analysis-framework.md","bytes":5441,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/analysis-framework.md"},{"path":"references/art-styles/chalk.md","bytes":2790,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/art-styles/chalk.md"},{"path":"references/art-styles/ink-brush.md","bytes":2569,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/art-styles/ink-brush.md"},{"path":"references/art-styles/ligne-claire.md","bytes":2384,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/art-styles/ligne-claire.md"},{"path":"references/art-styles/manga.md","bytes":2608,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/art-styles/manga.md"},{"path":"references/art-styles/minimalist.md","bytes":3402,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/art-styles/minimalist.md"},{"path":"references/art-styles/realistic.md","bytes":2775,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/art-styles/realistic.md"},{"path":"references/auto-selection.md","bytes":3613,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/auto-selection.md"},{"path":"references/base-prompt.md","bytes":3140,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/base-prompt.md"},{"path":"references/character-template.md","bytes":4876,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/character-template.md"},{"path":"references/codex-imagegen.md","bytes":3729,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/codex-imagegen.md"},{"path":"references/config/first-time-setup.md","bytes":4389,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/config/first-time-setup.md"},{"path":"references/config/preferences-schema.md","bytes":5671,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/config/preferences-schema.md"},{"path":"references/config/watermark-guide.md","bytes":2443,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/config/watermark-guide.md"},{"path":"references/layouts/cinematic.md","bytes":450,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/layouts/cinematic.md"},{"path":"references/layouts/dense.md","bytes":415,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/layouts/dense.md"},{"path":"references/layouts/four-panel.md","bytes":1388,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/layouts/four-panel.md"},{"path":"references/layouts/mixed.md","bytes":429,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/layouts/mixed.md"},{"path":"references/layouts/splash.md","bytes":471,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/layouts/splash.md"},{"path":"references/layouts/standard.md","bytes":440,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/layouts/standard.md"},{"path":"references/layouts/webtoon.md","bytes":778,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/layouts/webtoon.md"},{"path":"references/ohmsha-guide.md","bytes":2933,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/ohmsha-guide.md"},{"path":"references/partial-workflows.md","bytes":2966,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/partial-workflows.md"},{"path":"references/presets/concept-story.md","bytes":5642,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/presets/concept-story.md"},{"path":"references/presets/four-panel.md","bytes":4660,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/presets/four-panel.md"},{"path":"references/presets/ohmsha.md","bytes":4494,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/presets/ohmsha.md"},{"path":"references/presets/shoujo.md","bytes":3271,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/presets/shoujo.md"},{"path":"references/presets/wuxia.md","bytes":2970,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/presets/wuxia.md"},{"path":"references/storyboard-template.md","bytes":3982,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/storyboard-template.md"},{"path":"references/tones/action.md","bytes":2269,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/tones/action.md"},{"path":"references/tones/dramatic.md","bytes":1913,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/tones/dramatic.md"},{"path":"references/tones/energetic.md","bytes":2173,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/tones/energetic.md"},{"path":"references/tones/neutral.md","bytes":1356,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/tones/neutral.md"},{"path":"references/tones/romantic.md","bytes":2143,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/tones/romantic.md"},{"path":"references/tones/vintage.md","bytes":2162,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/tones/vintage.md"},{"path":"references/tones/warm.md","bytes":1862,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/tones/warm.md"},{"path":"references/workflow.md","bytes":19662,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/references/workflow.md"},{"path":"scripts/merge-to-pdf.ts","bytes":3142,"url":"https://shiliuai.cn/api/v2/skills/baoyu-comic/files/scripts/merge-to-pdf.ts"}],"content":"---\nname: baoyu-comic\ndescription: 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 \"\u77e5\u8bc6\u6f2b\u753b\", \"\u6559\u80b2\u6f2b\u753b\", \"biography comic\", \"tutorial comic\", or \"Logicomix-style comic\".\nversion: 1.117.4\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-comic\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Knowledge Comic Creator\n\nCreate original knowledge comics with flexible art style \u00d7 tone combinations.\n\n## User Input Tools\n\nWhen this skill prompts the user, follow this tool-selection rule (priority order):\n\n1. **Prefer built-in user-input tools** exposed by the current agent runtime \u2014 e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent.\n2. **Fallback**: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question.\n3. **Batching**: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.\n\nConcrete `AskUserQuestion` references below are examples \u2014 substitute the local equivalent in other runtimes.\n\n## Image Generation Tools\n\nWhen this skill needs to render an image, resolve the backend in this order:\n\n1. **Current-request override** \u2014 if the user names a specific backend in the current message, use it.\n2. **Saved preference** \u2014 if `EXTEND.md` sets `preferred_image_backend` to a backend available right now, use it.\n3. **Auto-select** (when the preference is `auto`, unset, or the pinned backend isn't available):\n   - **Codex (`imagegen`)** \u2014 first, inspect your available-skills / tool inventory. If a skill named `imagegen` is listed, you are running inside Codex and MUST use it: invoke via the `Skill` tool with `skill: \"imagegen\"`, passing the saved prompt file's content (plus output path and aspect ratio per Codex `imagegen`'s own args). Codex `imagegen` is the official raster backend in that runtime and outranks any non-native skill (e.g., `baoyu-image-gen`) unless the user has explicitly pinned a different `preferred_image_backend`.\n   - **Codex via `codex exec` (`codex-imagegen`)** \u2014 if the current runtime exposes no native `imagegen` skill but the `codex` CLI is on `PATH` with an active `codex login`, route through `baoyu-image-gen --provider codex-cli` (preferred), or \u2014 if baoyu-image-gen is unavailable \u2014 invoke the bundled wrapper directly. Details, parameters, and the runtime-discovery procedure live in [references/codex-imagegen.md](references/codex-imagegen.md) \u2014 load that file only when this branch is selected.\n   - **Cursor (`GenerateImage`)** \u2014 if the runtime exposes a native `GenerateImage` tool, you are running inside Cursor and it outranks any non-native skill the same way Codex `imagegen` does. Two hard caveats: (a) it has no aspect-ratio parameter \u2014 state the target aspect ratio / dimensions explicitly in the prompt text passed as `description`; (b) it does not accept an output directory \u2014 it saves to a tool-managed location, so after generation copy/move the file to the skill's expected output path (e.g., `outputs/.../NN-xxx.png`). Reference images go in `reference_image_paths`.\n   - **Other runtime-native tools** \u2014 if the runtime exposes a different native image tool (e.g., Hermes `image_generate`), use it the same way.\n   - Otherwise, if exactly one non-native backend is installed (e.g., `baoyu-image-gen`), use it.\n   - Otherwise (multiple non-native backends with no runtime-native tool), ask the user once \u2014 batch with any other initial questions.\n4. **If none are available**, tell the user and ask how to proceed.\n\n**\u26d4 Never substitute SVG, HTML, canvas, or other code-based rendering for raster image generation.** Codex `imagegen`'s own description says it should be used \"when the output should be a bitmap asset rather than repo-native code or vector.\" If you cannot resolve a raster backend via step 3, fall through to step 4 and ask the user \u2014 do **not** silently emit SVG, write inline `<svg>` markup, or produce HTML/CSS art as a substitute. This applies even if the article/section seems \"diagram-like\": the consumer skill calling this rule has already decided that a raster image is what it needs.\n\n**\u26d4 Never repair rendered text by painting over a generated bitmap.** Do not use ImageMagick, Pillow, Canvas, SVG, HTML/CSS, OCR scripts, or any other programmatic overlay to cover, rewrite, erase, stroke, or replace dialogue, sound effects, panel labels, or any other text inside an already generated comic page. If text is wrong or unclear, regenerate from a corrected prompt, redraw the page with less or no on-image text, or ask the user which imperfect candidate to keep.\n\nSetting `preferred_image_backend: ask` forces the step-3 prompt every run regardless of available backends. Users change the pinned backend via the `## Changing Preferences` section below.\n\n**Prompt file requirement (hard)**: write each image's full, final prompt to a standalone file under `prompts/` (naming: `NN-{type}-[slug].md`) BEFORE invoking any backend. The backend receives the prompt file (or its content); the file is the reproducibility record and lets you switch backends without regenerating prompts.\n\nConcrete tool names (`imagegen`, `GenerateImage`, `image_generate`, `baoyu-image-gen`) above are examples \u2014 substitute the local equivalents under the same rule.\n\n## Batch Generation Policy\n\nAfter every prompt file for the current generation group has been saved and verified, generate images in batches by default.\n\nPriority order:\n\n1. 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.\n2. 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 \"\u5e76\u884c4\u5f20\u4e00\u8d77\u751f\u6210\", overrides EXTEND.md.\n3. If neither native batch nor parallel tool calls are available, generate sequentially.\n\nRules:\n\n- Honor workflow dependencies first: generate `characters/characters.png` before pages that use it as a reference.\n- Never start the first page batch until all selected page prompt files exist on disk.\n- Retry failed items once without regenerating successful items.\n- Do not use subagents merely to parallelize image rendering. Use subagents only for separate prompt iteration or creative exploration.\n\n## Reference Images\n\nUsers 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) \u2014 both can coexist: user refs guide the look, the character sheet anchors recurring character identity.\n\n**Intake**: Accept via `--ref <files...>` or when the user provides file paths / pastes images in conversation.\n- File path(s) \u2192 copy to `refs/NN-ref-{slug}.{ext}` alongside the comic output\n- Pasted image with no path \u2192 ask the user for the path (per the User Input Tools rule above), or extract style traits verbally as a text fallback\n- No reference \u2192 skip this section\n\n**Usage modes** (per reference):\n\n| Usage | Effect |\n|-------|--------|\n| `direct` | Pass the file to the backend as a reference image on every page (or selected pages) |\n| `style` | Extract style traits (line treatment, texture, mood) and append to every page's prompt body |\n| `palette` | Extract hex colors and append to every page's prompt body |\n\n**Record in each page's prompt frontmatter** when refs exist:\n\n```yaml\nreferences:\n  - ref_id: 01\n    filename: 01-ref-scene.png\n    usage: direct\n```\n\n**At generation time**:\n- Verify each referenced file exists on disk\n- If `usage: direct` AND the chosen backend accepts multiple reference images \u2192 pass both the character sheet (Step 7.2) and the user refs via the backend's ref parameter; compress images first per Step 7.1's guidance to avoid payload failures\n- If the backend accepts only one ref \u2192 prefer the character sheet for pages with recurring characters; embed user-ref traits in the prompt body instead\n- For `style`/`palette` usage \u2192 embed extracted traits in every page's prompt text (applies regardless of backend capability)\n\n## Options\n\n### Visual Dimensions\n\n| Option | Values | Description |\n|--------|--------|-------------|\n| `--art` | ligne-claire (default), manga, realistic, ink-brush, chalk, minimalist | Art style / rendering technique |\n| `--tone` | neutral (default), warm, dramatic, romantic, energetic, vintage, action | Mood / atmosphere |\n| `--layout` | standard (default), cinematic, dense, splash, mixed, webtoon, four-panel | Panel arrangement |\n| `--aspect` | 3:4 (default, portrait), 4:3 (landscape), 16:9 (widescreen) | Page aspect ratio |\n| `--lang` | auto (default), zh, en, ja, etc. | Output language |\n| `--ref <files...>` | File paths | Reference images applied to every page for style / palette / scene guidance. See [Reference Images](#reference-images) above. |\n| `--batch-size <n>` | 1-8 | Temporary page generation batch size for this run. Default: `generation_batch_size` from EXTEND.md, otherwise 4. |\n\n### Partial Workflow Options\n\n| Option | Description |\n|--------|-------------|\n| `--storyboard-only` | Generate storyboard only, skip prompts and images |\n| `--prompts-only` | Generate storyboard + prompts, skip images |\n| `--images-only` | Generate images from existing prompts directory |\n| `--regenerate N` | Regenerate specific page(s) only (e.g., `3` or `2,5,8`) |\n\nDetails: [references/partial-workflows.md](references/partial-workflows.md)\n\n### Art, Tone & Preset Catalogue\n\n- **Art styles** (6): `ligne-claire`, `manga`, `realistic`, `ink-brush`, `chalk`, `minimalist`. Full definitions at `references/art-styles/<style>.md`.\n- **Tones** (7): `neutral`, `warm`, `dramatic`, `romantic`, `energetic`, `vintage`, `action`. Full definitions at `references/tones/<tone>.md`.\n- **Presets** (5) with special rules beyond plain art+tone:\n\n  | Preset | Equivalent | Hook |\n  |--------|-----------|------|\n  | `ohmsha` | manga + neutral | Visual metaphors, no talking heads, gadget reveals |\n  | `wuxia` | ink-brush + action | Qi effects, combat visuals, atmospheric |\n  | `shoujo` | manga + romantic | Decorative elements, eye details, romantic beats |\n  | `concept-story` | manga + warm | Visual symbol system, growth arc, dialogue+action balance |\n  | `four-panel` | minimalist + neutral + four-panel layout | \u8d77\u627f\u8f6c\u5408 structure, B&W + spot color, stick-figure characters |\n\n  Full rules at `references/presets/<preset>.md` \u2014 load the file when a preset is picked.\n\n- **Compatibility matrix** and **content-signal \u2192 preset** table live in [references/auto-selection.md](references/auto-selection.md). Read it before recommending combinations in Step 2.\n\n## Script Directory\n\n**Important**: All scripts are located in the `scripts/` subdirectory of this skill.\n\n**Agent Execution Instructions**:\n1. Determine this SKILL.md file's directory path as `{baseDir}`\n2. Script path = `{baseDir}/scripts/<script-name>.ts`\n3. Replace all `{baseDir}` in this document with the actual path\n4. Resolve `${BUN_X}` runtime: if `bun` installed \u2192 `bun`; if `npx` available \u2192 `npx -y bun`; else suggest installing bun\n\n**Script Reference**:\n| Script | Purpose |\n|--------|---------|\n| `scripts/merge-to-pdf.ts` | Merge comic pages into PDF |\n\n## File Structure\n\nOutput directory: `comic/{topic-slug}/`\n- Slug: 2-4 words kebab-case from topic (e.g., `alan-turing-bio`)\n- Conflict: append timestamp (e.g., `turing-story-20260118-143052`)\n\n**Contents**:\n| File | Description |\n|------|-------------|\n| `source-{slug}.{ext}` | Source files |\n| `analysis.md` | Content analysis |\n| `storyboard.md` | Storyboard with panel breakdown |\n| `characters/characters.md` | Character definitions |\n| `characters/characters.png` | Character reference sheet |\n| `prompts/NN-{cover\\|page}-[slug].md` | Generation prompts |\n| `NN-{cover\\|page}-[slug].png` | Generated images |\n| `{topic-slug}.pdf` | Final merged PDF |\n\n## Language Handling\n\n**Detection Priority**:\n1. `--lang` flag (explicit)\n2. EXTEND.md `language` setting\n3. User's conversation language\n4. Source content language\n\n**Rule**: Use user's input language or saved language preference for ALL interactions:\n- Storyboard outlines and scene descriptions\n- Image generation prompts\n- User selection options and confirmations\n- Progress updates, questions, errors, summaries\n\nTechnical terms remain in English.\n\n## Workflow\n\n### Progress Checklist\n\n```\nComic Progress:\n- [ ] Step 1: Setup & Analyze\n  - [ ] 1.1 Preferences (EXTEND.md) \u26d4 BLOCKING\n    - [ ] Found \u2192 load preferences \u2192 continue\n    - [ ] Not found \u2192 run first-time setup \u2192 MUST complete before other steps\n  - [ ] 1.2 Analyze, 1.3 Check existing\n- [ ] Step 2: Confirmation - Style & options \u26a0\ufe0f REQUIRED\n- [ ] Step 3: Generate storyboard + characters\n- [ ] Step 4: Review outline (conditional)\n- [ ] Step 5: Generate prompts\n- [ ] Step 6: Review prompts (conditional)\n- [ ] Step 7: Generate images\n  - [ ] 7.1 Generate character sheet (if needed) \u2192 characters/characters.png\n  - [ ] 7.2 Generate pages (with --ref if character sheet exists)\n- [ ] Step 8: Merge to PDF\n- [ ] Step 9: Completion report\n```\n\n### Flow\n\n```\nInput \u2192 [Preferences] \u2500\u252c\u2500 Found \u2192 Continue\n                       \u2502\n                       \u2514\u2500 Not found \u2192 First-Time Setup \u26d4 BLOCKING\n                                      \u2502\n                                      \u2514\u2500 Complete setup \u2192 Save EXTEND.md \u2192 Continue\n                                                                              \u2502\n        \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n        \u2193\nAnalyze \u2192 [Check Existing?] \u2192 [Confirm: Style + Reviews] \u2192 Storyboard \u2192 [Review?] \u2192 Prompts \u2192 [Review?] \u2192 Images \u2192 PDF \u2192 Complete\n```\n\n### Step Summary\n\n| Step | Action | Key Output |\n|------|--------|------------|\n| 1.1 | Load EXTEND.md preferences \u26d4 BLOCKING if not found | Config loaded |\n| 1.2 | Analyze content | `analysis.md` |\n| 1.3 | Check existing directory | Handle conflicts |\n| 2 | Confirm style, focus, audience, reviews | User preferences |\n| 3 | Generate storyboard + characters | `storyboard.md`, `characters/` |\n| 4 | Review outline (if requested) | User approval |\n| 5 | Generate prompts | `prompts/*.md` |\n| 6 | Review prompts (if requested) | User approval |\n| 7.1 | Generate character sheet (if needed) | `characters/characters.png` |\n| 7.2 | Generate pages (with character ref if available) | `*.png` files |\n| 8 | Merge to PDF | `{slug}.pdf` |\n| 9 | Completion report | Summary |\n\n### Step 7: Image Generation\n\n**Pick a backend once per session** using the `## Image Generation Tools` rule at the top. If the backend is a repo skill (e.g., `baoyu-image-gen`), read its `SKILL.md` and use its documented interface rather than its scripts.\n\n**`codex-imagegen` invocation**: when the rule resolves to `codex-imagegen`, see [references/codex-imagegen.md](references/codex-imagegen.md) for the invocation contract (preferred `baoyu-image-gen --provider codex-cli` path, runtime wrapper discovery, parameter notes, stdout schema, batch semantics \u2014 n=1 per call so page batches must dispatch one wrapper call per page).\n\n**7.1 Character sheet** \u2014 generate it (to `characters/characters.png`, aspect `4:3`) when the comic is multi-page with recurring characters. Skip for simple presets (e.g., four-panel minimalist) or single-page comics. Compress to JPEG before use-as-`--ref` (`sips -s format jpeg -s formatOptions 80 \u2026` on macOS, `pngquant --quality=65-80 \u2026` elsewhere) to avoid payload failures. The prompt file at `characters/characters.md` must exist before invoking the backend.\n\n**7.2 Pages** \u2014 each page's prompt MUST already be at `prompts/NN-{cover|page}-[slug].md` before invoking the backend; the file is the reproducibility record. Strategy depends on the character sheet:\n\n| Character sheet | Backend `--ref` | Strategy |\n|-----------------|-----------------|----------|\n| Exists | Supported | Pass sheet as `--ref` on every page |\n| Exists | Not supported | Prepend character descriptions to every prompt file |\n| Skipped | \u2014 | All descriptions inline in prompt |\n\n**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.\n\n**Backup rule**: existing `prompts/\u2026md` and `\u2026png` files \u2192 rename with `-backup-YYYYMMDD-HHMMSS` suffix before regenerating. Aspect ratio from storyboard (default `3:4`; preset may override).\n\n**`--ref` failure recovery**: compress sheet \u2192 retry \u2192 still fails \u2192 drop `--ref` and embed character descriptions in the prompt text.\n\nFull step-by-step workflow (analysis, storyboard, review gates, regeneration variants): [references/workflow.md](references/workflow.md).\n\n### EXTEND.md Paths \u26d4 BLOCKING\n\nIf EXTEND.md is not found, first-time setup is **blocking** \u2014 complete it before any content analysis or style/tone questions.\n\n| Priority | Path | Scope |\n|----------|------|-------|\n| 1 | `.baoyu-skills/baoyu-comic/EXTEND.md` | Project |\n| 2 | `$HOME/.baoyu-skills/baoyu-comic/EXTEND.md` | User home |\n\n| Result | Action |\n|--------|--------|\n| Found | Read, parse, display summary \u2192 continue |\n| Not found | \u26d4 Run first-time setup ([references/config/first-time-setup.md](references/config/first-time-setup.md)) \u2192 save EXTEND.md \u2192 continue |\n\n**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).\n\n## References\n\n**Core Templates**:\n- [analysis-framework.md](references/analysis-framework.md) - Deep content analysis\n- [character-template.md](references/character-template.md) - Character definition format\n- [storyboard-template.md](references/storyboard-template.md) - Storyboard structure\n- [ohmsha-guide.md](references/ohmsha-guide.md) - Ohmsha manga specifics\n\n**Style Definitions**:\n- `references/art-styles/` - Art styles (ligne-claire, manga, realistic, ink-brush, chalk, minimalist)\n- `references/tones/` - Tones (neutral, warm, dramatic, romantic, energetic, vintage, action)\n- `references/presets/` - Presets with special rules (ohmsha, wuxia, shoujo, concept-story, four-panel)\n- `references/layouts/` - Layouts (standard, cinematic, dense, splash, mixed, webtoon, four-panel)\n\n**Workflow**:\n- [workflow.md](references/workflow.md) - Full workflow details\n- [auto-selection.md](references/auto-selection.md) - Content signal analysis\n- [partial-workflows.md](references/partial-workflows.md) - Partial workflow options\n\n**Config**:\n- [config/preferences-schema.md](references/config/preferences-schema.md) - EXTEND.md schema\n- [config/first-time-setup.md](references/config/first-time-setup.md) - First-time setup\n- [config/watermark-guide.md](references/config/watermark-guide.md) - Watermark configuration\n\n## Page Modification\n\n| Action | Steps |\n|--------|-------|\n| **Edit** | **Update prompt file FIRST** \u2192 `--regenerate N` \u2192 Regenerate PDF |\n| **Add** | Create prompt at position \u2192 Generate with character ref \u2192 Renumber subsequent \u2192 Update storyboard \u2192 Regenerate PDF |\n| **Delete** | Remove files \u2192 Renumber subsequent \u2192 Update storyboard \u2192 Regenerate PDF |\n\n**IMPORTANT**: When updating pages, ALWAYS update the prompt file (`prompts/NN-{cover|page}-[slug].md`) FIRST before regenerating. This ensures changes are documented and reproducible.\n\nText correction policy:\n\n- If dialogue, sound effects, panel labels, or any other rendered text is misspelled, garbled, hard to read, or visually weak, do not patch the bitmap with code.\n- For text-correction regenerations, write a new prompt file and a new output path so the flawed candidate is preserved for comparison.\n- Post-processing is limited to crop, resize, compression, or format conversion that does not alter text or the main composition.\n\n## Notes\n\n- Image generation: 10-30 seconds per page\n- Auto-retry once on generation failure\n- Use stylized alternatives for sensitive public figures\n- Maintain style consistency via session ID\n- **Step 2 confirmation required** - do not skip\n- **Steps 4/6 conditional** - only if user requested in Step 2\n- **Step 7.1 character sheet** - recommended for multi-page comics, optional for simple presets\n- **Step 7.2 character reference** - use `--ref` if sheet exists; compress/convert on failure; fall back to prompt-only\n- Watermark/language configured once in EXTEND.md\n\n## Changing Preferences\n\nEXTEND.md lives at `.baoyu-skills/baoyu-comic/EXTEND.md` (project) or `~/.baoyu-skills/baoyu-comic/EXTEND.md` (user). Three ways to change it:\n\n- **Edit directly** \u2014 open EXTEND.md and change fields. Full schema: `references/config/preferences-schema.md`.\n- **Reconfigure interactively** \u2014 delete EXTEND.md (or ask \"reconfigure baoyu-comic preferences\" / \"\u91cd\u65b0\u914d\u7f6e\"). The next run re-triggers first-time setup.\n- **Common one-line edits**:\n  - `preferred_image_backend: auto` \u2014 default; runtime-native tool wins, falls back to the only installed backend, asks only if multiple non-native are present.\n  - `preferred_image_backend: codex-imagegen` \u2014 pin to Codex's built-in.\n  - `preferred_image_backend: baoyu-image-gen` \u2014 pin to the baoyu-image-gen skill.\n  - `preferred_image_backend: ask` \u2014 confirm backend every run.\n  - `generation_batch_size: 4` \u2014 default number of page images to render concurrently when the backend/runtime supports batch or parallel generation.\n  - `watermark.enabled: true`, `preferred_art`, `preferred_tone`, `preferred_layout`, `language` \u2014 shift the auto-selection defaults and cosmetic choices.\n","usage":"\u8bfb\u53d6 SKILL.md\uff0c\u5e76\u6309\u9700\u8bfb\u53d6\u914d\u5957\u6587\u4ef6\uff1b\u4e0b\u8f7d ZIP \u83b7\u53d6\u5b8c\u6574\u5305\u3002\u6280\u80fd\u662f\u4efb\u52a1\u65b9\u6cd5\uff0c\u4e0d\u6388\u4e88\u65b0\u589e\u8d26\u6237\u3001\u4ed8\u8d39\u6216\u7cfb\u7edf\u6743\u9650\u3002"}
