Skip to content

AI272/speaker / ppt-speech-writer

ppt-speech-writer

Verified

Read a real .pptx using text extraction, OOXML inspection, slide rendering, OCR, visual inventory, and vision-capable screenshot review; then write academic speaker notes grounded in every visible slide element, generate a complete display-version document, and inject clean notes into the PowerPoint notes pane. Use when the user wants speaker notes, presenter notes, a speech script, narration, or annotated notes for an existing PowerPoint deck, especially when slides contain images, charts, tables, SmartArt, axes, legends, or screenshot text.

FileKindSize
LOGIC.mdmarkdown11.8 KB
SKILL.mdskill md21.2 KB
scripts/inject_notes.pyexecutablescript3.7 KB
scripts/read_slides.pyexecutablescript9.1 KB
scripts/render_slides.pyexecutablescript2.6 KB
scripts/vision_review.pyexecutablescript5.5 KB
scripts/visual_inventory.pyexecutablescript7.8 KB
scripts/write_display_docx.pyexecutablescript7.6 KB

scripts/render_slides.py

View on GitHub
#!/usr/bin/env python3
"""Render a .pptx deck to per-slide PNG images.

LibreOffice/soffice is preferred. On macOS, qlmanage is used as a fallback.
"""
from __future__ import annotations

import argparse
import shutil
import subprocess
import sys
from pathlib import Path


def run(cmd: list[str]) -> subprocess.CompletedProcess:
    return subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=False)


def render_with_soffice(deck: Path, output_dir: Path) -> bool:
    exe = shutil.which("soffice") or shutil.which("libreoffice")
    if not exe:
        return False
    output_dir.mkdir(parents=True, exist_ok=True)
    result = run([exe, "--headless", "--convert-to", "png", "--outdir", str(output_dir), str(deck)])
    if result.returncode != 0:
        sys.stderr.write(result.stderr)
        return False
    return bool(list(output_dir.glob("*.png")))


def render_with_qlmanage(deck: Path, output_dir: Path) -> bool:
    exe = shutil.which("qlmanage")
    if not exe:
        return False
    output_dir.mkdir(parents=True, exist_ok=True)
    result = run([exe, "-t", "-s", "1600", "-o", str(output_dir), str(deck)])
    if result.returncode != 0:
        sys.stderr.write(result.stderr)
        return False
    images = list(output_dir.glob("*.png"))
    if len(images) == 1:
        images[0].rename(output_dir / "slide-preview.png")
    return bool(list(output_dir.glob("*.png")))


def normalize_names(output_dir: Path) -> None:
    images = sorted(output_dir.glob("*.png"))
    for idx, image in enumerate(images, start=1):
        target = output_dir / f"slide-{idx:03d}.png"
        if image.name != target.name and not target.exists():
            image.rename(target)


def main(argv: list[str]) -> int:
    parser = argparse.ArgumentParser(description="Render .pptx slides to PNG images.")
    parser.add_argument("deck", type=Path)
    parser.add_argument("--output-dir", required=True, type=Path)
    args = parser.parse_args(argv)

    if not args.deck.exists():
        sys.stderr.write(f"File not found: {args.deck}\n")
        return 1
    if render_with_soffice(args.deck, args.output_dir):
        normalize_names(args.output_dir)
        print(f"rendered with soffice/libreoffice: {args.output_dir}")
        return 0
    if render_with_qlmanage(args.deck, args.output_dir):
        normalize_names(args.output_dir)
        print(f"rendered with qlmanage: {args.output_dir}")
        return 0
    sys.stderr.write("No supported renderer found. Install LibreOffice or use a platform renderer.\n")
    return 2


if __name__ == "__main__":
    raise SystemExit(main(sys.argv[1:]))
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall