zouchenzhen/thesis-defense-pptx-skill / skills/thesis-defense-pptx
thesis-defense-pptx
VerifiedCreate, 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.5 KB |
| agents/openai.yaml | config | 255 B |
| references/pptx_quality_gate.md | markdown | 3.3 KB |
| requirements.txt | manifest | 58 B |
| scripts/clone_template_deck.ps1 | script | 2.6 KB |
| scripts/dump_pptx_content.py | script | 4.8 KB |
| scripts/export_pptx_png.ps1 | script | 1.5 KB |
| scripts/extract_thesis_context.py | script | 5.4 KB |
| scripts/inspect_pptx_overflow.ps1 | script | 3.9 KB |
| scripts/make_contact_sheet.py | script | 2.3 KB |
| scripts/pptx_template_tools.py | script | 9.8 KB |
| scripts/scan_pptx_text.py | script | 2.4 KB |
scripts/inspect_pptx_overflow.ps1
View on GitHubparam(
[Parameter(Mandatory = $true)]
[string]$Pptx,
[double]$Tolerance = 40,
[string]$OutputJson = ""
)
$ErrorActionPreference = "Stop"
# Windows 默认 console 是 cp936/gbk,输出含中文路径或特殊符号的 JSON 会乱码。
# 强制切到 UTF-8 让 stdout 稳定可读;JSON 文件本身已用 UTF-8 写盘不受影响。
try {
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8
} catch {}
$pptxPath = [System.IO.Path]::GetFullPath($Pptx)
if (!(Test-Path -LiteralPath $pptxPath)) {
throw "PPTX not found: $pptxPath"
}
$pp = $null
$pres = $null
$results = @()
function Test-ShapeOverflow {
param(
[Parameter(Mandatory = $true)]
$Shape,
[Parameter(Mandatory = $true)]
[int]$SlideIndex,
[string]$NamePrefix = ""
)
try {
if ($Shape.Type -eq 6) {
for ($i = 1; $i -le $Shape.GroupItems.Count; $i++) {
Test-ShapeOverflow -Shape $Shape.GroupItems.Item($i) -SlideIndex $SlideIndex -NamePrefix "$NamePrefix$($Shape.Name)/"
}
return
}
}
catch {
# Non-standard shapes may not expose Type or GroupItems consistently.
}
try {
if ($Shape.HasTextFrame -and $Shape.TextFrame.HasText) {
$txt = $Shape.TextFrame.TextRange.Text.Trim()
if ($txt.Length -gt 0) {
$bw = $Shape.TextFrame2.TextRange.BoundWidth
$bh = $Shape.TextFrame2.TextRange.BoundHeight
$isOverflow = ($bw -gt ($Shape.Width + $Tolerance)) -or ($bh -gt ($Shape.Height + $Tolerance))
if ($isOverflow) {
$short = $txt
if ($short.Length -gt 180) {
$short = $short.Substring(0, 180)
}
$short = $short -replace "`r|`n", " / "
$script:results += [PSCustomObject]@{
slide = $SlideIndex
shape = "$NamePrefix$($Shape.Name)"
width = [math]::Round($Shape.Width, 1)
bound_width = [math]::Round($bw, 1)
height = [math]::Round($Shape.Height, 1)
bound_height = [math]::Round($bh, 1)
text = $short
}
}
}
}
}
catch {
# Some shapes expose partial text APIs; skip them.
}
}
try {
$pp = New-Object -ComObject PowerPoint.Application
$pres = $pp.Presentations.Open($pptxPath, $true, $false, $false)
foreach ($slide in $pres.Slides) {
try {
$shapeCount = $slide.Shapes.Count
}
catch {
continue
}
for ($i = 1; $i -le $shapeCount; $i++) {
try {
$shape = $slide.Shapes.Item($i)
Test-ShapeOverflow -Shape $shape -SlideIndex $slide.SlideIndex
}
catch {
# Skip shapes that fail COM enumeration.
}
}
}
}
finally {
if ($pres -ne $null) {
try { $pres.Close() } catch {}
[System.Runtime.InteropServices.Marshal]::ReleaseComObject($pres) | Out-Null
}
if ($pp -ne $null) {
try { $pp.Quit() } catch {}
[System.Runtime.InteropServices.Marshal]::ReleaseComObject($pp) | Out-Null
}
}
$payload = [PSCustomObject]@{
pptx = $pptxPath
tolerance = $Tolerance
overflow_count = $results.Count
overflows = $results
}
$json = $payload | ConvertTo-Json -Depth 6
if (![string]::IsNullOrWhiteSpace($OutputJson)) {
$jsonPath = [System.IO.Path]::GetFullPath($OutputJson)
$jsonDir = Split-Path -Parent $jsonPath
if ($jsonDir -and !(Test-Path -LiteralPath $jsonDir)) {
New-Item -ItemType Directory -Force -Path $jsonDir | Out-Null
}
Set-Content -LiteralPath $jsonPath -Value $json -Encoding UTF8
}
$json
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |