{"slug":"jimliu-baoyu-skills-baoyu-slide-deck","title":"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\".","category":"\u526a\u8f91\u4e0e\u5305\u88c5","tags":["agent-skills","claude-skills","codex-skills","openclaw-skills"],"author":"JimLiu","source_url":"https://github.com/JimLiu/baoyu-skills/blob/1567581c26ec29f4216c6e6835415bf30343b0e3/skills/baoyu-slide-deck/SKILL.md","license":"MIT","status":"published","verification":"source_reviewed","verification_notes":"\u81ea\u52a8\u5bfc\u5165\uff1a\u6765\u6e90\u3001\u8bb8\u53ef\u3001\u5305\u7ed3\u6784\u5df2\u6838\u5bf9\uff1b\u672a\u6267\u884c\u5305\u5185\u811a\u672c\u3002","revision":"7c13d4ef748b4e3cb2c2170369a93175","created_at":"2026-10-28T07:42:12+00:00","updated_at":"2026-10-28T07:42:12+00:00","source_repo":"JimLiu/baoyu-skills","source_path":"skills/baoyu-slide-deck/SKILL.md","source_commit":"1567581c26ec29f4216c6e6835415bf30343b0e3","source_updated_at":"2026-09-10T15:13:43Z","stars":27020,"proxy_score":null,"score":null,"grade":null,"dimensions":{},"evaluation":{},"installs":0,"platforms":["universal"],"formats":["universal"],"category_slug":"packaging","category_name":"\u526a\u8f91\u4e0e\u5305\u88c5","usage_guide":{},"read_url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck","skill_url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/SKILL.md","download_url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/download","install_url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/install","files":[{"path":"SKILL.md","bytes":23350,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/SKILL.md"},{"path":"references/analysis-framework.md","bytes":5241,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/analysis-framework.md"},{"path":"references/base-prompt.md","bytes":2844,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/base-prompt.md"},{"path":"references/codex-imagegen.md","bytes":3715,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/codex-imagegen.md"},{"path":"references/config/preferences-schema.md","bytes":3967,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/config/preferences-schema.md"},{"path":"references/confirmation.md","bytes":4854,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/confirmation.md"},{"path":"references/content-rules.md","bytes":2986,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/content-rules.md"},{"path":"references/design-guidelines.md","bytes":7581,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/design-guidelines.md"},{"path":"references/dimensions/density.md","bytes":3126,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/dimensions/density.md"},{"path":"references/dimensions/mood.md","bytes":4106,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/dimensions/mood.md"},{"path":"references/dimensions/presets.md","bytes":5133,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/dimensions/presets.md"},{"path":"references/dimensions/texture.md","bytes":1938,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/dimensions/texture.md"},{"path":"references/dimensions/typography.md","bytes":4062,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/dimensions/typography.md"},{"path":"references/layouts.md","bytes":3086,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/layouts.md"},{"path":"references/modification-guide.md","bytes":2467,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/modification-guide.md"},{"path":"references/outline-template.md","bytes":7599,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/outline-template.md"},{"path":"references/styles/blueprint.md","bytes":2277,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/blueprint.md"},{"path":"references/styles/bold-editorial.md","bytes":2409,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/bold-editorial.md"},{"path":"references/styles/chalkboard.md","bytes":2512,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/chalkboard.md"},{"path":"references/styles/corporate.md","bytes":2346,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/corporate.md"},{"path":"references/styles/dark-atmospheric.md","bytes":2435,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/dark-atmospheric.md"},{"path":"references/styles/editorial-infographic.md","bytes":2450,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/editorial-infographic.md"},{"path":"references/styles/fantasy-animation.md","bytes":2474,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/fantasy-animation.md"},{"path":"references/styles/hand-drawn-edu.md","bytes":2905,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/hand-drawn-edu.md"},{"path":"references/styles/intuition-machine.md","bytes":2870,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/intuition-machine.md"},{"path":"references/styles/minimal.md","bytes":2036,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/minimal.md"},{"path":"references/styles/notion.md","bytes":2133,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/notion.md"},{"path":"references/styles/pixel-art.md","bytes":2446,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/pixel-art.md"},{"path":"references/styles/scientific.md","bytes":2448,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/scientific.md"},{"path":"references/styles/sketch-notes.md","bytes":2463,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/sketch-notes.md"},{"path":"references/styles/vector-illustration.md","bytes":2646,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/vector-illustration.md"},{"path":"references/styles/vintage.md","bytes":2499,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/vintage.md"},{"path":"references/styles/watercolor.md","bytes":2349,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/references/styles/watercolor.md"},{"path":"scripts/merge-to-pdf.ts","bytes":3222,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/scripts/merge-to-pdf.ts"},{"path":"scripts/merge-to-pptx.ts","bytes":3918,"url":"https://shiliuai.cn/api/v2/skills/jimliu-baoyu-skills-baoyu-slide-deck/files/scripts/merge-to-pptx.ts"}],"content":"---\nname: baoyu-slide-deck\ndescription: 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\".\nversion: 1.117.4\nmetadata:\n  openclaw:\n    homepage: https://github.com/JimLiu/baoyu-skills#baoyu-slide-deck\n    requires:\n      anyBins:\n        - bun\n        - npx\n---\n\n# Slide Deck Generator\n\nTransform content into professional slide deck images. The deck is designed for **reading and sharing** (self-explanatory slides, logical scroll flow, social-media-friendly) rather than live presentation \u2014 that assumption drives every layout and density decision below.\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 slide titles, bullets, or any other text inside an already generated slide image. If text is wrong or unclear, regenerate from a corrected prompt, simplify the slide's 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-slide-[slug].md`) BEFORE invoking any backend. 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 slide 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` slide 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- Never start the first batch until all selected slide 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- Merge PPTX/PDF only after all selected slide images are generated.\n\n## Confirmation Policy\n\nDefault behavior: **confirm before generation**.\n\n- Treat explicit skill invocation, a file path, matched signals/presets, and `EXTEND.md` defaults as **recommendation inputs only**. None of them authorizes skipping confirmation.\n- Do **not** start Step 3 or later until the user completes Step 2.\n- Skip confirmation only when the current request explicitly says to do so, for example: \"\u76f4\u63a5\u751f\u6210\", \"\u4e0d\u7528\u786e\u8ba4\", \"\u8df3\u8fc7\u786e\u8ba4\", \"\u6309\u9ed8\u8ba4\u51fa\u5e7b\u706f\u7247\", or equivalent wording.\n- If confirmation is skipped explicitly, state the assumed style / audience / slide-count / language / backend in the next user-facing update before generating.\n\n## Language\n\nRespond in the user's language across questions, progress reports, error messages, and the completion summary. Keep technical tokens (style names, file paths, code) in English.\n\n## Script Directory\n\n`{baseDir}` = this SKILL.md's directory. Resolve `${BUN_X}`: prefer `bun`; else `npx -y bun`; else suggest `brew install oven-sh/bun/bun`.\n\n| Script | Purpose |\n|--------|---------|\n| `scripts/merge-to-pptx.ts` | Merge slides into PowerPoint |\n| `scripts/merge-to-pdf.ts` | Merge slides into PDF |\n\n## Options\n\n| Option | Description |\n|--------|-------------|\n| `--style <name>` | Preset (see Presets below), `custom`, or custom style name |\n| `--audience <type>` | beginners / intermediate / experts / executives / general |\n| `--lang <code>` | Output language (en, zh, ja, ...) |\n| `--slides <N>` | Target slide count (8-25 recommended, max 30) |\n| `--ref <files...>` | Reference images applied per slide (style / palette / composition / subject) |\n| `--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. |\n| `--outline-only` | Stop after outline |\n| `--prompts-only` | Stop after prompts (skip image generation) |\n| `--images-only` | Skip to Step 7; requires existing `prompts/` |\n| `--regenerate <N>` | Regenerate specific slide(s): `3` or `2,5,8` |\n\n## Style System\n\n17 presets covering technical / educational / lifestyle / editorial use cases. Every preset is a combination of four dimensions (texture / mood / typography / density). If the user picks \"Custom dimensions\" in Round 1, Round 2 of the confirmation asks one question per dimension \u2014 options and verbatim copy live in `references/confirmation.md`.\n\n### Presets (17)\n\n| Preset | Dimensions | Best For |\n|--------|------------|----------|\n| `blueprint` (Default) | grid + cool + technical + balanced | Architecture, system design |\n| `chalkboard` | organic + warm + handwritten + balanced | Education, tutorials |\n| `corporate` | clean + professional + geometric + balanced | Investor decks, proposals |\n| `minimal` | clean + neutral + geometric + minimal | Executive briefings |\n| `sketch-notes` | organic + warm + handwritten + balanced | Educational, tutorials |\n| `hand-drawn-edu` | organic + macaron + handwritten + balanced | Educational diagrams, process explainers |\n| `watercolor` | organic + warm + humanist + minimal | Lifestyle, wellness |\n| `dark-atmospheric` | clean + dark + editorial + balanced | Entertainment, gaming |\n| `notion` | clean + neutral + geometric + dense | Product demos, SaaS |\n| `bold-editorial` | clean + vibrant + editorial + balanced | Product launches, keynotes |\n| `editorial-infographic` | clean + cool + editorial + dense | Tech explainers, research |\n| `fantasy-animation` | organic + vibrant + handwritten + minimal | Educational storytelling |\n| `intuition-machine` | clean + cool + technical + dense | Technical docs, academic |\n| `pixel-art` | pixel + vibrant + technical + balanced | Gaming, developer talks |\n| `scientific` | clean + cool + technical + dense | Biology, chemistry, medical |\n| `vector-illustration` | clean + vibrant + humanist + balanced | Creative, children's content |\n| `vintage` | paper + warm + editorial + balanced | Historical, heritage |\n\nPer-preset specs: `references/styles/<preset>.md`. Preset \u2192 dimension mapping: `references/dimensions/presets.md`.\n\n### Dimensions (when \"Custom dimensions\" picked)\n\n| Dimension | Options | Purpose |\n|-----------|---------|---------|\n| **Texture** | clean, grid, organic, pixel, paper | Background treatment |\n| **Mood** | professional, warm, cool, vibrant, dark, neutral, macaron | Color temperature |\n| **Typography** | geometric, humanist, handwritten, editorial, technical | Headline/body styling |\n| **Density** | minimal, balanced, dense | Information per slide |\n\nFull per-dimension specs: `references/dimensions/*.md`.\n\n### Auto-Selection\n\nMatch content signals to a preset. Pick the first row whose signal keywords appear in the source; fall back to `blueprint` if nothing matches.\n\n| Signals in source | Preset |\n|-------------------|--------|\n| tutorial, learn, education, guide, beginner | `sketch-notes` |\n| hand-drawn, infographic, diagram, process, onboarding | `hand-drawn-edu` |\n| classroom, teaching, school, chalkboard | `chalkboard` |\n| architecture, system, data, analysis, technical | `blueprint` |\n| creative, children, kids, cute | `vector-illustration` |\n| briefing, academic, research, bilingual | `intuition-machine` |\n| executive, minimal, clean, simple | `minimal` |\n| saas, product, dashboard, metrics | `notion` |\n| investor, quarterly, business, corporate | `corporate` |\n| launch, marketing, keynote, magazine | `bold-editorial` |\n| entertainment, music, gaming, atmospheric | `dark-atmospheric` |\n| explainer, journalism, science communication | `editorial-infographic` |\n| story, fantasy, animation, magical | `fantasy-animation` |\n| gaming, retro, pixel, developer | `pixel-art` |\n| biology, chemistry, medical, scientific | `scientific` |\n| history, heritage, vintage, expedition | `vintage` |\n| lifestyle, wellness, travel, artistic | `watercolor` |\n\n### Slide Count Heuristic\n\n| Source length | Recommended slides |\n|---------------|--------------------|\n| < 1000 words | 5-10 |\n| 1000-3000 words | 10-18 |\n| 3000-5000 words | 15-25 |\n| > 5000 words | 20-30 (consider splitting) |\n\n## Reference Images\n\nUsers may supply reference images to guide style, palette, layout, or subject.\n\n**Intake**: Accept via `--ref <files...>` or when the user provides file paths / pastes images in conversation.\n- File path \u2192 copy to `{slide-deck-dir}/refs/NN-ref-{slug}.{ext}`\n- Pasted image with no path \u2192 ask for the path, or extract style traits verbally as a text fallback\n\n**Usage modes** (per reference):\n\n| Usage | Effect |\n|-------|--------|\n| `direct` | Pass the file to the backend as a reference image for each slide |\n| `style` | Extract style traits (line treatment, texture, mood) and append to every slide's prompt body |\n| `palette` | Extract hex colors and append to every slide's prompt body |\n\nRecord refs in each slide's prompt frontmatter:\n\n```yaml\nreferences:\n  - ref_id: 01\n    filename: 01-ref-brand.png\n    usage: direct\n```\n\nAt generation time, verify files exist. If `usage: direct` and the backend accepts refs (e.g., `baoyu-image-gen --ref`), pass the file on every slide. Otherwise embed extracted `style`/`palette` traits in the prompt text.\n\n## File Layout\n\n```\nslide-deck/{topic-slug}/\n\u251c\u2500\u2500 source-{slug}.{ext}\n\u251c\u2500\u2500 outline.md\n\u251c\u2500\u2500 prompts/NN-slide-{slug}.md\n\u251c\u2500\u2500 NN-slide-{slug}.png\n\u251c\u2500\u2500 {topic-slug}.pptx\n\u2514\u2500\u2500 {topic-slug}.pdf\n```\n\n**Slug**: 2-4 words, kebab-case, extracted from topic. \"Introduction to Machine Learning\" \u2192 `intro-machine-learning`.\n\n**Backup rule** (applies across steps): if a file about to be written already exists, rename it to `<name>-backup-YYYYMMDD-HHMMSS.<ext>` before writing the new one. This protects user edits and enables rollback.\n\n## Workflow\n\nCopy this checklist and check off items as you complete them:\n\n```\n- [ ] Step 1: Setup & analyze\n- [ ] Step 2: Confirmation \u26a0\ufe0f REQUIRED (Round 1; Round 2 only if \"Custom dimensions\")\n- [ ] Step 3: Generate outline\n- [ ] Step 4: Review outline (conditional)\n- [ ] Step 5: Generate prompts\n- [ ] Step 6: Review prompts (conditional)\n- [ ] Step 7: Generate images\n- [ ] Step 8: Merge to PPTX/PDF\n- [ ] Step 9: Output summary\n```\n\n### Step 1: Setup & Analyze\n\n**1.1 Load EXTEND.md** \u2014 check these paths in order; first hit wins:\n\n| Path | Scope |\n|------|-------|\n| `.baoyu-skills/baoyu-slide-deck/EXTEND.md` | Project |\n| `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-slide-deck/EXTEND.md` | XDG |\n| `$HOME/.baoyu-skills/baoyu-slide-deck/EXTEND.md` | User home |\n\nIf found, read, parse, and print a summary (style / audience / language / review / generation batch size). If not, proceed with defaults \u2014 first-time setup is not blocking for this skill. Schema: `references/config/preferences-schema.md`.\n\n**1.2 Analyze content** \u2014 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).\n\n**1.3 Check existing output** \u26a0\ufe0f REQUIRED before Step 2. If `slide-deck/{topic-slug}/` exists, ask how to proceed \u2014 four options (regenerate outline / regenerate images / backup and regenerate / exit), verbatim copy in `references/confirmation.md`.\n\nSave findings to `analysis.md`: topic, audience, signals, recommended style and slide count, language detection.\n\n### Step 2: Confirmation \u26a0\ufe0f REQUIRED\n\n**Hard gate**: this step is mandatory per the [Confirmation Policy](#confirmation-policy) \u2014 Steps 3+ cannot start until the user confirms here (or explicitly opts out with \"\u76f4\u63a5\u751f\u6210\" / equivalent wording in the current request).\n\n**Round 1 (always)** \u2014 batch five questions in one `AskUserQuestion` call: style, audience, slide count, review-outline?, review-prompts?. Verbatim options in `references/confirmation.md`.\n\nSummary displayed before the questions:\n- Content type + topic\n- Detected language\n- Recommended style (based on signals)\n- Recommended slide count (based on length)\n\n**Round 2 (only if \"Custom dimensions\" in Round 1)** \u2014 batch four questions: texture, mood, typography, density. Verbatim options in `references/confirmation.md`. The four answers replace the preset.\n\n**After confirmation**: update `analysis.md` with final choices and store `skip_outline_review` / `skip_prompt_review` flags from Q4/Q5.\n\n### Step 3: Generate Outline\n\nResolve style: preset \u2192 `references/styles/{preset}.md`; custom dimensions \u2192 combine files in `references/dimensions/`. Build `STYLE_INSTRUCTIONS` from the resolved style, apply confirmed audience + language + slide count, follow `references/outline-template.md`, and save as `outline.md`.\n\nStop here if `--outline-only`. Skip Step 4 if `skip_outline_review`.\n\n### Step 4: Review Outline (Conditional)\n\nDisplay a slide-by-slide table (`# | Title | Type | Layout`) along with total count and resolved style. Ask: proceed / edit outline first / regenerate \u2014 verbatim in `references/confirmation.md`.\n\nOn \"Edit outline first\", tell the user to edit `outline.md` and ask again when ready. On \"Regenerate outline\", return to Step 3.\n\n### Step 5: Generate Prompts\n\nFor each slide in outline:\n1. Read `references/base-prompt.md`\n2. Extract `STYLE_INSTRUCTIONS` from the outline (don't re-read the style file)\n3. Add the slide's content\n4. If a `Layout:` is specified, include guidance from `references/layouts.md`\n5. Save to `prompts/NN-slide-{slug}.md` (backup rule applies)\n\nStop here if `--prompts-only`. Skip Step 6 if `skip_prompt_review`.\n\n### Step 6: Review Prompts (Conditional)\n\nDisplay the prompts index (`# | Filename | Slide Title`) and ask: proceed / edit prompts first / regenerate \u2014 verbatim in `references/confirmation.md`. Branches mirror Step 4.\n\n### Step 7: Generate Images\n\n1. Resolve the image backend via the Image Generation Tools rule at the top \u2014 ask once if multiple are installed.\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 slide batches must dispatch one wrapper call per slide).\n2. Confirm every `prompts/NN-slide-{slug}.md` exists (hard requirement; prompt files are the reproducibility record regardless of backend).\n3. Session ID: `slides-{topic-slug}-{timestamp}` \u2014 pass to the backend only if it supports sessions.\n4. Build a task list for selected slides with each slide's prompt file, output PNG path, aspect ratio, session ID, and verified direct references.\n5. 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.\n\n`--regenerate N` jumps to this step for the named slides only. `--images-only` starts here with existing prompts.\n\n### Step 8: Merge\n\n```bash\n${BUN_X} {baseDir}/scripts/merge-to-pptx.ts <slide-deck-dir>\n${BUN_X} {baseDir}/scripts/merge-to-pdf.ts <slide-deck-dir>\n```\n\n### Step 9: Summary\n\n```\nSlide Deck Complete!\nTopic: [topic]\nStyle: [preset or \"custom: texture+mood+typography+density\"]\nLocation: [directory]\nSlides: N\n\n- 01-slide-cover.png\n- ...\n- NN-slide-back-cover.png\n\nOutline: outline.md\nPPTX: {topic-slug}.pptx\nPDF: {topic-slug}.pdf\n```\n\n## Slide Modification\n\n| Action | How |\n|--------|-----|\n| Edit | Update `prompts/NN-slide-{slug}.md` **first**, then `--regenerate N` |\n| Add | Create new prompt at position, generate image, renumber subsequent `NN` (slugs unchanged), update `outline.md`, re-merge |\n| Delete | Remove PNG + prompt, renumber subsequent, update `outline.md`, re-merge |\n\nAlways update the prompt file before regenerating the image \u2014 this keeps the prompts directory as the source of truth and makes changes reproducible. Only `NN` changes on renumber; slugs stay stable so references remain valid.\n\nText correction policy:\n\n- If a slide's title, bullets, 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\nSee `references/modification-guide.md` for full details.\n\n## References\n\n| File | Content |\n|------|---------|\n| `references/confirmation.md` | Verbatim AskUserQuestion option copy for every confirmation |\n| `references/analysis-framework.md` | Content analysis framework |\n| `references/outline-template.md` | Outline structure |\n| `references/base-prompt.md` | Base prompt body for image generation |\n| `references/layouts.md` | Layout options |\n| `references/design-guidelines.md` | Audience, typography, color selection |\n| `references/content-rules.md` | Content guidelines |\n| `references/modification-guide.md` | Edit/add/delete workflows |\n| `references/styles/<preset>.md` | Per-preset specifications |\n| `references/dimensions/*.md` | Per-dimension specifications |\n| `references/config/preferences-schema.md` | EXTEND.md schema |\n\n## Notes\n\n- Image generation takes ~10-30s per slide; report progress between them.\n- For sensitive public figures, prefer stylized alternatives to avoid likeness issues.\n- Maintain visual consistency via the session ID when the backend supports it.\n\n## Changing Preferences\n\nEXTEND.md lives at the first matching path listed in Step 1.1. Two ways to change it:\n\n- **Edit directly** \u2014 open EXTEND.md and change fields. Full schema: `references/config/preferences-schema.md`.\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 slide images to render concurrently when the backend/runtime supports batch or parallel generation.\n  - `preferred_style: blueprint`, `preferred_audience: experts`, `language: zh`.\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"}
