Transform content into professional slide deck images.
bash
/baoyu-slide-deck path/to/content.md
/baoyu-slide-deck path/to/content.md --style sketch-notes
/baoyu-slide-deck path/to/content.md --audience executives
/baoyu-slide-deck path/to/content.md --lang zh
/baoyu-slide-deck path/to/content.md --slides 10
/baoyu-slide-deck path/to/content.md --outline-only
/baoyu-slide-deck # Then paste content
Agent Execution Instructions:
{baseDir}{baseDir}/scripts/<script-name>.ts${BUN_X} runtime: if bun installed → bun; if npx available → npx -y bun; else suggest installing bunScriptPurposescripts/merge-to-pptx.tsMerge slides into PowerPointscripts/merge-to-pdf.tsMerge slides into PDF
OptionDescription--style <name>Visual style: preset name, custom, or custom style name--audience <type>Target: beginners, intermediate, experts, executives, general--lang <code>Output language (en, zh, ja, etc.)--slides <number>Target slide count (8-25 recommended, max 30)--outline-onlyGenerate outline only, skip image generation--prompts-onlyGenerate outline + prompts, skip images--images-onlyGenerate images from existing prompts directory--regenerate <N>Regenerate specific slide(s): --regenerate 3 or --regenerate 2,5,8
Slide Count by Content Length:
ContentSlides< 1000 words5-101000-3000 words10-183000-5000 words15-25> 5000 words20-30 (consider splitting)
PresetDimensionsBest Forblueprint (Default)grid + cool + technical + balancedArchitecture, system designchalkboardorganic + warm + handwritten + balancedEducation, tutorialscorporateclean + professional + geometric + balancedInvestor decks, proposalsminimalclean + neutral + geometric + minimalExecutive briefingssketch-notesorganic + warm + handwritten + balancedEducational, tutorialswatercolororganic + warm + humanist + minimalLifestyle, wellnessdark-atmosphericclean + dark + editorial + balancedEntertainment, gamingnotionclean + neutral + geometric + denseProduct demos, SaaSbold-editorialclean + vibrant + editorial + balancedProduct launches, keynoteseditorial-infographicclean + cool + editorial + denseTech explainers, researchfantasy-animationorganic + vibrant + handwritten + minimalEducational storytellingintuition-machineclean + cool + technical + denseTechnical docs, academicpixel-artpixel + vibrant + technical + balancedGaming, developer talksscientificclean + cool + technical + denseBiology, chemistry, medicalvector-illustrationclean + vibrant + humanist + balancedCreative, children's contentvintagepaper + warm + editorial + balancedHistorical, heritage
DimensionOptionsDescriptionTextureclean, grid, organic, pixel, paperVisual texture and background treatmentMoodprofessional, warm, cool, vibrant, dark, neutralColor temperature and palette styleTypographygeometric, humanist, handwritten, editorial, technicalHeadline and body text stylingDensityminimal, balanced, denseInformation density per slide
Full specs: references/dimensions/*.md
Content SignalsPresettutorial, learn, education, guide, beginnersketch-notesclassroom, teaching, school, chalkboardchalkboardarchitecture, system, data, analysis, technicalblueprintcreative, children, kids, cutevector-illustrationbriefing, academic, research, bilingualintuition-machineexecutive, minimal, clean, simpleminimalsaas, product, dashboard, metricsnotioninvestor, quarterly, business, corporatecorporatelaunch, marketing, keynote, magazinebold-editorialentertainment, music, gaming, atmosphericdark-atmosphericexplainer, journalism, science communicationeditorial-infographicstory, fantasy, animation, magicalfantasy-animationgaming, retro, pixel, developerpixel-artbiology, chemistry, medical, scientificscientifichistory, heritage, vintage, expeditionvintagelifestyle, wellness, travel, artisticwatercolorDefaultblueprint
Decks designed for reading and sharing, not live presentation:
See references/design-guidelines.md for:
See references/layouts.md for layout options.
text
slide-deck/{topic-slug}/
├── source-{slug}.{ext}
├── outline.md
├── prompts/
│ └── 01-slide-cover.md, 02-slide-{slug}.md, ...
├── 01-slide-cover.png, 02-slide-{slug}.png, ...
├── {topic-slug}.pptx
└── {topic-slug}.pdf
Slug: Extract topic (2-4 words, kebab-case). Example: "Introduction to Machine Learning" → intro-machine-learning
Conflict Handling: See Step 1.3 for existing content detection and user options.
Detection Priority:
--lang flag (explicit)language settingRule: ALL responses use user's preferred language:
Technical terms (style names, file paths, code) remain in English.
Copy this checklist and check off items as you complete them:
text
Slide Deck Progress:
- [ ] Step 1: Setup & Analyze
- [ ] 1.1 Load preferences
- [ ] 1.2 Analyze content
- [ ] 1.3 Check existing ⚠️ REQUIRED
- [ ] Step 2: Confirmation ⚠️ REQUIRED (Round 1, optional Round 2)
- [ ] Step 3: Generate outline
- [ ] Step 4: Review outline (conditional)
- [ ] Step 5: Generate prompts
- [ ] Step 6: Review prompts (conditional)
- [ ] Step 7: Generate images
- [ ] Step 8: Merge to PPTX/PDF
- [ ] Step 9: Output summary
text
Input → Preferences → Analyze → [Check Existing?] → Confirm (1-2 rounds) → Outline → [Review Outline?] → Prompts → [Review Prompts?] → Images → Merge → Complete
1.1 Load Preferences (EXTEND.md)
Check EXTEND.md existence (priority order):
bash
# macOS, Linux, WSL, Git Bash
test -f .baoyu-skills/baoyu-slide-deck/EXTEND.md && echo "project"
test -f "${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-slide-deck/EXTEND.md" && echo "xdg"
test -f "$HOME/.baoyu-skills/baoyu-slide-deck/EXTEND.md" && echo "user"
powershell
# PowerShell (Windows)
if (Test-Path .baoyu-skills/baoyu-slide-deck/EXTEND.md) { "project" }
$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { "$HOME/.config" }
if (Test-Path "$xdg/baoyu-skills/baoyu-slide-deck/EXTEND.md") { "xdg" }
if (Test-Path "$HOME/.baoyu-skills/baoyu-slide-deck/EXTEND.md") { "user" }
┌──────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├──────────────────────────────────────────────────┼───────────────────┤ │ .baoyu-skills/baoyu-slide-deck/EXTEND.md │ Project directory │ ├──────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.baoyu-skills/baoyu-slide-deck/EXTEND.md │ User home │ └──────────────────────────────────────────────────┴───────────────────┘
When EXTEND.md Found → Read, parse, output summary to user:
text
📋 Loaded preferences from [full path]
├─ Style: [preset/custom name]
├─ Audience: [audience or "auto-detect"]
├─ Language: [language or "auto-detect"]
└─ Review: [enabled/disabled]
When EXTEND.md Not Found → First-time setup using AskUserQuestion or proceed with defaults.
EXTEND.md Supports: Preferred style | Custom dimensions | Default audience | Language preference | Review preference
Schema: references/config/preferences-schema.md
1.2 Analyze Content
Save source content (if pasted, save as source.md)
source.md exists, rename to source-backup-YYYYMMDD-HHMMSS.mdFollow references/analysis-framework.md for content analysis
Analyze content signals for style recommendations
Detect source language
Determine recommended slide count
Generate topic slug from content
1.3 Check Existing Content ⚠️ REQUIRED
MUST execute before proceeding to Step 2.
Use Bash to check if output directory exists:
bash
test -d "slide-deck/{topic-slug}" && echo "exists"
If directory exists, use AskUserQuestion:
text
header: "Existing"
question: "Existing content found. How to proceed?"
options:
- label: "Regenerate outline"
description: "Keep images, regenerate outline only"
- label: "Regenerate images"
description: "Keep outline, regenerate images only"
- label: "Backup and regenerate"
description: "Backup to {slug}-backup-{timestamp}, then regenerate all"
- label: "Exit"
description: "Cancel, keep existing content unchanged"
Save to analysis.md with:
Two-round confirmation: Round 1 always, Round 2 only if "Custom dimensions" selected.
Language: Use user's input language or saved language preference.
Display summary:
Use AskUserQuestion for all 5 questions:
Question 1: Style
text
header: "Style"
question: "Which visual style for this deck?"
options:
- label: "{recommended_preset} (Recommended)"
description: "Best match based on content analysis"
- label: "{alternative_preset}"
description: "[alternative style description]"
- label: "Custom dimensions"
description: "Choose texture, mood, typography, density separately"
Question 2: Audience
text
header: "Audience"
question: "Who is the primary reader?"
options:
- label: "General readers (Recommended)"
description: "Broad appeal, accessible content"
- label: "Beginners/learners"
description: "Educational focus, clear explanations"
- label: "Experts/professionals"
description: "Technical depth, domain knowledge"
- label: "Executives"
description: "High-level insights, minimal detail"
Question 3: Slide Count
text
header: "Slides"
question: "How many slides?"
options:
- label: "{N} slides (Recommended)"
description: "Based on content length"
- label: "Fewer ({N-3} slides)"
description: "More condensed, less detail"
- label: "More ({N+3} slides)"
description: "More detailed breakdown"
Question 4: Review Outline
text
header: "Outline"
question: "Review outline before generating prompts?"
options:
- label: "Yes, review outline (Recommended)"
description: "Review slide titles and structure"
- label: "No, skip outline review"
description: "Proceed directly to prompt generation"
Question 5: Review Prompts
text
header: "Prompts"
question: "Review prompts before generating images?"
options:
- label: "Yes, review prompts (Recommended)"
description: "Review image generation prompts"
- label: "No, skip prompt review"
description: "Proceed directly to image generation"
Use AskUserQuestion for all 4 dimensions:
Question 1: Texture
text
header: "Texture"
question: "Which visual texture?"
options:
- label: "clean"
description: "Pure solid color, no texture"
- label: "grid"
description: "Subtle grid overlay, technical"
- label: "organic"
description: "Soft textures, hand-drawn feel"
- label: "pixel"
description: "Chunky pixels, 8-bit aesthetic"
(Note: "paper" available via Other)
Question 2: Mood
text
header: "Mood"
question: "Which color mood?"
options:
- label: "professional"
description: "Cool-neutral, navy/gold"
- label: "warm"
description: "Earth tones, friendly"
- label: "cool"
description: "Blues, grays, analytical"
- label: "vibrant"
description: "High saturation, bold"
(Note: "dark", "neutral" available via Other)
Question 3: Typography
text
header: "Typography"
question: "Which typography style?"
options:
- label: "geometric"
description: "Modern sans-serif, clean"
- label: "humanist"
description: "Friendly, readable"
- label: "handwritten"
description: "Marker/brush, organic"
- label: "editorial"
description: "Magazine style, dramatic"
(Note: "technical" available via Other)
Question 4: Density
text
header: "Density"
question: "Information density?"
options:
- label: "balanced (Recommended)"
description: "2-3 key points per slide"
- label: "minimal"
description: "One focus point, maximum whitespace"
- label: "dense"
description: "Multiple data points, compact"
After Round 2: Store custom dimensions as the style configuration.
After Confirmation:
analysis.md with confirmed preferencesskip_outline_review flag from Question 4skip_prompt_review flag from Question 5Create outline using the confirmed style from Step 2.
Style Resolution:
references/styles/{preset}.mdreferences/dimensions/ and combineGenerate:
references/outline-template.md for structureoutline.mdAfter generation:
--outline-only, stop hereskip_outline_review is true → Skip Step 4, go to Step 5skip_outline_review is false → Continue to Step 4Skip this step if user selected "No, skip outline review" in Step 2.
Purpose: Review outline structure before prompt generation.
Language: Use user's input language or saved language preference.
Display:
text
| # | Title | Type | Layout |
|---|-------|------|--------|
| 1 | [title] | Cover | title-hero |
| 2 | [title] | Content | [layout] |
| 3 | [title] | Content | [layout] |
| ... | ... | ... | ... |
Use AskUserQuestion:
text
header: "Confirm"
question: "Ready to generate prompts?"
options:
- label: "Yes, proceed (Recommended)"
description: "Generate image prompts"
- label: "Edit outline first"
description: "I'll modify outline.md before continuing"
- label: "Regenerate outline"
description: "Create new outline with different approach"
After response:
outline.md, ask again when readyRead references/base-prompt.md
For each slide in outline:
Layout: specified, include layout guidance from references/layouts.mdSave to prompts/ directory
prompts/NN-slide-{slug}-backup-YYYYMMDD-HHMMSS.mdAfter generation:
--prompts-only, stop here and output prompt summaryskip_prompt_review is true → Skip Step 6, go to Step 7skip_prompt_review is false → Continue to Step 6Skip this step if user selected "No, skip prompt review" in Step 2.
Purpose: Review prompts before image generation.
Language: Use user's input language or saved language preference.
Display:
text
| # | Filename | Slide Title |
|---|----------|-------------|
| 1 | 01-slide-cover.md | [title] |
| 2 | 02-slide-xxx.md | [title] |
| ... | ... | ... |
prompts/Use AskUserQuestion:
text
header: "Confirm"
question: "Ready to generate slide images?"
options:
- label: "Yes, proceed (Recommended)"
description: "Generate all slide images"
- label: "Edit prompts first"
description: "I'll modify prompts before continuing"
- label: "Regenerate prompts"
description: "Create new prompts with different approach"
After response:
For --images-only: Start here with existing prompts.
For --regenerate N: Only regenerate specified slide(s).
Standard flow:
slides-{topic-slug}-{timestamp}NN-slide-{slug}-backup-YYYYMMDD-HHMMSS.pngbash
${BUN_X} {baseDir}/scripts/merge-to-pptx.ts <slide-deck-dir>
${BUN_X} {baseDir}/scripts/merge-to-pdf.ts <slide-deck-dir>
Language: Use user's input language or saved language preference.
text
Slide Deck Complete!
Topic: [topic]
Style: [preset name or custom dimensions]
Location: [directory path]
Slides: N total
- 01-slide-cover.png - Cover
- 02-slide-intro.png - Content
- ...
- {NN}-slide-back-cover.png - Back Cover
Outline: outline.md
PPTX: {topic-slug}.pptx
PDF: {topic-slug}.pdf
OptionWorkflow--outline-onlySteps 1-3 only (stop after outline)--prompts-onlySteps 1-5 (generate prompts, skip images)--images-onlySkip to Step 7 (requires existing prompts/)--regenerate NRegenerate specific slide(s) only
--prompts-only#Generate outline and prompts without images:
bash
/baoyu-slide-deck content.md --prompts-only
Output: outline.md + prompts/*.md ready for review/editing.
--images-only#Generate images from existing prompts (starts at Step 7):
bash
/baoyu-slide-deck slide-deck/topic-slug/ --images-only
Prerequisites:
prompts/ directory with slide prompt filesoutline.md with style information--regenerate#Regenerate specific slides:
bash
# Single slide
/baoyu-slide-deck slide-deck/topic-slug/ --regenerate 3
# Multiple slides
/baoyu-slide-deck slide-deck/topic-slug/ --regenerate 2,5,8
Flow:
ActionCommandManual StepsEdit--regenerate NUpdate prompt file FIRST → Regenerate image → Regenerate PDFAddManualCreate prompt → Generate image → Renumber subsequent → Update outline → Regenerate PDFDeleteManualRemove files → Renumber subsequent → Update outline → Regenerate PDF
prompts/NN-slide-{slug}.md/baoyu-slide-deck <dir> --regenerate NIMPORTANT: When updating slides, ALWAYS update the prompt file ( prompts/NN-slide-{slug}.md) FIRST before regenerating. This ensures changes are documented and reproducible.
prompts/NN-slide-{new-slug}.mdoutline.mdNN-slide-{slug}.png and prompts/NN-slide-{slug}.mdoutline.mdFormat: NN-slide-[slug].png
NN: Two-digit sequence (01, 02, ...)slug: Kebab-case from content (2-5 words, unique)Renumbering Rule: Only NN changes, slugs remain unchanged.
See references/modification-guide.md for complete details.
FileContentreferences/analysis-framework.mdContent analysis for presentationsreferences/outline-template.mdOutline structure and formatreferences/modification-guide.mdEdit, add, delete slide workflowsreferences/content-rules.mdContent and style guidelinesreferences/design-guidelines.mdAudience, typography, colors, visual elementsreferences/layouts.mdLayout options and selection tipsreferences/base-prompt.mdBase prompt for image generationreferences/dimensions/*.mdDimension specifications (texture, mood, typography, density)references/dimensions/presets.mdPreset → dimension mappingreferences/styles/<style>.mdFull style specifications (legacy)references/config/preferences-schema.mdEXTEND.md structure
Custom configurations via EXTEND.md. See Step 1.1 for paths and supported options.