lovstudio-any2deck
Original:🇺🇸 English
Translated
3 scriptsChecked / no sensitive code detected
Generate professional slide deck images from content (Markdown, text, URLs). Creates outlines with style instructions, then generates individual slide images. Supports 16 visual styles, CJK/Latin mixed text, branding overlays, and PPTX/PDF export. Use when the user asks to "create slides", "make a presentation", "generate deck", "slide deck", "PPT", "做PPT", "生成幻灯片", "制作演示文稿", or wants to turn content into a visual slide deck.
2installs
Sourcelovstudio/skills
Added on
NPX Install
npx skill4agent add lovstudio/skills lovstudio-any2deckTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Slide Deck Generator
Transform content into professional slide deck images.
Usage
bash
/lovstudio:any2deck path/to/content.md
/lovstudio:any2deck path/to/content.md --style sketch-notes
/lovstudio:any2deck path/to/content.md --audience executives
/lovstudio:any2deck path/to/content.md --lang zh
/lovstudio:any2deck path/to/content.md --slides 10
/lovstudio:any2deck path/to/content.md --outline-only
/lovstudio:any2deck # Then paste contentScript Directory
Agent Execution Instructions:
- Determine this SKILL.md file's directory path as
SKILL_DIR - Script path =
${SKILL_DIR}/scripts/<script-name>
| Script | Purpose |
|---|---|
| Merge slides into PowerPoint |
| Merge slides into PDF |
| Composite logo(s)/QR onto slides — dual logo, tight-crop, JPG white→alpha (opt-in) |
Options
| Option | Description |
|---|---|
| Visual style: preset name, |
| Target: beginners, intermediate, experts, executives, general |
| Output language (en, zh, ja, etc.) |
| Target slide count (8-25 recommended, max 30) |
| Generate outline only, skip image generation |
| Generate outline + prompts, skip images |
| Generate images from existing prompts directory |
| Regenerate specific slide(s): |
| Primary brand logo (top-right, skips cover/back-cover) |
| Secondary logo (placed left of primary, optically aligned) |
| Presentation mode: strips narration text, keeps only visual anchors |
Slide Count by Content Length:
| Content | Slides |
|---|---|
| < 1000 words | 5-10 |
| 1000-3000 words | 10-18 |
| 3000-5000 words | 15-25 |
| > 5000 words | 20-30 (consider splitting) |
Style System
Presets
| Preset | Dimensions | Best For |
|---|---|---|
| grid + cool + technical + balanced | Architecture, system design |
| organic + warm + handwritten + balanced | Education, tutorials |
| clean + professional + geometric + balanced | Investor decks, proposals |
| clean + neutral + geometric + minimal | Executive briefings |
| organic + warm + handwritten + balanced | Educational, tutorials |
| organic + warm + humanist + minimal | Lifestyle, wellness |
| clean + dark + editorial + balanced | Entertainment, gaming |
| clean + neutral + geometric + dense | Product demos, SaaS |
| clean + vibrant + editorial + balanced | Product launches, keynotes |
| clean + cool + editorial + dense | Tech explainers, research |
| organic + vibrant + handwritten + minimal | Educational storytelling |
| clean + cool + technical + dense | Technical docs, academic |
| pixel + vibrant + technical + balanced | Gaming, developer talks |
| clean + cool + technical + dense | Biology, chemistry, medical |
| clean + vibrant + humanist + balanced | Creative, children's content |
| paper + warm + editorial + balanced | Historical, heritage |
Style Dimensions
| Dimension | Options | Description |
|---|---|---|
| Texture | clean, grid, organic, pixel, paper | Visual texture and background treatment |
| Mood | professional, warm, cool, vibrant, dark, neutral | Color temperature and palette style |
| Typography | geometric, humanist, handwritten, editorial, technical | Headline and body text styling |
| Density | minimal, balanced, dense | Information density per slide |
Full specs:
references/dimensions/*.mdAuto Style Selection
| Content Signals | Preset |
|---|---|
| tutorial, learn, education, guide, beginner | |
| classroom, teaching, school, chalkboard | |
| architecture, system, data, analysis, technical | |
| creative, children, kids, cute | |
| briefing, academic, research, bilingual | |
| executive, minimal, clean, simple | |
| saas, product, dashboard, metrics | |
| investor, quarterly, business, corporate | |
| launch, marketing, keynote, magazine | |
| entertainment, music, gaming, atmospheric | |
| explainer, journalism, science communication | |
| story, fantasy, animation, magical | |
| gaming, retro, pixel, developer | |
| biology, chemistry, medical, scientific | |
| history, heritage, vintage, expedition | |
| lifestyle, wellness, travel, artistic | |
| Default | |
Design Philosophy
Decks designed for reading and sharing, not live presentation:
- Each slide self-explanatory without verbal commentary
- Logical flow when scrolling
- All necessary context within each slide
- Optimized for social media sharing
See for:
references/design-guidelines.md- Audience-specific principles
- Visual hierarchy
- Content density guidelines
- Color and typography selection
- Font recommendations
See for layout options.
references/layouts.mdFile Management
Output Directory
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}.pdfSlug: Extract topic (2-4 words, kebab-case). Example: "Introduction to Machine Learning" →
intro-machine-learningConflict Handling: See Step 1.3 for existing content detection and user options.
Language Handling
Detection Priority:
- flag (explicit)
--lang - EXTEND.md setting
language - User's conversation language (input language)
- Source content language
Rule: ALL responses use user's preferred language:
- Questions and confirmations
- Progress reports
- Error messages
- Completion summaries
Technical terms (style names, file paths, code) remain in English.
Workflow
Copy this checklist and check off items as you complete them:
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 7.5: Apply branding (if configured)
- [ ] Step 8: Merge to PPTX/PDF
- [ ] Step 9: Output summaryFlow
Input → Preferences → Analyze → [Check Existing?] → Confirm (1-2 rounds) → Outline → [Review Outline?] → Prompts → [Review Prompts?] → Images → [Branding?] → Merge → CompleteStep 1: Setup & Analyze
1.1 Load Preferences (EXTEND.md)
Use Bash to check EXTEND.md existence (priority order):
bash
# Check project-level first
test -f .lovstudio-skills/lovstudio-any2deck/EXTEND.md && echo "project"
# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.lovstudio-skills/lovstudio-any2deck/EXTEND.md" && echo "user"┌──────────────────────────────────────────────────┬───────────────────┐
│ Path │ Location │
├──────────────────────────────────────────────────┼───────────────────┤
│ .lovstudio-skills/lovstudio-any2deck/EXTEND.md │ Project directory │
├──────────────────────────────────────────────────┼───────────────────┤
│ $HOME/.lovstudio-skills/lovstudio-any2deck/EXTEND.md │ User home │
└──────────────────────────────────────────────────┴───────────────────┘
When EXTEND.md Found → Read, parse, output summary to user:
📋 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.md1.2 Analyze Content
- Save source content (if pasted, save as )
source.md- Backup rule: If exists, rename to
source.mdsource-backup-YYYYMMDD-HHMMSS.md
- Backup rule: If
- Follow for content analysis
references/analysis-framework.md - 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:
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 with:
analysis.md- Topic, audience, content signals
- Recommended style (based on Auto Style Selection)
- Recommended slide count
- Language detection
Step 2: Confirmation ⚠️ REQUIRED
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:
- Content type + topic identified
- Language: [from EXTEND.md or detected]
- Recommended style: [preset] (based on content signals)
- Recommended slides: [N] (based on content length)
Round 1 (Always)
Use AskUserQuestion for all 5 questions:
Question 1: Style
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
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
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
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
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"Round 2 (Only if "Custom dimensions" selected)
Use AskUserQuestion for all 4 dimensions:
Question 1: Texture
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
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
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
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:
- Update with confirmed preferences
analysis.md - Store flag from Question 4
skip_outline_review - Store flag from Question 5
skip_prompt_review - → Step 3
Step 3: Generate Outline
Create outline using the confirmed style from Step 2.
Style Resolution:
- If preset selected → Read
references/styles/{preset}.md - If custom dimensions → Read dimension files from and combine
references/dimensions/
Generate:
- Follow for structure
references/outline-template.md - Build STYLE_INSTRUCTIONS from style or dimensions
- Apply confirmed audience, language, slide count
- Save as
outline.md
After generation:
- If , stop here
--outline-only - If is true → Skip Step 4, go to Step 5
skip_outline_review - If is false → Continue to Step 4
skip_outline_review
Step 4: Review Outline (Conditional)
Skip 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:
- Total slides: N
- Style: [preset name or "custom: texture+mood+typography+density"]
- Slide-by-slide summary table:
| # | Title | Type | Layout |
|---|-------|------|--------|
| 1 | [title] | Cover | title-hero |
| 2 | [title] | Content | [layout] |
| 3 | [title] | Content | [layout] |
| ... | ... | ... | ... |Use AskUserQuestion:
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:
- If "Edit outline first" → Inform user to edit , ask again when ready
outline.md - If "Regenerate outline" → Back to Step 3
- If "Yes, proceed" → Continue to Step 5
Step 5: Generate Prompts
- Read
references/base-prompt.md - For each slide in outline:
- Extract STYLE_INSTRUCTIONS from outline (not from style file again)
- Add slide-specific content
- If specified, include layout guidance from
Layout:references/layouts.md
- Save to directory
prompts/- Backup rule: If prompt file exists, rename to
prompts/NN-slide-{slug}-backup-YYYYMMDD-HHMMSS.md
- Backup rule: If prompt file exists, rename to
After generation:
- If , stop here and output prompt summary
--prompts-only - If is true → Skip Step 6, go to Step 7
skip_prompt_review - If is false → Continue to Step 6
skip_prompt_review
Step 6: Review Prompts (Conditional)
Skip 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:
- Total prompts: N
- Style: [preset name or custom dimensions]
- Prompt list:
| # | Filename | Slide Title |
|---|----------|-------------|
| 1 | 01-slide-cover.md | [title] |
| 2 | 02-slide-xxx.md | [title] |
| ... | ... | ... |- Path to prompts directory:
prompts/
Use AskUserQuestion:
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:
- If "Edit prompts first" → Inform user to edit prompts, ask again when ready
- If "Regenerate prompts" → Back to Step 5
- If "Yes, proceed" → Continue to Step 7
Step 7: Generate Images
For : Start here with existing prompts.
--images-onlyFor : Only regenerate specified slide(s).
--regenerate NStandard flow:
- Select available image generation skill
- Generate session ID:
slides-{topic-slug}-{timestamp} - For each slide:
- Backup rule: If image file exists, rename to
NN-slide-{slug}-backup-YYYYMMDD-HHMMSS.png - Generate image sequentially with same session ID
- Backup rule: If image file exists, rename to
- Report progress: "Generated X/N" (in user's language)
- Auto-retry once on failure before reporting error
Step 7.5: Apply Branding (opt-in)
Trigger: Only run if is set in EXTEND.md OR user passed .
branding.logo--logo <path>Composites brand logo(s) (top-right) and optional QR code onto generated slides.
Supports dual logos (e.g. brand + partner), tight-crops logos via ,
and converts JPG white backgrounds to alpha automatically.
getbbox()Defaults (if EXTEND.md branding not configured):
- Logo: skip this step entirely
- Skip slides: (cover + back-cover get no logo)
[1, <last slide>]
bash
python3 ${SKILL_DIR}/scripts/apply-branding.py <slide-deck-dir> \
--logo <logo_path> \
[--logo2 <secondary_logo_path> --logo2-gap 32] \
--skip 1,<last_slide> \
[--logo-h 46 --pad-top 20 --pad-right 26] \
[--patch-slides N,M] # slides whose AI-drawn frames clash with logo
[--frame-slides N,M] # slides needing full edge frame-stripping
[--qr <qr_path> --qr-slide N --qr-box X1,Y1,X2,Y2]Quality check after running: Read 2-3 slides and visually verify:
- Logo is crisp, not clipped by canvas edge
- No visible frame lines / card edges touching or crossing the logo
- Backdrop blends seamlessly with paper texture
If any slide shows frame/card conflict, add it to and re-run.
If edges still leak through, add it to (more aggressive strip).
If problems persist (content-integrated card), regenerate that slide with
explicit "NO card containing all content, NO tilted paper" in the prompt.
--patch-slides--frame-slidesThe script is idempotent: originals are backed up to and reused
on every run.
_original/Step 8: Merge to PPTX and PDF
bash
npx -y bun ${SKILL_DIR}/scripts/merge-to-pptx.ts <slide-deck-dir>
npx -y bun ${SKILL_DIR}/scripts/merge-to-pdf.ts <slide-deck-dir>Step 9: Output Summary
Language: Use user's input language or saved language preference.
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}.pdfPartial Workflows
| Option | Workflow |
|---|---|
| Steps 1-3 only (stop after outline) |
| Steps 1-5 (generate prompts, skip images) |
| Skip to Step 7 (requires existing prompts/) |
| Regenerate specific slide(s) only |
Using --prompts-only
--prompts-onlyGenerate outline and prompts without images:
bash
/lovstudio:any2deck content.md --prompts-onlyOutput: + ready for review/editing.
outline.mdprompts/*.mdUsing --images-only
--images-onlyGenerate images from existing prompts (starts at Step 7):
bash
/lovstudio:any2deck slide-deck/topic-slug/ --images-onlyPrerequisites:
- directory with slide prompt files
prompts/ - with style information
outline.md
Using --regenerate
--regenerateRegenerate specific slides:
bash
# Single slide
/lovstudio:any2deck slide-deck/topic-slug/ --regenerate 3
# Multiple slides
/lovstudio:any2deck slide-deck/topic-slug/ --regenerate 2,5,8Flow:
- Read existing prompts for specified slides
- Regenerate images only for those slides
- Regenerate PPTX/PDF
Slide Modification
Quick Reference
| Action | Command | Manual Steps |
|---|---|---|
| Edit | | Update prompt file FIRST → Regenerate image → Regenerate PDF |
| Add | Manual | Create prompt → Generate image → Renumber subsequent → Update outline → Regenerate PDF |
| Delete | Manual | Remove files → Renumber subsequent → Update outline → Regenerate PDF |
Edit Single Slide
- Update prompt file FIRST in
prompts/NN-slide-{slug}.md - Run:
/lovstudio:any2deck <dir> --regenerate N - Or manually regenerate image + PDF
IMPORTANT: When updating slides, ALWAYS update the prompt file () FIRST before regenerating. This ensures changes are documented and reproducible.
prompts/NN-slide-{slug}.mdAdd New Slide
- Create prompt at position:
prompts/NN-slide-{new-slug}.md - Generate image using same session ID
- Renumber: Subsequent files NN+1 (slugs unchanged)
- Update
outline.md - Regenerate PPTX/PDF
Delete Slide
- Remove and
NN-slide-{slug}.pngprompts/NN-slide-{slug}.md - Renumber: Subsequent files NN-1 (slugs unchanged)
- Update
outline.md - Regenerate PPTX/PDF
File Naming
Format:
NN-slide-[slug].png- : Two-digit sequence (01, 02, ...)
NN - : Kebab-case from content (2-5 words, unique)
slug
Renumbering Rule: Only NN changes, slugs remain unchanged.
See for complete details.
references/modification-guide.mdReferences
| File | Content |
|---|---|
| Content analysis for presentations |
| Outline structure and format |
| Edit, add, delete slide workflows |
| Content and style guidelines |
| Audience, typography, colors, visual elements |
| Layout options and selection tips |
| Base prompt for image generation |
| Dimension specifications (texture, mood, typography, density) |
| Preset → dimension mapping |
| Full style specifications (legacy) |
| EXTEND.md structure |
Notes
- Image generation: 10-30 seconds per slide
- Auto-retry once on generation failure
- Use stylized alternatives for sensitive public figures
- Maintain style consistency via session ID
- Step 2 confirmation required - do not skip (style, audience, slides, outline review, prompt review)
- Step 4 conditional - only if user requested outline review in Step 2
- Step 6 conditional - only if user requested prompt review in Step 2
Extension Support
Custom configurations via EXTEND.md. See Step 1.1 for paths and supported options.