/paper2video:paper2video <arxiv link or id> [overrides] | short <job id> --plan | short <job id> <slug>from paper2video
Generates a narrated, fact-checked explainer video from an arXiv paper. Runs a multi-step pipeline: installs tools, plans scenes, renders 2D/3D animations, adds subtitles and voiceover, and produces a verification report.
Ships in paper2video. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Paper in, explainer video out. The user picks the paper; everything after that is this workflow, with strict cross-checking instead of script approval. The skill never publishes anything.
Paper to process: $ARGUMENTS
If the arguments start with short, this is a request for a vertical short of a finished job: skip the pipeline
and follow Shorts below. short <job id> with neither --plan nor a slug is an unattended request (p2v run short <job id>): plan, pick the angle with the strongest hook picture yourself, and build that one to the end.
Every step runs through one command: ${CLAUDE_SKILL_DIR}/p2v <subcommand> (works from any directory).
Always type that full path exactly as written here, not a shell variable or cd + ./p2v: the pre-approved
permission matches this exact command, so other spellings stop for a permission prompt.
${CLAUDE_SKILL_DIR}/p2v doctor. It prints the folders (skill, tools, jobs, videos). If it ends with -> run: ... setup,
tell the user "first run: installing tools (~1 GB, a few minutes)" and run ${CLAUDE_SKILL_DIR}/p2v setup once,
with the Bash tool's maximum timeout (600000 ms). If it is cut off, run it again: finished parts are skipped.<jobs>/<id>/), never in the skill folder.
Installed copies keep jobs and videos in ~/paper2video/; a development clone keeps them in the repo.Only the arXiv link or id is required (https://arxiv.org/pdf/2610.35607, .../abs/...v2, 2610.35607).
Anything after it is an override (e.g. 3 min, voice am_michael). Do not ask for more instructions.
Run the whole pipeline below with these defaults:
| Default | Value | User can override with |
|---|---|---|
| Length | 4-5 min, 10-14 scenes | "3 min" |
| Language / voice | English, Kokoro af_heart | ko / Korean / 한국어 → Korean (Supertonic 3 voice F1); another voice id (Kokoro am_michael..., Supertonic F1-F5, M1-M5) |
| Verification | step 9 always runs in a fresh-context subagent, all 5 layers; equations and derivations (not machine-checkable) are checked by the verifier against paper.txt with the evidence written in VERIFY.md | n/a (never skipped) |
| Second review | step 10: a different model reads the verified job against the paper with a short adversarial brief. Who that is comes from ${CLAUDE_SKILL_DIR}/p2v models (default: a subagent; the user can name a model or another command-line tool) | "reviewer codex", "reviewer agent:", "no second review" → p2v models reviewer=... (off to skip) |
| Fix loop | fix and re-verify up to 3 rounds, at most 3 review rounds, then stop with BLOCKED and the open items | n/a |
| Templates | if the skill folder is a git clone you can edit, move any new scene that would work for other papers into engine/templates.js; otherwise (plugin install, or an unattended run through p2v run, which may write only under the jobs folder) keep it in the job's scenes.js and list it as a template candidate in the report | n/a |
| Publishing | never upload or post anywhere; the MP4 is the end product | n/a |
| Git | do not commit; leave changes for review | "commit it" |
Only stop to ask the user when blocked (license forbids the planned visuals, the PDF has no text layer, verification BLOCKED after 3 rounds, a review BLOCKER still open after 3 rounds, or a toolchain step fails twice).
The commands carry the process, so it does not depend on remembering this page: p2v check, p2v verify, p2v review and
p2v render each refuse to go on until the step before is done for the files as they are now, and say what to do next.
When unsure where a job stands (a resumed session, a long fix loop): ${CLAUDE_SKILL_DIR}/p2v status <id>.
When the overrides ask for Korean:
script.json: "lang": "ko"; write subtitles and every on-screen string in natural Korean (plain 해요체 for narration).
Keep widely used technical terms in English the first time, with a Korean gloss ("BEV(위에서 내려다본 지도)").tts.py picks Supertonic 3 automatically for non-English lang (first run downloads the model).claims.json quotes stay verbatim English from the paper; claim text may be Korean.Per step: done / failed + output path · VERIFY.md verdict and open items · REVIEW.md verdict, who reviewed (the reviewer: line),
what was changed because of it and every MINOR item left as it is · video path in the videos folder + length ·
new templates added · wall-clock time · anything the user should look at first.
Setup (${CLAUDE_SKILL_DIR}/p2v setup) installs Node packages, ffmpeg, Playwright Chromium, a Python 3.10-3.13 venv and the Kokoro voice model
into the tools folder, which survives updates. If the default python3 is 3.14+, it picks 3.13/3.12, or set PYTHON=/path/to/python3.12.
| # | Step | Command / output |
|---|---|---|
| 1 | Fetch paper + license | ${CLAUDE_SKILL_DIR}/p2v fetch <arxiv id or link> → <jobs>/<id>/paper/{meta.json,paper.pdf,paper.txt} and job skeleton |
| 2 | Read + outline | Read paper.txt fully. Fill <jobs>/<id>/BRIEF.md (license block first, outline that follows the paper's own logic, shot list). For every scene that shows how something works, fill the mechanism row first (references/mechanism-scenes.md): the one sentence a viewer can repeat, one concrete case, the change one can see. Numbers go to the results scenes |
| 3 | Script | <jobs>/<id>/script.json: scenes → sentences [subtitle, tts_text]. Read references/error-types.md first: how these videos went wrong (facts, types 1-10) and what a first-time viewer stumbled over (types 11-13), as rules with before/after sentences. At most 2 numbers and 28 narration words per sentence, and the whole video within "seconds" (4-5 min by default; set it from the user's override). The length is a target: write for it, and do not cut or pad a sentence over the last 10 s (the check passes up to 10 s over). Every acronym, benchmark, metric and baseline name goes into "terms" with words that say what it is and what sets it apart ("common" when this audience knows it); they are said or, better, drawn (24 px or more) where the term first appears. Names of one kind (the baselines of a chart) share one entry and are shown once |
| 4 | Claims | <jobs>/<id>/claims.json: every factual statement and every on-screen number, with source; used_in lists every sentence (<scene id>.<index>) that says or shows it. Every claim the video uses lists the conditions the paper attaches to it (benchmark and split, model and size, setting, baseline, hardware, the tasks a result was measured on; [] only when the paper attaches none), a result without a number as much as a number. First, settings (the BRIEF's settings table): for every benchmark whose results the video reports, what the paper fixes for all of them, with its words (p2v check then asks every result on that benchmark for those conditions) |
| 5 | Mechanical check (script) | ${CLAUDE_SKILL_DIR}/p2v check <id> → must be FAIL 0, WARN 0 for subtitles, narration and claims (scene numbers are checked again in step 8). It also checks the load of every sentence and that every term is listed, and lists sentences "to rule on" (absolutes, unit phrases, metric directions) in build/VERIFY_auto.md: read each against the paper now and fix the ones that say more than the paper |
| 6 | Scenes | <jobs>/<id>/scenes.js (templates + custom), replacing the starter scene. See references/scene-authoring.md |
| 7 | Narration + timing | ${CLAUDE_SKILL_DIR}/p2v tts <id> → build/narration.wav, build/timing.json |
| 8 | Preview QA + check | ${CLAUDE_SKILL_DIR}/p2v preview <id> → build/preview_*.jpg and build/onscreen.json (every string drawn). Look at every sheet (overflow, overlap, blank, legibility, camera inside geometry), then ${CLAUDE_SKILL_DIR}/p2v check <id> again: FAIL 0, WARN 0 now includes numbers drawn by scenes, every condition of a number and every term's gloss (in the sentence, or on screen in its scene), the labels of derived and opinion claims (really drawn where the claim is used), the end card (license, "not affiliated with the authors", narration voice) and the length measured from the narration |
| 9 | Independent verification | ${CLAUDE_SKILL_DIR}/p2v verify <id> writes build/VERIFY_brief.md (every claim next to its sentences, the rows to rule on, the id of the files judged) and stops with exit 5: spawn the verifier it describes, with the prompt it prints and nothing more → <jobs>/<id>/VERIFY.md. Run the command again: exit 0 = PASS for these files. Otherwise fix what the report requires, in place (correct the sentence, label or drawing it names; removing the part a fix is about is not a fix, and every added word is checked like the rest), re-run 5-8 for what changed, and run the command again: it rewrites the brief and prints the message to send to the same verifier, which appends a round. At most 3 rounds |
| 10 | Second review | ${CLAUDE_SKILL_DIR}/p2v review <id> hands a copy of the verified job to another model. A command-line reviewer is run by the command itself; for a subagent it stops with exit 5 and the prompt to spawn it with, then run the command again → <jobs>/<id>/REVIEW.md. Exit 0 (review: OK or MINOR) goes on. Exit 1 (BLOCKER): check each BLOCKER against paper.txt; if it is right, fix it, re-run 5-8, then 9 and 10 again; if the files already match the paper, say why in <jobs>/<id>/REVIEW_reply.md and run 10 again. At most 3 rounds. Details: references/verification.md |
| 11 | Render | ${CLAUDE_SKILL_DIR}/p2v render <id> → <videos>/<id>_<Short-Title>[_ko].mp4 (shortcut to build/<id>.mp4) + build/contact.jpg (no Playwright: render <id> --manual, open the URL in any browser). It refuses until steps 9 and 10 passed for exactly these files |
| 12 | Final checks | ${CLAUDE_SKILL_DIR}/p2v check <id> once more (the render records every frame's text, so it sees more than the preview). Must be FAIL 0, WARN 0. Watch contact.jpg; for a closer look at one moment, ${CLAUDE_SKILL_DIR}/p2v frames <id> --at <sec> (or --scene <n>) → build/frames_extract/ |
| 13 | Report | Final report (below). If local/*.md exists in the skill folder, follow those personal add-on steps after this one |
Re-runs: steps 7, 8, 11, 12 are idempotent. Any change to script.json, claims.json or a scene file after step 9 → re-run 5, 7, 8, then 9 and 10 (both name the files they judged, so the render notices an edit made after them).
${CLAUDE_SKILL_DIR}/p2v models shows the three roles and the tools on this machine that can review; p2v models reviewer=<spec>
(or verifier=, writer=) sets one, in <work>/p2v.config.json.
p2v run: writer=<model>, or writer=agy:<model> for a headless Antigravity session,
which needs command-line readers). The checks, the generated briefs and the two readers are what keep another writer's
video correct: in blind comparisons Gemini 4 Neon through Antigravity, verified by claude:sonnet and reviewed by
agy:gemini-4-carbon-high, was judged ready to publish on two papers.verifier=agent:<model> names its model.agent or agent:<model> (a subagent), claude:<model>, codex, gemini, agy, grok (that tool, run
read-only in a copy of the files), cmd:<command> (any other tool; {dir}, {prompt} and {out} are filled in), or off.
The verifier takes the same values except off; a command-line verifier is run by p2v verify itself, so a writer in any
harness (Codex, Antigravity, ...) gets the same readers. p2v bench compares writer models on one paper this way.
When spawning a reader, pass the model the command names; if the spawn fails with that model, spawn without one and say so in the
report. A reader on the writer's own model still helps (fresh context, a different brief), but less: pick another model where one
is available, and never ask the user to choose mid-run. Name both readers in the final report.short <job id> --plan, short <job id> <slug>)A short is a 45-60 s vertical video (1080x1920) on one angle of a job whose VERIFY.md ends in overall: PASS.
It is re-rendered for a phone, never cropped from the 16:9 video, and it only uses claims the job's claims.json
already has. It opens on a picture (a result figure of the paper, or an original animation), not on a number: the
number is the payoff later. Its background is plain black: the frame holds the subject, its labels and the captions,
and only text, numbers and captions have to stay inside the safe area (a picture may run to the edges). Read references/shorts.md first: it has the script rules, the frame, the rules for
paper figures and the templates.
| # | Step | Command / output |
|---|---|---|
| 1 | Brief | ${CLAUDE_SKILL_DIR}/p2v short <id> --plan → claims, registered figures, payoffs already taken, plan schema (exit 4 when there is no plan yet) |
| 2 | Plan | Write <jobs>/<id>/shorts/plan.json: one colour for the paper (accent, from its figures or its subject, never a brand colour) and 2-3 angles (slug, hook sentence of at most 10 words, what the first two seconds show, payoff sentence and its claims, claim ids, figures, estimated length). An angle may name a paper figure that is not registered yet (p2v figures <id> lists the candidates and writes nothing). Write nothing else at this stage |
| 3 | Show | ${CLAUDE_SKILL_DIR}/p2v short <id> --plan again → checked plan. With --plan, stop here and show the angles to the user |
| 4 | One angle | ${CLAUDE_SKILL_DIR}/p2v short <id> <slug> creates the skeleton (exit 4). Write shorts/<slug>/script.json and scenes.js (6-9 sentences: picture hook first, the payoff number later, "full video" pointer last). For a paper figure: ${CLAUDE_SKILL_DIR}/p2v figures <id> lists and extracts the PDF's images (a plot or diagram drawn as vector graphics: --page N --render, then --rect X,Y,W,H); register the ones used in <jobs>/<id>/figures.json, check what else is in each picture and under which terms (simulator, dataset, another model: the third_party record, references/shorts.md rule 8). figures.json is the record of figure use; the build writes the credits to build/CREDITS.md |
| 5 | Build | ${CLAUDE_SKILL_DIR}/p2v short <id> <slug> → check FAIL 0 / WARN 0, narration, 45-60 s, preview sheets, check again. Fix what it reports until it stops with exit 5. Look at every build/preview_*.jpg and preview_safe_*.jpg: text inside the yellow box, nothing overlaps |
| 6 | Verify | Fresh-context verifier subagent, given only build/VERIFY_brief.md to follow → shorts/<slug>/VERIFY.md (qualifiers kept, nothing new, hook and payoff, screen, end card, paper figures). Fix, build again and send it back to the same verifier, which appends a round to VERIFY.md; at most 3 rounds, then BLOCKED |
| 7 | Render | ${CLAUDE_SKILL_DIR}/p2v short <id> <slug> → <videos>/<video name>_short-<slug>.mp4, build/contact.jpg, build/contact_safe.jpg. Look at both sheets: text reads, nothing is cut off |
| 8 | Report | Path, length, size and codecs of the MP4, the verifier's verdict, build/CREDITS.md (the credit lines for a description), every open third-party item of the paper figures (what was found, what was not), anything the user should look at first |
Build one angle unless the user asks for more; a job has at most 3, and their payoffs must rest on different claims
and numbers. Running a slug again rebuilds only that angle; "rev": 2 in short gives a revised short new file names
and keeps the earlier MP4. Never edit the job's own files for a short (BRIEF.md included: it describes the full video); a short only adds
figures.json and the extracted images under paper/figures/ when it shows a paper figure. Never draw a
picture that looks like a model output, and use nothing from a project page.
meta.json.figure_reuse decides whether paper figures may appear. Default: draw everything yourself; never paste paper figures or dataset camera images unless the license allows it (references/licensing.md). No company logos.allow_numbers entry with the reason. Leave tts in script.json empty unless the user
asked for a specific voice: the engine follows lang (Kokoro for en, Supertonic for others).claims.json. Rounded numbers must state the exact source value in the claim text (e.g. "141.72 → shown as 142").p2v check looks for each one in every sentence that uses it. This is the most common way these videos went wrong (references/error-types.md). What the paper fixes per benchmark (model size, environment variant, difficulty, step budget) sits in the setup section, far from the result: list it once in claims.json settings while reading, and every result on that benchmark has to carry it. Reviewers kept finding exactly these missing ("the 12M model", "sticky actions", "hard difficulty"). A cost (GPU days, FLOPs, dollars) carries its unit of count the same way: per game, per seed, per run, or in total, as the paper's table gives it ("16.1 GPU days per ProcGen game", not "ProcGen took 16.1 GPU days").titleCard({ art })): what the method does, seen at a glance, not a pasted figure and not the first explanation (no chart, no numbers, no list).if (g >= 1) ring(...)) fades in when the line arrives. p2v preview finds what appears out of empty background in a single frame and p2v check lists it. Viewers took these for glitches.x + 90 * Math.sin(t)) reads as broken: viewers called it "weird".meta.json, "not affiliated with the authors" and the narration voice with its license, alone on screen for at least 3 s. endCard({ title }) draws all of these itself.p2v check refuses it. Say what the paper says sets the thing apart, or show a group of names once with what they have in common. A gloss on screen costs no narration time, and the video still has to fit its length.derived / opinion kinds need on_screen_label).references/mechanism-scenes.md). It says almost no numbers and at most a name or two: p2v check stops a scene that says more than 4 numbers or more than 3 acronyms and names."terms" in script.json; p2v check holds both).better: 'higher' | 'lower' in barCompare and lineChart; lowerBetter in groupBars and hBars, whose default note says "higher is better").engine/ timeline player (main.js), 3D/2D primitives (core.js), reusable templates (templates.js), portrait templates for shorts
(templates_vertical.js), frame format and safe area (format.mjs)scripts/ fetch, tts, check_claims, rules (conditions, end card, sentences to rule on), review (verify, second review, models, status, the render gate), bench (writer models compared), remote (steps a sandboxed harness cannot run), check_short, serve/render (frames → MP4 via ffmpeg), short, figures (images of the PDF), frames (stills), cleanp2v single entry point (setup, doctor, fetch, check, status, tts, preview, verify, review, models, render, short, figures, frames, clean, gpus, collect, smoke, test, run, paths; p2v help lists the options); scripts/p2v_paths.py decides the foldersbuild/frames (the JPEG frames, ~1.3 GB for 5 min) is deleted after the mux once the MP4's length matches the frame count (±0.2 s);
otherwise it is kept with a warning. p2v render <id> --keep-frames keeps it; p2v clean lists leftovers and p2v clean --yes deletes them
(never for a job with no MP4, changed in the last 24 h, or whose MP4 length does not match).p2v frames <id> --at <sec>[,<sec>...] | --scene <n|id> | --every <sec> | --all decodes them from the MP4
(fast, lossy); add --exact to re-render them from the current scenes.js as lossless PNG. Output: build/frames_extract/ (or --out <dir>),
which no cleanup touchestemplates/job/ skeleton copied into new jobs; templates/short/ skeleton of a shortjobs/2610.30340/ complete worked example (copied into the jobs folder on first use) (Foundation4D, 14 scenes, 66 claims, 4.6 min)jobs/_smoke/ and jobs/_smoke_ko/ short template-only jobs for testing the toolchain (English / Korean);
jobs/_smoke/shorts/demo/ the portrait fixturereferences/ verification (and the second review), error types, mechanism scenes, explanation rubric, scene authoring, shorts, licensinglocal/ (optional, git-ignored) your own add-on steps, e.g. a publishing checklist${CLAUDE_SKILL_DIR}/p2v smoke # English; stops at the first failing step; render refuses stale narration
${CLAUDE_SKILL_DIR}/p2v smoke --ko # also tests Korean narration (downloads the Supertonic model on first run)
${CLAUDE_SKILL_DIR}/p2v smoke --short # also renders the portrait fixture (1080x1920)
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sunandbean/paper2video --plugin paper2videoOther plugins' skills for the same job