$npx -y skills add luwill/research-skills --skill paper-slide-deckUse when the user wants visually striking, shareable slide-deck IMAGES from any content — an article, blog post, topic, or paper — where look-and-feel matters more than editable precision (风格化幻灯/小红书配图/公众号配图/视觉化海报), optimized for reading and social sharing rather than live present
| 1 | # Paper Slide Deck Generator |
| 2 | |
| 3 | Transform academic papers and content into professional slide deck images with automatic figure extraction. |
| 4 | |
| 5 | ## Usage |
| 6 | |
| 7 | ```bash |
| 8 | /paper-slide-deck path/to/paper.pdf |
| 9 | /paper-slide-deck path/to/paper.pdf --style academic-paper |
| 10 | /paper-slide-deck path/to/content.md --style sketch-notes |
| 11 | /paper-slide-deck path/to/content.md --audience executives |
| 12 | /paper-slide-deck path/to/content.md --lang zh |
| 13 | /paper-slide-deck path/to/content.md --slides 10 |
| 14 | /paper-slide-deck path/to/content.md --outline-only |
| 15 | /paper-slide-deck # Then paste content |
| 16 | ``` |
| 17 | |
| 18 | ## Setup (one-time) |
| 19 | |
| 20 | The TypeScript scripts (`merge-to-*`, `detect-figures`, `extract-figure`, |
| 21 | `apply-template`) need Node dependencies. Install them once: |
| 22 | |
| 23 | ```bash |
| 24 | cd ${SKILL_DIR}/scripts && npm install |
| 25 | ``` |
| 26 | |
| 27 | This installs `canvas`, `pdfjs-dist`, `pptxgenjs`, and `pdf-lib` (a `package-lock.json` |
| 28 | pins versions). If a script exits with `missing Node dependency "<name>"`, run the |
| 29 | command above. The Python generator (`generate-slides.py`) auto-installs `google-genai` |
| 30 | on first run. |
| 31 | |
| 32 | **Also install PyMuPDF** (`pip install pymupdf`) — it is the reliable fallback for |
| 33 | extracting figures from pages that embed bitmaps (X-rays, CAM heatmaps, photographs), |
| 34 | where the `pdfjs` + `canvas` path in `extract-figure.ts` fails with |
| 35 | `Error: Image or Canvas expected`. For medical-imaging papers this is the common case, |
| 36 | not the exception, so treat PyMuPDF as required, not optional. |
| 37 | |
| 38 | ### Image generation & no-API-key path |
| 39 | |
| 40 | Image generation needs either a `GOOGLE_API_KEY`/`GEMINI_API_KEY` (Gemini API) or the |
| 41 | Gemini Web skill. **If no key and no web option is available, the skill still works in |
| 42 | a degraded mode** — do not abort: |
| 43 | |
| 44 | 1. Run with `--outline-only` to produce the outline + prompts (no images). |
| 45 | 2. For a source PDF, extract real figures/tables with `detect-figures.ts` + |
| 46 | `extract-figure.ts` + `apply-template.ts` (no API key needed — pure rendering). |
| 47 | 3. Merge whatever slides exist (`extract`-sourced pages) into PPTX/PDF, and hand the |
| 48 | `prompts/` back to the user to generate images later when a key is available. |
| 49 | |
| 50 | ## Script Directory |
| 51 | |
| 52 | **Important**: All scripts are located in the `scripts/` subdirectory of this skill. |
| 53 | |
| 54 | **Agent Execution Instructions**: |
| 55 | 1. Determine this SKILL.md file's directory path as `SKILL_DIR` |
| 56 | 2. Script path = `${SKILL_DIR}/scripts/<script-name>.ts` |
| 57 | 3. Replace all `${SKILL_DIR}` in this document with the actual path |
| 58 | |
| 59 | **Script Reference**: |
| 60 | | Script | Purpose | |
| 61 | |--------|---------| |
| 62 | | `scripts/generate-slides.py` | Generate AI slides via Gemini API (Python) | |
| 63 | | `scripts/merge-to-pptx.ts` | Merge slides into PowerPoint | |
| 64 | | `scripts/merge-to-pdf.ts` | Merge slides into PDF | |
| 65 | | `scripts/detect-figures.ts` | Auto-detect figures/tables in PDF (heuristic; verify pages) | |
| 66 | | `scripts/extract-figure.ts` | Render a full PDF page to PNG (optional `--crop`; PyMuPDF fallback) | |
| 67 | | `scripts/apply-template.ts` | Apply figure container template | |
| 68 | |
| 69 | ## Options |
| 70 | |
| 71 | | Option | Description | |
| 72 | |--------|-------------| |
| 73 | | `--style <name>` | Visual style (see Style Gallery) | |
| 74 | | `--audience <type>` | Target audience: beginners, intermediate, experts, executives, general | |
| 75 | | `--lang <code>` | Output language (en, zh, ja, etc.) | |
| 76 | | `--slides <number>` | Target slide count | |
| 77 | | `--outline-only` | Generate outline only, skip image generation | |
| 78 | |
| 79 | ## Style Gallery |
| 80 | |
| 81 | | Style | Description | Best For | |
| 82 | |-------|-------------|----------| |
| 83 | | `academic-paper` | Clean professional, precise charts | Academic-style visuals, technical handouts (for a faithful *editable* talk use scholar-slides) | |
| 84 | | `blueprint` (Default) | Technical schematics, grid texture | Architecture, system design | |
| 85 | | `chalkboard` | Black chalkboard, colorful chalk | Education, tutorials, classroom | |
| 86 | | `notion` | SaaS dashboard, card-based layouts | Product demos, SaaS, B2B | |
| 87 | | `bold-editorial` | Magazine cover, bold typography, dark | Product launches, keynotes | |
| 88 | | `corporate` | Navy/gold, structured layouts | Investor decks, proposals | |
| 89 | | `dark-atmospheric` | Cinematic dark mode, glowing accents | Entertainment, gaming | |
| 90 | | `editorial-infographic` | Magazine explainers, flat illustrations | Tech explainers |