Fix Slide Issues
Identify and fix slides with content overflow or blank pages in Slidev presentations.
Arguments
The skill accepts a file to edit (e.g., slides.md or pages/week-19.md).
If not provided, auto-detect the latest child slide deck:
- •Read the main
slides.mdto findsrc:imports - •The first
src:import (after the title slide) is typically the latest week - •Use that file as the target (e.g.,
pages/week-21.md)
Context Management (CRITICAL)
⚠️ Use a subagent to analyze the PDF - PDFs can consume the entire context window.
Task tool → subagent_type: "general-purpose" Prompt: "Read tmp/slide-check.pdf and identify: (1) pages with content overflow/cut-off, (2) blank pages. Return a list of page numbers and issues found."
Workflow
- •
Determine slide range for the target file:
- •Count slide separators (
---) in the target file to get slide count - •Find the page offset by checking which
src:import it is inslides.md - •Example: If
pages/week-21.mdis the first import after title slide, and has 14 slides, export range2-15
- •Count slide separators (
- •
Export as PNG images for targeted analysis (avoids PDF context bloat):
bashmkdir -p tmp/slides-images bunx slidev export slides.md --format png --output tmp/slides-images/slide --range <start>-<end> --timeout 120000
- •
Analyze images directly - Read the PNG files to identify:
- •Pages where content is cut off (text/tables/callouts extending beyond slide boundaries)
- •Blank pages (may indicate uncommented
---between commented sections)
- •
Fix overflows using these patterns:
- •Wrap content in
<div class="text-sm">ortext-xsfor smaller text - •Reduce grid gaps:
gap-8→gap-4 - •Reduce margins/padding:
mt-4 p-3→mt-2 p-2 - •Condense verbose text while preserving key information
- •Split into multiple slides if content is too dense
- •Wrap content in
- •
Fix blank pages - Comment the
---separator between commented sections:markdown<!-- slide content --> <!-- --- --> <!-- more content -->
- •
Re-export and verify (just the affected slides):
bashbunx slidev export slides.md --format png --output tmp/slides-fixed/slide --range <affected-pages> --timeout 120000
Read the fixed PNG files to confirm the issue is resolved.
- •
Report which slides were fixed and what changes were made.
Notes
- •Image errors or component rendering issues (e.g., BarChart) are separate - note them but focus on overflow/blank issues
- •Prefer condensing text over splitting slides when possible
- •Preserve key information and emphasis (bold, callout boxes)