
Slides Extract
- 133 installs
- 9 repo stars
- Updated March 15, 2026
- mpuig/agent-slides
slides-extract is an agent-slides skill that extracts template contracts from .pptx files for developers who need layout catalogs, archetypes, and design profiles before automated slide generation.
About
slides-extract is an mpuig/agent-slides skill—one of seven slides skills—that extracts structured contracts from PowerPoint templates before automated deck building. It requires Python 3.12+ and uv, runs `uvx --from agent-slides slides extract <template.pptx> --output-dir`, and produces template_layout.json, content_layout.json, archetypes.json, resolved_manifest.json, slides_manifest.json, slide_analysis.json, slide_screenshots/, icons/, and a clean base_template.pptx with zero content slides. A comprehension gate verifies four theme questions—accent hex colors, archetype count, split-panel layouts, and per-zone text colors—before writing design-profile.json with fields like primary_color_hex, text_color_light, and optional icon_pack_dir. Preflight via `slides preflight` must report ok:true before handing off to /slides-build or /slides-full. Trigger when a user provides a corporate .pptx, says "extract layouts," or prepares a template for the first build. Reach for slides-extract whenever pixel-perfect slide automation depends on machine-readable layout contracts rather than manually guessing individual slide placeholders.
- Extracts 8+ JSON/PPTX artifacts including resolved_manifest.json and base_template.pptx
- Comprehension gate requires 4 theme verification answers before design-profile.json
- Runs via `uvx --from agent-slides slides extract` with Python 3.12+ and uv
- Preflight must return ok:true before /slides-build handoff
- Part of 7-skill agent-slides suite: extract, build, edit, audit, critique, polish, full
Slides Extract by the numbers
- 133 all-time installs (skills.sh)
- +7 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #299 of 688 Office & Documents skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/mpuig/agent-slides --skill slides-extractAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 133 |
|---|---|
| repo stars | ★ 9 |
| Last updated | March 15, 2026 |
| Repository | mpuig/agent-slides ↗ |
How do you extract PowerPoint template layouts to JSON?
Run slides-extract on a .pptx template to emit resolved_manifest.json, base_template.pptx, and design-profile.json for agent-slides builds.
Who is it for?
Developers automating PowerPoint generation with agent-slides who must analyze a corporate .pptx before the first /slides-build run.
Skip if: Teams creating slides manually without .pptx templates or the agent-slides Python 3.12+ uv toolchain.
When should I use this skill?
User provides a PowerPoint template, says extract layouts, analyze pptx, use this template, or prepares slides before building a deck.
What you get
resolved_manifest.json, base_template.pptx, design-profile.json, archetypes.json, and icons/ directory ready for slides-build.
- resolved_manifest.json
- base_template.pptx
- design-profile.json
By the numbers
- Part of a 7-skill agent-slides pipeline (extract through full)
- Comprehension gate asks 4 verification questions before proceeding
Files
Slides Extract
You are a template analyst. Your job is to extract structured contracts from PowerPoint templates so that downstream skills can generate pixel-perfect decks without guessing.
Extract template contracts from a .pptx template or sample deck.
When to Use
- Before the first
/slides-buildfor a given template - When the source template changes
- When you need to analyze a template's layouts and capabilities
Prerequisites
- A
.pptxfile (template or sample deck with example slides)
Process
Step 1) Create project directory
Create a dedicated directory for this project's artifacts:
mkdir -p output/<project-name>All subsequent commands and outputs go in this directory.
Step 2) Run extraction
Use uvx --from agent-slides slides docs method:extract to verify the current contract, then:
uvx --from agent-slides slides extract <template_or_sample.pptx> \
--output-dir output/<project> \
--base-template-out output/<project>/base_template.pptx \
--compactOptional: add --layout-preview-dir output/<project>/layout_previews for per-layout PNGs (legacy override), or specific --*-out paths for one-off custom filenames.
Step 3) Verify outputs
| Artifact | Purpose |
|---|---|
template_layout.json | Physical layout families, placeholders, geometry |
content_layout.json | Archetype-to-layout compatibility map |
archetypes.json | Available archetypes with usage constraints |
resolved_manifest.json | Merged contract — theme palette, per-archetype resolved layout bindings. Primary reference for /slides-build. |
slides_manifest.json | Slide-by-slide inventory of the source |
slide_analysis.json | Deep per-slide structural analysis |
slide_screenshots/ | Visual reference screenshots |
icons/ | Vector icons extracted from template slides (freeform/group shapes). Available via add_icon when icon_pack_dir is set in design profile. |
base_template.pptx | Clean .pptx — all masters/layouts/theme, zero content slides |
Step 4) Comprehension gate
Read resolved_manifest.json and verify you can answer these questions before proceeding:
- What accent colors does the theme use? List the hex values. (Path:
theme.palette.accent1…accent6) - How many archetypes have
resolved_layouts? Name them. (Note:archetypesis a dict keyed by archetype ID, not a list — iterate withfor aid, arch in archetypes.items()) - Which layouts are split-panel (title in a side zone)?
- What
text_colordoes each color zone use?
If any answer is unclear, re-read the manifest. Do not proceed to the design profile until all four are answered.
Step 5) Build design profile
Write design-profile.json in the project directory:
{
"name": "<project-name>",
"template_path": "base_template.pptx",
"content_layout_catalog_path": "content_layout.json"
}Add these fields from the extracted theme:
| Field | Source | Purpose |
|---|---|---|
primary_color_hex | Theme accent1 | Brand accent color for subheadings |
text_color_light | Theme lt1 | Light text for dark backgrounds |
text_color_dark | Theme dk1 | Dark text for light backgrounds |
default_font_size_pt | Template body size | Default for add_text |
icon_pack_dir | icons/ (if extracted) | Directory of template-specific vector icons for add_icon |
Always use base_template.pptx (not the original) as template_path.
If the extraction produced an icons/ directory with .xml files, add "icon_pack_dir": "icons" to the design profile. These icons become available via add_icon alongside the built-in icon library.
Only add fields listed above or in the schema. The profile uses extra="forbid" — any unknown field (e.g., secondary_color_hex, accent_color_hex, font_name) causes a validation error.
Use uvx --from agent-slides slides docs schema:design-profile for the full schema.
Step 6) Preflight the project
Before handing the project off to /slides-build or /slides-full, verify the extracted artifacts and profile:
uvx --from agent-slides slides preflight --project-dir output/<project> --profile output/<project>/design-profile.json --compactIf preflight fails, fix the project structure or profile paths before continuing.
Outputs
This skill produces the project directory consumed by all other slides skills:
base_template.pptx+ contract JSONs ->/slides-builddesign-profile.json-> all post-build skills
Error Handling
On any slides error, run uvx --from agent-slides slides docs method:extract to verify the current contract before retrying.
Acceptance Criteria
1. All artifact files exist and are valid JSON (where applicable). 2. resolved_manifest.json contains at least one archetype with resolved layouts. 3. base_template.pptx opens without errors. 4. design-profile.json references base_template.pptx and content_layout.json. 5. slides preflight reports "ok": true. 6. Comprehension gate questions answered correctly.
Related skills
How it compares
Run slides-extract before slides-build; skip it only when reusing an already-extracted project directory with valid preflight.
FAQ
What artifacts does slides-extract produce?
slides-extract produces template_layout.json, archetypes.json, resolved_manifest.json, base_template.pptx, design-profile.json, slide screenshots, and an icons/ directory extracted from the source .pptx template.
When must you run slides-extract?
slides-extract runs before the first /slides-build for a given template, whenever the source .pptx changes, or when you need to inspect available layouts and archetypes for agent-slides automation.