Communitygithub.com

lecture-viz

Turn lecture slides (PDF or PPTX) into a 3Blue1Brown-style deck of video slides, where each slide is a still image or a Manim animation, delivered as a click-through presenter page and a stitched MP4. Use this whenever someone wants to animate, visualize or "3b1b-ify" lecture slides, course notes in slide form, a seminar or teaching deck, or asks to make a lecture more visual or explain slides with Manim animations, even if they don't say "3Blue1Brown". Not for pitch decks, business slides, or a single standalone Manim clip with no slides involved.

What is lecture-viz?

lecture-viz is a Claude Code agent skill that turn lecture slides (PDF or PPTX) into a 3Blue1Brown-style deck of video slides, where each slide is a still image or a Manim animation, delivered as a click-through presenter page and a stitched MP4. Use this whenever someone wants to animate, visualize or "3b1b-ify" lecture slides, course notes in slide form, a seminar or teaching deck, or asks to make a lecture more visual or explain slides with Manim animations, even if they don't say "3Blue1Brown". Not for pitch decks, business slides, or a single standalone Manim clip with no slides involved.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/jaycewalzer1/lecture-viz/tree/HEAD/skill

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Lecture slides to 3b1b-style video slides

The job is to re-explain the lecture visually, not to decorate it. A bullet list that fades in is a failed slide. Each output slide should make one idea visible, in the way a good teacher would draw it on a board.

lecviz handles the mechanics. You make the teaching decisions and write the Manim scenes.

Run lecviz doctor first. If the command is missing or reports problems, tell the user to run setup.sh from the lecture-viz repo.

1. Ingest

Put the working folder next to the input unless the user names another place.

lecviz ingest lecture.pdf lecture-viz-out/

This writes source/slide-NNN.png, source/figures/, and source/slides.json (text and speaker notes). Look at every slide image, because the text extraction loses equations and diagrams. If ingest warns that a PPTX has no slide images, ask for a PDF export when the slides are equation-heavy.

2. Storyboard, then get a yes

Read references/visual-language.md before writing the storyboard. Write deck.yaml:

title: Gradient Descent
skipped_sources: []           # source slides left out on purpose
slides:
  - id: which-way-is-down     # lowercase and hyphens; also the output name
    kind: video               # video or static
    scene: scenes/s02_down.py:WhichWayIsDown
    source: [2]               # source slides this covers; one, several or none
    title: Which way is down?
    idea: The negative gradient is the steepest way down.  # the one idea
    notes: "Pause after the arrow flips."                  # shown to the presenter; quote free text, since a colon breaks YAML
    added: "The example function is not in the source."    # anything beyond the source; build lists these for the lecturer
    hold: 1.5                 # seconds held in the stitched MP4
  - id: logistics
    kind: static
    image: source/slide-006.png   # keep the original slide as is
    source: [6]
    title: Homework

title labels the slide in the presenter page, so keep it the same as the heading the scene draws. Output slides need not map one to one. Merge three bullet slides into one animation, or split one dense slide into several, whenever that teaches better.

Show the user the storyboard as a compact table (slide, kind, the one idea, what is on screen) and wait for their approval, because rendering is slow and a wrong plan wastes all of it. Skip the wait only if they told you to go straight through.

3. Write the scenes

Read references/scene-patterns.md before writing the first scene. Each slide gets its own file in scenes/, because the render cache works per file. Colors and constants shared across slides go in scenes/common.py. A slide re-renders when its file or anything it imports from scenes/ changes, so editing common.py re-renders everything: keep it small, and put a heavy model used by a few slides in its own module.

from common import *   # common.py does: from lecviz.style import *

class WhichWayIsDown(SlideScene):
    def construct(self):
        ...

Compute what you show. Curves, iterates and numbers should come from running the math inside the scene, not from hand-placed points, so the picture can't drift from the claim.

4. Draft, look, fix

lecviz render lecture-viz-out/          # 480p; unchanged slides are reused
lecviz check lecture-viz-out/

check prints each slide's frame sheet path, plus layout problems and any source slide not accounted for. Read every sheet with the Read tool. The linter only knows about text boxes, so you are the one who catches a label sitting on a curve, an arrow pointing the wrong way, or a slide that is confusing. A clean check says little about a diagram-heavy deck, so the sheets are the real review. Each sheet ends with the true last frame, which is what the player holds. Sheets are samples, so for a slide with beats that fall between samples, ask for more with --only <id> --frames 12. Fix and re-render with --only <id> until the sheets look right. Pay attention to the exit status of render and check, since a failed run leaves earlier sheets on disk. Scenes with many always_redraw objects can take minutes per slide even in draft, so run long renders in the background.

5. Fact-check

Once the drafts are settled, and with no render running, spawn a subagent with the source slide images, the scene files and the frame sheets, without your reasoning. Ask it to list every on-screen claim that is wrong, unsupported by the source, or mislabeled, including formulas, numbers, axis labels and plotted behavior, and tell it that it may extract more frames with ffmpeg from renders/, because plotted behavior can't be judged from code alone. Fresh eyes catch errors that the author reads straight past, and a lecturer will present this to a room. Fix the real errors, then send the changed slides back for a second look, since fixes introduce errors too. Record anything the source didn't say, such as a worked example, in that slide's added: field.

6. Build and deliver

lecviz render lecture-viz-out/ --quality final
lecviz check lecture-viz-out/ --quality final
lecviz build lecture-viz-out/
open lecture-viz-out/deck/index.html

Final renders are 1080p60 and much slower, so run them in the background. Report the two outputs: deck/index.html, the presenter page (arrow keys, and the deck folder must travel together), and deck/deck.mp4, the stitched video. Then list any source slides you skipped, everything build printed as added, and anything you could not verify. The slides are silent: there is no narration, because the lecturer is the narrator.

Commands

CommandPurpose
lecviz ingest <file> <dir>Extract images, text, notes, figures
lecviz render <dir> [--quality draft|final] [--only ID...] [--force] [--jobs N]Render slides, reusing unchanged ones
lecviz check <dir> [--quality ...] [--only ID...] [--frames N]Frame sheets in qc/<quality>/, layout lint, source coverage
lecviz build <dir> [--quality ...]Presenter page and stitched MP4

Related Skills