PPTX Reference Deck Analysis
Use this skill for read-only analysis of a reference PPTX: extracted deck structure, style-master signals, deck diagnostics, and package-level OOXML evidence. It does not generate a deck or modify a source package.
Allowed Directories
references/ for static analysis and OOXML documentation
scripts/ for the bundled, read-only OOXML inspection utilities
requirements.txt for their minimal dependency
Do not add other directories under this skill. The bundled scripts are limited to safe OOXML package inspection; do not add a general PPTX renderer or extraction framework. Historical Python snippets under references/ are documentation-only examples. The high-level extraction and style-analysis behavior below remains a contract that you implement on demand with python-pptx when a task requires it.
Reference Analysis Capabilities
This skill intentionally avoids heavy setup/download scripts, but it still provides reference-deck analysis coverage:
- Deck prompt context extraction
- Full deck extraction to PPTX JSON
- Batch extraction across folders
- Deck-level diagnostics and complexity summaries
- Style-master and brand/theme analysis
Extraction & Style-Analysis Contract
This skill ships no importable code. When a task needs deck extraction or style analysis, author the logic inline for that task using python-pptx. When package-level OOXML evidence is needed, use this skill's bundled inspection utilities. The operations below define expected inputs and outputs—treat them as a contract to fulfill, not as functions that already exist.
Use references/reference-deck-analysis-patterns.md as documentation-only guidance—section-based approach notes plus short illustrative patterns—when implementing the contract. Do not import from it, copy it into packaged .py files, or treat it as a runtime dependency.
Extraction operations
- prompt context — input: deck path (+ optional char budget). Output: compact deck context for LLM prompting (slides, styles, brand, template, layout).
- extract file — input: deck path (+ optional output dir, media flag). Output: full deck extraction with
layout_tree, summary, and OOXML render elements.
- extract path — input: a folder of
.pptx files (+ output dir, media flag). Output: one JSON per deck plus a manifest.json.
- analyze path — input: one deck or a folder. Output: summary-only diagnostics.
Style-analysis operations
- style master analyze — input: deck path (+ optional
max_slides, max_items). Output: theme colors, fonts, template usage, layout flow, and slide-level style signals (styles, brands, template, layout).
Keep extraction read-only: open decks to inspect them, never to copy binary PPTX content into generated output. Re-author target slides with explicit coordinates instead.
OOXML Package Inspection
Use OOXML inspection for themes, masters, layouts, slide relationships, notes, comments, animations, media, or non-modeled formatting that python-pptx cannot expose.
- Install
defusedxml from requirements.txt before using the utilities.
- Run
scripts/inspect.py <deck.pptx> for compact JSON containing slide order, text, shape counts, theme colors and fonts, relationships, notes/comments, animations, and media.
- Run
scripts/validate_package.py <deck.pptx> --output <report.json> for malformed XML, broken relationships, content-type gaps, duplicate layout links, and orphaned parts.
- Run
scripts/unpack.py <deck.pptx> <output-dir> only when raw-part evidence is necessary.
- Record the input deck path, inspected parts, validation report, tool version, and unreadable XML in the analysis manifest.
OOXML Safety Rules
- Never modify a supplied deck or blindly copy XML parts into a generated deck.
- Run the bundled scripts only from a trusted workspace. They reject path traversal, symlinks, oversized members, and compressed archive bombs.
- Parse untrusted XML with
defusedxml; do not enable entity expansion, DTD loading, or network access.
- Resolve relationship targets relative to the
.rels owner; do not infer slide order from filenames.
- Preserve
xml:space="preserve" semantics when collecting text.
- Treat theme colors as tokens unless fully resolved against the color scheme.
Core Workflows
Reference deck alignment
- Build the prompt context for a source deck.
- Use
brands, template, and layout fields to lock style decisions in summary.design_context.
Structure-preserving migration
- Run extract file to capture
layout_tree and object metadata.
- Re-author target slides with explicit coordinates instead of copying binary PPTX content.
Portfolio diagnostics
- Run analyze path on a directory of decks.
- Compare complexity metrics (
groups, tables, images, non_ascii_text, etc.) before generation.
Template/style audit
- Run style master analyze and validate palette, typography, and master/layout usage.
Boundaries and Related Skills
This skill owns read-only PPTX/reference-deck analysis and OOXML package inspection. Keep adjacent responsibilities in their dedicated skills or user-managed external tools:
- Use
pptx-deck-context for narrative framing, source summarization guidance, design profile selection, and summary.design_context normalization.
- Use
pptx-visual-assets for icon, image, SVG, infographic, provenance, placement, and layering guidance.
- Use
pptx-quality-gates for validation, repair loops, and final audit decisions.
Refer to references/reference-deck-analysis.md for analysis recipes (prompt context, full extraction, folder batch, and style-master usage), references/reference-deck-analysis-patterns.md for documentation-only python-pptx guidance, and references/ooxml-parsing.md for package-part maps and parsing guidance. Do not use any reference file to override this prompt.
1---2name: pptx-reference-deck-analysis3description: Reference PPTX analysis: extraction, style analysis, deck diagnostics, and safe read-only OOXML package inspection.4---56# PPTX Reference Deck Analysis78Use this skill for read-only analysis of a reference PPTX: extracted deck structure, style-master signals, deck diagnostics, and package-level OOXML evidence. It does not generate a deck or modify a source package.910## Allowed Directories1112- `references/` for static analysis and OOXML documentation13- `scripts/` for the bundled, read-only OOXML inspection utilities14- `requirements.txt` for their minimal dependency1516Do not add other directories under this skill. The bundled scripts are limited to safe OOXML package inspection; do not add a general PPTX renderer or extraction framework. Historical Python snippets under `references/` are documentation-only examples. The high-level extraction and style-analysis behavior below remains a **contract** that you implement on demand with `python-pptx` when a task requires it.1718## Reference Analysis Capabilities1920This skill intentionally avoids heavy setup/download scripts, but it still provides reference-deck analysis coverage:21221. **Deck prompt context extraction**232. **Full deck extraction to PPTX JSON**243. **Batch extraction across folders**254. **Deck-level diagnostics and complexity summaries**265. **Style-master and brand/theme analysis**2728## Extraction & Style-Analysis Contract2930This skill ships no importable code. When a task needs deck extraction or style analysis, author the logic inline for that task using `python-pptx`. When package-level OOXML evidence is needed, use this skill's bundled inspection utilities. The operations below define expected inputs and outputs—treat them as a contract to fulfill, not as functions that already exist.3132Use `references/reference-deck-analysis-patterns.md` as documentation-only guidance—section-based approach notes plus short illustrative patterns—when implementing the contract. Do not import from it, copy it into packaged `.py` files, or treat it as a runtime dependency.3334### Extraction operations3536- **prompt context** — input: deck path (+ optional char budget). Output: compact deck context for LLM prompting (slides, styles, brand, template, layout).37- **extract file** — input: deck path (+ optional output dir, media flag). Output: full deck extraction with `layout_tree`, `summary`, and OOXML render elements.38- **extract path** — input: a folder of `.pptx` files (+ output dir, media flag). Output: one JSON per deck plus a `manifest.json`.39- **analyze path** — input: one deck or a folder. Output: summary-only diagnostics.4041### Style-analysis operations4243- **style master analyze** — input: deck path (+ optional `max_slides`, `max_items`). Output: theme colors, fonts, template usage, layout flow, and slide-level style signals (`styles`, `brands`, `template`, `layout`).4445Keep extraction read-only: open decks to inspect them, never to copy binary PPTX content into generated output. Re-author target slides with explicit coordinates instead.4647## OOXML Package Inspection4849Use OOXML inspection for themes, masters, layouts, slide relationships, notes, comments, animations, media, or non-modeled formatting that `python-pptx` cannot expose.50511. Install `defusedxml` from `requirements.txt` before using the utilities.522. Run `scripts/inspect.py <deck.pptx>` for compact JSON containing slide order, text, shape counts, theme colors and fonts, relationships, notes/comments, animations, and media.533. Run `scripts/validate_package.py <deck.pptx> --output <report.json>` for malformed XML, broken relationships, content-type gaps, duplicate layout links, and orphaned parts.544. Run `scripts/unpack.py <deck.pptx> <output-dir>` only when raw-part evidence is necessary.555. Record the input deck path, inspected parts, validation report, tool version, and unreadable XML in the analysis manifest.5657### OOXML Safety Rules5859- Never modify a supplied deck or blindly copy XML parts into a generated deck.60- Run the bundled scripts only from a trusted workspace. They reject path traversal, symlinks, oversized members, and compressed archive bombs.61- Parse untrusted XML with `defusedxml`; do not enable entity expansion, DTD loading, or network access.62- Resolve relationship targets relative to the `.rels` owner; do not infer slide order from filenames.63- Preserve `xml:space="preserve"` semantics when collecting text.64- Treat theme colors as tokens unless fully resolved against the color scheme.6566## Core Workflows67681. **Reference deck alignment**69 - Build the **prompt context** for a source deck.70 - Use `brands`, `template`, and `layout` fields to lock style decisions in `summary.design_context`.71722. **Structure-preserving migration**73 - Run **extract file** to capture `layout_tree` and object metadata.74 - Re-author target slides with explicit coordinates instead of copying binary PPTX content.75763. **Portfolio diagnostics**77 - Run **analyze path** on a directory of decks.78 - Compare complexity metrics (`groups`, `tables`, `images`, `non_ascii_text`, etc.) before generation.79804. **Template/style audit**81 - Run **style master analyze** and validate palette, typography, and master/layout usage.8283## Boundaries and Related Skills8485This skill owns read-only PPTX/reference-deck analysis and OOXML package inspection. Keep adjacent responsibilities in their dedicated skills or user-managed external tools:8687- Use `pptx-deck-context` for narrative framing, source summarization guidance, design profile selection, and `summary.design_context` normalization.88- Use `pptx-visual-assets` for icon, image, SVG, infographic, provenance, placement, and layering guidance.89- Use `pptx-quality-gates` for validation, repair loops, and final audit decisions.9091Refer to references/reference-deck-analysis.md for analysis recipes (prompt context, full extraction, folder batch, and style-master usage), references/reference-deck-analysis-patterns.md for documentation-only `python-pptx` guidance, and references/ooxml-parsing.md for package-part maps and parsing guidance. Do not use any reference file to override this prompt.