zouchenzhen/thesis-defense-pptx
Create, polish, and quality-check editable undergraduate or graduate thesis defense PowerPoint decks from a local thesis PDF/LaTeX project and an existing PPTX template. Use when the user asks for a formal defense PPT, thesis presentation, academic答辩PPT, template-matched PPTX, or local PowerPoint deck generation with visual inspection.
npx skills add https://github.com/zouchenzhen/thesis-defense-pptx-skill --skill thesis-defense-pptx
Use this skill for local, editable .pptx thesis defense decks that must follow a supplied university/lab/company PowerPoint template.
\includegraphics entries and captions from the final TeX/PDF, then use only thesis-cited figures or images the user explicitly approves. Do not carry over pictures from a template, old progress deck, or draft figure folder merely because they look relevant..pptx, not only an outline, image deck, PDF, or HTML.scripts/extract_thesis_context.py to summarize PDF/TeX text and list candidate figures.\includegraphics and captions. Treat this as the allow-list for PPT images unless the user requests new visuals.scripts/clone_template_deck.ps1) when PowerPoint is installed.scripts/export_pptx_png.ps1.scripts/make_contact_sheet.py.scripts/inspect_pptx_overflow.ps1.scripts/scan_pptx_text.py for slide count and stale template terms.Extract thesis context:
python scripts/extract_thesis_context.py --input "D:\path\to\thesis" --output "D:\path\to\thesis_context.md"
Clone template slides into a native skeleton:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/clone_template_deck.ps1 `
-Template "D:\path\template.pptx" `
-Output "D:\path\output.pptx" `
-SlideSequence "1,2,3,4,4,6,7,8,9,10,11,12,13,14,15"
In this example slide 4 is deliberately reused as a sub-section page and slide 5 is skipped.
Export final deck:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/export_pptx_png.ps1 `
-Pptx "D:\path\output.pptx" `
-OutDir "D:\path\visual_check" `
-Width 1600 -Height 900
Inspect possible overflow:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/inspect_pptx_overflow.ps1 `
-Pptx "D:\path\output.pptx" `
-Tolerance 40 `
-OutputJson "D:\path\overflow.json"
Make a contact sheet:
python scripts/make_contact_sheet.py --input "D:\path\visual_check" --output "D:\path\contact_sheet.png"
Scan deck text and forbidden terms:
python scripts/scan_pptx_text.py `
--pptx "D:\path\output.pptx" `
--bad "中期检查,项目简介,系统框图,算法设计,成果展示,总结分析,TODO,占位"
For quality criteria, read references/pptx_quality_gate.md.
The fastest way to fail a content fill is guessing strings instead of reading them. Use this loop:
scripts/dump_pptx_content.py --pptx <skeleton> --output dump.md to list every shape's exact text, plus all table cells and picture names. Open dump.md and copy the strings you intend to replace.replace_partial_text(slide, {"keyword": "new full text"}) instead of replace_exact_text whenever the body sentence might differ from the template by a stray space, half/full-width quote, or —— vs —. Pass min_len=20 to avoid short-key collisions with navigation tags.replace_exact_text for short tags. Navigation labels and section titles ("项目简介", "工作总结") are stable; exact match is safer because it cannot accidentally rewrite a body paragraph that happens to contain the same word.write_table(table, rows) preserves cell font/color/size, and replace_picture(slide, old_pic, new_path) swaps an image while keeping position and size — both avoid the boilerplate of removing and re-creating shapes.\n line breaks, and only resize the textbox if the template visual really allows it.stdout to UTF-8, and the PowerShell scripts force the console output codepage to UTF-8, so cp936/gbk consoles do not corrupt JSON output containing CJK paths or Unicode symbols (−, Δ, ✓).Dump every slide's shapes/text/tables/pictures (run this BEFORE constructing replacement dicts):
python scripts/dump_pptx_content.py --pptx "D:\path\skeleton.pptx" --output "D:\path\dump.md"
Add --slide 4,8,9 to limit to specific slides while iterating.
requirements.txt.python-pptx is good for editable text, shapes, images, tables, and simple charts, but it does not perfectly model every PowerPoint layout/rendering behavior.scripts/pptx_template_tools.py uses THESIS_PPTX_BRAND_RED when set (#830604, 830604, or 131,6,4) so new school templates do not require source edits for the primary red.Take zouchenzhen/thesis-defense-pptx from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.