Sandbox
@AI272/speaker

Codex skill for PPTX speaker notes

This skill takes a real PowerPoint deck and builds speaker notes from the slide content, not from guesses. It extracts text and structure, renders slides, runs OCR on visual regions, and prepares a review packet before writing clean notes into the PowerPoint notes pane.

451 stars17 forksPythonUpdated 2mo ago
Who it's for

Builders who need slide-grounded speaker scripts for academic presentations in Codex or Claude Code.

What it delivers

You can turn a real `.pptx` into rehearsal notes and injected speaker notes without re-explaining each slide by hand.

What it does

Structured slide extraction

Reads titles, body text, placeholders, text boxes, tables, charts, OOXML text, and existing notes.

Slide rendering

Renders each slide to PNG so visual content can be checked directly.

OCR and visual inventory

Collects text from screenshots, images, labels, and other visual regions into a per-slide inventory.

Vision review packet

Packages evidence for a vision-capable reviewer or human to confirm complex slides.

Display and clean outputs

Generates a rehearsal document and a clean notes version, then injects the clean notes into the PPTX.

Timing and pacing rules

Uses a per-slide budget with pause-aware pacing so the script fits the target talk length.

How to get it

  1. 1Download or use the packaged skill
    speaker-v8.skill
  2. 2For Claude Code, this repository includes a project skill at…
    /ppt-speech-writer

README

speaker Available on CodeGuilds

speaker cover

中文说明

speaker is a Codex skill project for academic presentations. It reads a real .pptx, combines text extraction, PPTX structure inspection, slide rendering, OCR, and vision review, then generates grounded speaker notes and injects the clean script into PowerPoint's speaker notes pane.

Current skill package: speaker-v8.skill
Internal skill name: ppt-speech-writer

What's New in v0.8

This release focuses on tighter, evidence-grounded output and realistic speech pacing.

  • Pause-aware pacing model. Speech length is now budgeted with a deterministic model (English ~110 wpm, Chinese ~165 characters/min) that reserves time for slide transitions and [PAUSE] marks. This fixes the previous problem where a "15-minute" script ran to ~1,800 words and overran to ~30 minutes; a 15-minute talk now targets roughly 1,300–1,400 words. Both Chinese and English notes are tuned per slide.
  • Per-slide word budget. SKILL.md now computes and records a per-slide budget so each slide stays within the overall time target, and the timing table reports words/characters, budget, and pauses with a TOTAL row.
  • Glossary toggle. A new on/off switch (default on) can skip the "Key Parameters And Methods" glossary table end to end.
  • Compact extraction (read_slides.py --mode compact). Drops redundant raw OOXML dumps and non-visual geometry while keeping picture bounding boxes, producing much smaller intermediate JSON.
  • Region-scoped OCR (visual_inventory.py --ocr-scope image-regions). OCR runs only on picture/media regions (text boxes, tables, and charts already come from XML), with an automatic full-slide fallback. Includes robustness fixes: byte-safe OCR decoding and symlink path resolution.
  • Compact vision-review packet (vision_review.py --format compact). The shared review prompt and result schema are hoisted to the top level instead of being repeated per slide; Markdown is now optional.
  • Concise final delivery. The skill returns a summary plus file paths by default instead of pasting the full slide-by-slide script into chat. Reply show notes to print the complete notes.

What It Solves

Many presentation-note tools only read text boxes. That misses charts, screenshots, SmartArt, axes, legends, tables, and text embedded in images. This skill is designed to keep speaker notes grounded in the actual slides:

  • Build a visible-element inventory for every slide.
  • Review visually complex content with a vision-capable agent or human reviewer.
  • Tie each spoken sentence to visible slide evidence.
  • Produce two versions: a display version for rehearsal and a clean version for PowerPoint notes.

Workflow

flowchart TD
    A[Input .pptx] --> B[Structured Extraction]
    B --> C[Render Slides to PNG]
    C --> D[OCR and Visual Inventory]
    D --> E[Vision Review]
    E --> F[Deck Comprehension Brief]
    F --> G[Narrative Arc]
    G --> H[Slide-by-Slide Display Notes]
    H --> I[Clean Notes JSON]
    H --> J[Display Version DOCX or Markdown]
    I --> K[Inject Notes into PPTX]
    K --> L[Output PPTX with Speaker Notes]

