$npx -y skills add QuZhan51496/paper2anything --skill paper2slidesTurn an academic paper PDF into a presentation deck (.pptx) end-to-end. Use this skill whenever the user wants to \"make slides from a paper\", \"generate a deck from this PDF\", \"make a PPT from this paper\", \"generate slides from a PDF document\", \"make a deck from a researc
| 1 | # paper2slides |
| 2 | |
| 3 | Turn an academic paper PDF into a presentation-ready .pptx. This is a conductor skill: **you** make the |
| 4 | editorial and design judgments, while the mechanical steps are handled by this skill's own self-contained |
| 5 | scripts — PDF parsing via the MinerU cloud API (`scripts/parse_pdf.py`) and .pptx rendering via a PptxGenJS |
| 6 | bridge (`scripts/render_pptx.py`). It orchestrates a "paper → outline → spec → render → QA" pipeline and |
| 7 | depends on no other skill. |
| 8 | |
| 9 | ## Quick Reference |
| 10 | |
| 11 | | Stage | Input | Output | Owner | |
| 12 | |---|---|---|---| |
| 13 | | 0.5. configure | user dialogue | `<workdir>/config.json` | **you** (AskUserQuestion to confirm three items: length tier + whether to run visual QA + color scheme) | |
| 14 | | 1. extract | `paper.pdf` | `paper_meta.json` + `figures_index.json` + `figures/` + `pages/` + `equations` + hi-res figure/table crops (produced in one shot by the MinerU cloud API) | `scripts/parse_pdf.py` | |
| 15 | | 2. outline | `paper_meta.json` | `slide_outline.json` | **you** (per `references/outline-heuristics.md`) | |
| 16 | | 3. spec | `slide_outline.json` + figures | `slide_spec.json` | **you** (per `references/design-style.md`) | |
| 17 | | 4. render | `slide_spec.json` | `output.pptx` | `scripts/render_pptx.py` (PptxGenJS bridge) | |
| 18 | | 5. qa | `output.pptx` | pass / fail + fix list | content QA always runs; **visual QA is gated by Stage 0.5's `config.json/visual_qa`** | |
| 19 | |
| 20 | See `references/pipeline.md` for the detailed per-stage protocol. |
| 21 | |
| 22 | ## Invocation Contract |
| 23 | |
| 24 | Invocation form: |
| 25 | |
| 26 | ``` |
| 27 | /paper2slides <paper.pdf> [output.pptx] [--from-stage <name>] [--force] |
| 28 | ``` |
| 29 | |
| 30 | - `output.pptx` omitted → `<paper-dir>/<paper-stem>_slides/<paper-stem>.pptx`; on a name collision the directory auto-appends `_v2 _v3` |
| 31 | - Intermediate artifacts land in `<paper-dir>/.paper2anything/slides/<paper-stem>/`; when the paper directory is read-only, fall back to `~/.cache/paper2anything/slides/` |
| 32 | |
| 33 | **Python environment**: all scripts run in the `paper2anything` conda environment. Command prefix |
| 34 | `conda run -n paper2anything --no-capture-output python -m scripts.<name> ...` |
| 35 | (the prefix can be omitted once `conda activate paper2anything` is in effect). **Every `-m scripts.<name>` must be run from this |
| 36 | skill's directory (the parent of `scripts/`), otherwise you get `No module named 'scripts'`**; the prefix-omission convention is in |
| 37 | [references/pipeline.md](references/pipeline.md) §General Conventions. |
| 38 | |
| 39 | **The first step is always to resolve the workspace**: |
| 40 | |
| 41 | ```bash |
| 42 | conda run -n paper2anything --no-capture-output python -m scripts.workdir resolve \ |
| 43 | <paper.pdf> [--output <out.pptx>] --ensure |
| 44 | ``` |
| 45 | |
| 46 | The returned JSON contains all the named paths (`paper_meta_path`, `slide_outline_path`, |
| 47 | `slide_spec_path`, `figures_dir`, ...) and each stage's completion status. Every later stage references |
| 48 | the paths in this JSON — **do not assemble paths yourself**; the rules are centralized in `scripts/workdir.py`. |
| 49 | |
| 50 | **Re-run semantics**: |
| 51 | |
| 52 | | Flag | Meaning | |
| 53 | |---|---| |
| 54 | | default | already-completed stages are skipped (judged by whether the output files exist) | |
| 55 | | `--force` | ignore all markers and run everything | |
| 56 | | `--from-stage <name>` | re-run starting from the named stage (the entry point for the long-lived "interactive mode") | |
| 57 | |
| 58 | `<name>` ∈ `{configure, extract, outline, spec, render, qa}`. |
| 59 | **To go through the three pre-flight questions again**, use `--from-stage configure` (overwrites the old `config.json`). |
| 60 | |
| 61 | ## Pipeline |
| 62 | |
| 63 | Execute in the order below. Each stage has a "completion test" — once its output file appears the stage counts as done, and is auto-skipped on re-run. |
| 64 | **Each stage in this section writes only three things: (a) the minimal action to do (including the command to |
| 65 | type), (b) the single most error-prone pitfall, and (c) a pointer to the corresponding Stage in |
| 66 | [references/pipeline.md](references/pipeline.md)**. The full protocol, prerequisites, common errors, and edge cases all |
| 67 | live in pipeline.md; this section does not restate them. |
| 68 | |
| 69 | ### Stage 0.5 — Configure (you, AskUserQuestion to confirm three items) |
| 70 | |
| 71 | After Stage 0 resolves the workspace and before Stage 1, use [AskUserQuestion] to confirm three items with the user, |
| 72 | and Write the answers to the Stage 0 JSON's `config_path` (`<workdir>/config.json`): |
| 73 | |
| 74 | 1. **`deck_length`**: concise / standard / detailed / auto (no page-count target, recommended) |
| 75 | 2. **`visual_qa`**: `true` (default, add |