Skip to content

zouchenzhen/thesis-defense-pptx-skill / skills/thesis-defense-pptx

thesis-defense-pptx

Verified

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.

scripts/clone_template_deck.ps1

View on GitHub
param(
    [Parameter(Mandatory = $true)]
    [string]$Template,

    [Parameter(Mandatory = $true)]
    [string]$Output,

    [string]$SlideSequence = ""
)

$ErrorActionPreference = "Stop"

# Windows 默认 console 是 cp936/gbk,输出含中文路径的字符串会乱码。
# 强制切到 UTF-8 让 stdout 稳定可读,便于 Codex/Claude Code 解析返回值。
try {
    [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
    $OutputEncoding = [System.Text.Encoding]::UTF8
} catch {}

$templatePath = [System.IO.Path]::GetFullPath($Template)
$outputPath = [System.IO.Path]::GetFullPath($Output)

if (!(Test-Path -LiteralPath $templatePath)) {
    throw "Template not found: $templatePath"
}

$outDir = Split-Path -Parent $outputPath
if ($outDir -and !(Test-Path -LiteralPath $outDir)) {
    New-Item -ItemType Directory -Force -Path $outDir | Out-Null
}

$pp = $null
$dest = $null

try {
    if ([string]::IsNullOrWhiteSpace($SlideSequence)) {
        Copy-Item -LiteralPath $templatePath -Destination $outputPath -Force
        Write-Output $outputPath
        return
    }

    $indices = @()
    foreach ($part in $SlideSequence.Split(",")) {
        $trimmed = $part.Trim()
        if ($trimmed.Length -gt 0) {
            $indices += [int]$trimmed
        }
    }
    if ($indices.Count -eq 0) {
        throw "SlideSequence did not contain any slide numbers."
    }

    Copy-Item -LiteralPath $templatePath -Destination $outputPath -Force

    $pp = New-Object -ComObject PowerPoint.Application
    $dest = $pp.Presentations.Open($outputPath, $false, $false, $false)
    $slideCount = $dest.Slides.Count
    foreach ($idx in $indices) {
        if ($idx -lt 1 -or $idx -gt $slideCount) {
            throw "Slide index $idx is outside template slide range 1..$slideCount"
        }
    }

    $originalSlides = @()
    for ($i = 1; $i -le $slideCount; $i++) {
        $originalSlides += $dest.Slides.Item($i)
    }

    foreach ($idx in $indices) {
        $dupRange = $originalSlides[$idx - 1].Duplicate()
        $newSlide = $dupRange.Item(1)
        $newSlide.MoveTo($dest.Slides.Count)
        [System.Runtime.InteropServices.Marshal]::ReleaseComObject($dupRange) | Out-Null
    }

    for ($i = $slideCount; $i -ge 1; $i--) {
        $dest.Slides.Item($i).Delete()
    }

    $dest.SaveAs($outputPath, 24)
    Write-Output $outputPath
}
finally {
    if ($dest -ne $null) {
        try { $dest.Close() } catch {}
        [System.Runtime.InteropServices.Marshal]::ReleaseComObject($dest) | Out-Null
    }
    if ($pp -ne $null) {
        try { $pp.Quit() } catch {}
        [System.Runtime.InteropServices.Marshal]::ReleaseComObject($pp) | Out-Null
    }
}
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