Evidence Chain

graph LR
    XML[PPTX XML] --> INV[Visible Element Inventory]
    TEXT[Text Boxes] --> INV
    TABLE[Tables] --> INV
    CHART[Native Charts] --> INV
    IMAGE[Rendered Slide Images] --> INV
    OCR[OCR Text] --> INV
    VISION[Vision Review] --> INV
    INV --> NOTES[Grounded Speaker Notes]

Features

FeatureDescription
Text extractionExtracts titles, body text, placeholders, and text boxes
Table extractionReads row and column text from PowerPoint tables
Chart extractionAttempts to read native chart titles, categories, series, values, axes, and legends
OOXML fallbackExtracts additional slide XML text not exposed by python-pptx, including some SmartArt or grouped-shape text
Slide renderingRenders slides to PNG so the final visual presentation can be inspected
OCROptionally reads text in screenshots, images, small labels, and other visual regions
Vision reviewProduces a review packet for a vision-capable agent or human reviewer
Notes injectionWrites clean speaker notes into the PowerPoint notes pane
Display documentGenerates a complete rehearsal document as .docx, with Markdown fallback when python-docx is unavailable

Repository Layout

ppt-speech-writer/
├── SKILL.md
└── scripts/
    ├── read_slides.py
    ├── render_slides.py
    ├── visual_inventory.py
    ├── vision_review.py
    ├── write_display_docx.py
    └── inject_notes.py

speaker-v8.skill

Claude Code compatibility:

.claude/skills/ppt-speech-writer -> ../../ppt-speech-writer
CLAUDE.md

Installation

Download or use the packaged skill:

speaker-v8.skill

Install it using your Codex client's skill import flow. Once installed, use it when you need speaker notes, presenter notes, a speech script, or narration for a real .pptx file.

For Claude Code, this repository includes a project skill at .claude/skills/ppt-speech-writer. Open Claude Code from the repository root and invoke:

/ppt-speech-writer

If Claude Code is already running, use /reload-skills after pulling updates.

Example Prompt

Use speaker / ppt-speech-writer to write a 15-minute academic presentation script
for this PowerPoint deck. Inject the clean script into speaker notes and also
generate a complete display-version rehearsal document.

The skill will:

  1. Read the full deck.
  2. Render every slide.
  3. Build a visual inventory.
  4. Run vision review for visually complex content.
  5. Produce a Deck Comprehension Brief.
  6. Confirm the narrative arc.
  7. Write display notes and clean notes.
  8. Generate the complete display document.
  9. Inject clean notes into the .pptx.
  10. Keep intermediate evidence files inside work/.

Before writing notes, the skill must explicitly confirm the output language. It does not infer the note language from the language you use in chat.

Outputs

Most users only need the top-level deliverables:

Top-level outputPurpose
<deck-stem>-with-notes.pptxPowerPoint file with speaker notes injected
<deck-stem>-display.docxComplete rehearsal script with slide labels, transitions, glossary, and timing table
<deck-stem>-display.mdMarkdown fallback when python-docx is unavailable
<deck-stem>-vision-review.mdMarkdown packet for human or vision-agent review

Intermediate files are grouped under work/:

<deck-stem>-speaker-output/
├── <deck-stem>-with-notes.pptx
├── <deck-stem>-display.docx
├── <deck-stem>-display.md
├── <deck-stem>-vision-review.md
└── work/
    ├── slide_extract.json
    ├── visual_inventory.json
    ├── vision_review_packet.json
    ├── vision_review.json
    ├── display_document.json
    ├── notes.json
    └── rendered_slides/

Script Reference

1. Structured extraction

python scripts/read_slides.py "/path/to/deck.pptx" \
  --output "<deck-stem>-speaker-output/work/slide_extract.json"

Reads text boxes, tables, charts, picture objects, OOXML text, and existing notes.

2. Slide rendering

python scripts/render_slides.py "/path/to/deck.pptx" \
  --output-dir "<deck-stem>-speaker-output/work/rendered_slides"

Renders slides to PNG. The script tries LibreOffice / soffice first and falls back to macOS Quick Look when available.

3. Visual inventory

python scripts/visual_inventory.py \
  --extract "<deck-stem>-speaker-output/work/slide_extract.json" \
  --rendered-dir "<deck-stem>-speaker-output/work/rendered_slides" \
  --output "<deck-stem>-speaker-output/work/visual_inventory.json" \
  --ocr auto

