Deep content analysis for effective slide deck creation.
Identify the core message structure before designing slides.
| Question | Analysis |
|---|---|
| Who is the primary audience? | [Role, expertise level, relationship to topic] |
| What do they currently believe? | [Existing knowledge, assumptions, biases] |
| What decision do we want them to make? | [Specific action or conclusion] |
| What barriers exist? | [Objections, concerns, missing information] |
| What evidence will convince them? | [Data types, credibility sources, emotional hooks] |
| Audience Type | Content Focus | Visual Treatment |
|---|---|---|
| Executives | Outcomes, ROI, strategic impact | High-level, clean, data highlights |
| Technical | Architecture, implementation, specs | Detailed diagrams, code, schematics |
| General | Benefits, stories, relatability | Visual metaphors, simple charts |
| Investors | Market size, traction, team | Growth charts, milestones, comparisons |
| Learners | Step-by-step, examples, practice | Progressive reveals, exercises |
Identify which content benefits from visualization.
| Content Type | Visual Treatment | Example |
|---|---|---|
| Comparisons | Side-by-side, before/after | Feature comparison table |
| Processes | Flow diagrams, numbered steps | Workflow illustration |
| Hierarchies | Org charts, pyramids, trees | Organizational structure |
| Timelines | Horizontal/vertical timelines | Project milestones |
| Statistics | Charts, highlighted numbers | Key metrics with context |
| Concepts | Icons, metaphors, illustrations | Abstract idea visualization |
| Relationships | Venn diagrams, networks | Ecosystem or dependencies |
| Lists | Structured grids, icon rows | Feature bullets with icons |
Rate each piece of content:
Structure for impact and retention.
| Element | Purpose |
|---|---|
| Hook | Capture attention (surprising stat, question, story) |
| Context | Why this matters now |
| Preview | What audience will learn/gain |
| Pattern | When to Use |
|---|---|
| Problem → Solution | Introducing new products/ideas |
| Situation → Complication → Resolution | Complex business cases |
| What → Why → How | Educational content |
| Past → Present → Future | Transformation stories |
| Claim → Evidence → Implication | Data-driven arguments |
| Element | Purpose |
|---|---|
| Synthesis | Tie back to core message |
| Call-to-Action | Clear next steps |
| Memorable Close | Resonant quote, image, or statement |
Decide what to keep, transform, or omit.
Before outline creation, confirm:
For conference talks, thesis defense, and research presentations.
| Paper Section | Slide Type | Suggested Layout |
|---|---|---|
| Title + Abstract | Cover + Motivation | paper-title, title-hero |
| Introduction | Problem Statement + Background | split-screen, bullet-list |
| Related Work | Context (optional, can condense) | comparison-matrix, hub-spoke |
| Methods | Architecture/Pipeline | methods-diagram, linear-progression |
| Experiments | Setup + Results | results-chart, qualitative-grid |
| Ablation Studies | Detailed Analysis | comparison-matrix, results-chart |
| Conclusions | Summary + Future Work | contributions, bullet-list |
| References | Key Citations | references-list |
| Talk Duration | Recommended Slides | Pace |
|---|---|---|
| 5 min (spotlight) | 5-7 slides | ~1 min/slide |
| 10 min (short) | 8-12 slides | ~1 min/slide |
| 15 min (standard) | 12-18 slides | ~1 min/slide |
| 20 min (full) | 15-22 slides | ~1 min/slide |
| 30+ min (invited) | 25-35 slides | ~1 min/slide |
Inline Citations:
Reference Slide:
For academic papers, automatically detect and map figures/tables to slides.
Run detection script on source PDF:
npx -y bun ${SKILL_DIR}/scripts/detect-figures.ts --pdf source-paper.pdf --output figures.json
Parse detection results to identify:
| Figure Type | Maps To | Extract? | Reasoning |
|---|---|---|---|
| Architecture/Pipeline diagram | Methods slide | Yes | Core visual, must be accurate |
| Network structure | Methods slide | Yes | Technical precision required |
| Quantitative results table | Results slide | Yes | Data accuracy critical |
| Qualitative comparison grid | Results slide | Yes | Visual comparison must be authentic |
| Ablation study table | Analysis slide | Yes | Precise numbers needed |
| Challenge/motivation illustration | Background slide | Maybe | Depends on complexity |
| Conceptual diagram | Any | No | Can be re-stylized by AI |
| Simple flowchart | Any | No | AI can render cleanly |
For each detected figure:
1. Analyze caption keywords:
- "architecture", "framework", "pipeline", "network" → Methods slide
- "comparison", "results", "performance" → Results slide
- "ablation", "analysis" → Analysis slide
- "qualitative", "visual" → Qualitative Results slide
2. Determine extraction necessity:
- Contains numerical data (tables) → Extract
- Contains precise diagrams (architecture) → Extract
- Contains comparison images → Extract
- Simple conceptual illustration → Generate
3. Match to outline slide:
- Find slide with matching topic
- Add IMAGE_SOURCE metadata automatically
| Confidence | Action |
|---|---|
| High (>80%) | Auto-map and extract |
| Medium (50-80%) | Auto-map, flag for review |
| Low (<50%) | Skip, use AI generation |
Extract (High Priority):
Generate (Low Priority):
When auto-populating IMAGE_SOURCE in outline:
// IMAGE_SOURCE
Source: extract
Figure: Figure 2
Page: 4
Caption: Overview of the proposed two-stage framework
Confidence: high
Mapping: Methods slide - "architecture" keyword match
After auto-detection, verify:
Lessons learned from real-world slide generation sessions.
pdfjs-dist Compatibility:
pdfjs-dist/legacy/build/pdf.mjs for Node.js compatibilityPyMuPDF (fitz) Fallback:
import fitz
doc = fitz.open("paper.pdf")
page = doc[page_num - 1] # 0-indexed
mat = fitz.Matrix(3, 3) # 3x scale for 4K quality
pix = page.get_pixmap(matrix=mat)
pix.save("output.png")
PyMuPDF is more reliable for complex PDFs with embedded images.
Model: gemini-3-pro-image-preview
Config:
config=types.GenerateContentConfig(
image_config=types.ImageConfig(
aspect_ratio="16:9",
image_size="4K"
)
)
Response Handling:
part.inline_data.dataimage/jpeg even when requesting PNG outputNetwork Issues:
Optimization:
Directory Structure:
slide-deck/{topic-slug}/
├── source-paper.pdf # Original PDF
├── figures.json # Detection results
├── outline.md # Final outline with IMAGE_SOURCE
├── extracted/ # Raw PDF page extractions
│ └── page-{N}.png
├── prompts/ # Generation prompts
│ └── {NN}-slide-{name}.txt
├── slides/ # Final slide images
│ └── {NN}-slide-{name}.png
├── {topic-slug}.pptx # Merged PPTX
└── generate-slides.py # Generated script (optional)
| Issue | Solution |
|---|---|
| pdfjs "DOMMatrix is not defined" | Use legacy build import |
| pdfjs "Image or Canvas expected" | Use PyMuPDF fallback |
| Gemini "Server disconnected" | Retry with delay |
| Small output files (~600 bytes) | Fix: Don't base64 decode response |
| pdf-lib "Cannot embed PNG" | Check actual image format (may be JPEG) |
| merge-to-pdf fails | Use PPTX as primary output, convert externally |