Combines structured extraction, rendered slide paths, and OCR text into a per-slide coverage inventory.

4. Vision review packet

python scripts/vision_review.py \
  --inventory "<deck-stem>-speaker-output/work/visual_inventory.json" \
  --output "<deck-stem>-speaker-output/work/vision_review_packet.json" \
  --markdown "<deck-stem>-speaker-output/<deck-stem>-vision-review.md"

Prepares review prompts and evidence for a vision-capable agent or human reviewer.

5. Display document

python scripts/write_display_docx.py \
  --input "<deck-stem>-speaker-output/work/display_document.json" \
  --output "<deck-stem>-speaker-output/<deck-stem>-display.docx"

Writes the display-version rehearsal document. If python-docx is missing, it writes a Markdown fallback.

6. Speaker notes injection

python scripts/inject_notes.py \
  --input "/path/to/deck.pptx" \
  --output "<deck-stem>-speaker-output/<deck-stem>-with-notes.pptx" \
  --notes "<deck-stem>-speaker-output/work/notes.json" \
  --mode replace

Injects clean notes into the PowerPoint notes pane.

Display Version vs Clean Version

flowchart LR
    A[One Grounded Source] --> B[Display Version]
    A --> C[Clean Version]
    B --> D[DOCX or Markdown for rehearsal]
    C --> E[Injected into PPT notes pane]
VersionContentUse
Display versionSlide labels, separators, transitions, pauses, emphasis marks, glossary, timing tableRehearsal and review
Clean versionSpoken text onlyInjected into PowerPoint speaker notes

Language And Style Rules

  • The output language must be confirmed before drafting.
  • The full deliverable must use one language consistently.
  • Canonical technical terms may remain in English, but sentence grammar must follow the selected language.
  • Slide notes must not start with template phrases such as "This slide shows..." or "On this slide...".
  • Chinese notes must not start with phrases such as "这一页展示了..." or "在这一页中..."。
  • Each slide should open with the actual claim, finding, method role, or argument step.

Dependencies

Useful dependencies:

  • python-pptx for PPTX structure extraction and speaker-note injection
  • LibreOffice / soffice for high-quality slide rendering
  • macOS qlmanage as a rendering fallback
  • tesseract for OCR
  • python-docx for Word display documents

If a dependency is missing, the skill uses the strongest available evidence and reports the limitation. For complex charts, screenshots, SmartArt, and image-only slides, final notes should not be produced without vision review.

Limits

This skill aims to cover and explain visible slide elements as completely as possible. It does not claim that scripts can automatically understand every visual element with perfect semantic accuracy.

Why:

  • Images and screenshots are pixels, not structured semantic objects.
  • OCR can fail on small text, formulas, low contrast, or rotated labels.
  • SmartArt, arrows, and layout relationships often depend on author intent.
  • A chart may be a screenshot rather than a native PowerPoint chart.

The skill improves reliability through script-based discovery, rendering, OCR, vision review, and explicit coverage notes. Uncertain elements must be marked, not invented.

Updating The Package

After modifying the source folder, rebuild the .skill package:

zip -r speaker-v8.skill ppt-speech-writer -x '*/__pycache__/*'

The .skill file is a fixed package. Editing ppt-speech-writer/ does not automatically update an already packaged or installed skill.

Best For

  • Academic conference talks
  • Thesis defenses
  • Lab meetings
  • Research project briefings
  • Slide-grounded speaker scripts
  • Decks with charts, screenshots, SmartArt, or method diagrams

Not Ideal For

  • Free-form speeches that ignore slide content
  • Marketing copy that exaggerates beyond slide evidence
  • Requests without a real .pptx file
  • Workflows that cannot perform vision review for complex visual slides

Files in the repo

Repository payload8 top-level entries
  • .claude
  • assets
  • ppt-speech-writer
  • .gitignore
  • CLAUDE.md
  • README.md
  • README.zh.md
  • speaker-v8.skill

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

117k
1 add
Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k

Agent skill for beautiful, verifiable architecture, workflow, sequence, data-flow, and lifecycle diagrams—self-contained HTML with motion and crisp export.

57k
ayghri/
i-have-adhd

A skill to stop your coding agent from burying the answer. ADHD-friendly output.

38k