/presentations:extracting-presetsfrom presentations
Use when the user wants to create or extend a client preset from existing brand material, such as a PowerPoint template, PDF brand guidelines, or example decks worth keeping. Extracts colors, typography, and assets, and rebuilds selected slides as reusable HTML. Triggers on requests like "add <client> as a preset", "extract our corporate design from this pptx", or "rebuild this template in HTML".
Ships in presentations. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Turn client brand material into a preset: the pack of CSS variables, assets, and example slides that building-pptx-decks (PowerPoint) and creating-presentations (HTML) consume. The point of extraction is reuse. A slide rebuilt once in clean HTML gets adapted into every future deck for that client, so fidelity and self-containment matter more than speed.
The preset contract (directory shape, rules, selection semantics) lives in ../../presets/README.md at the plugin root. Read it before writing any preset file; this skill describes the workflow, the contract file defines the output.
Ask for whatever exists; more sources make a better preset:
icons/ member; see references/icon-libraries.md.Three tools cover every step; check for them before starting. Prefer the cross-platform form of each command so the workflow runs unchanged on macOS, Linux, and Windows.
The exact commands for each tool (uv for Python work, a headless Chromium browser for slide screenshots, a container engine for LibreOffice renders of source decks) are in references/tools.md.
Brand fonts are a soft dependency: fidelity comparisons render on fallback fonts unless the client typeface is installed on the host, which is worth knowing before judging a side-by-side.
Copy this checklist into the response and tick items off as they complete:
- [ ] 1. Inventory the source material
- [ ] 2. Extract palette, typography, expression, and copy guidance into colors.css / typography.css / guidelines.md / language.md
- [ ] 3. Choose slides to build (shortlist from decks; a lone color guide means one palette specimen)
- [ ] 4. Build each chosen slide as HTML that links the preset's variable files
- [ ] 5. Collect assets and note licensing; keep a PPTX source for the PowerPoint route
- [ ] 6. Write manifest.md
- [ ] 7. Verify every slide passes the contract
- [ ] 8. Place under .pgoell/presentations/presets/<name>/ (or contribute it as a bundled preset)
A PPTX is a zip archive: unzip -o deck.pptx -d workdir. Read ppt/theme/theme1.xml for the color scheme (a:clrScheme) and font scheme (a:fontScheme), ppt/slideLayouts/ and ppt/slideMasters/ for layout structure (every PPTX carries at least one master, and it is an extraction source in its own right; see references/slide-masters.md), and ppt/media/ for embedded assets. Use python-pptx via uv when structured access beats raw XML. Render the source slides to images before rebuilding anything: LibreOffice in a container converts a PPTX to PDF reliably (driving desktop PowerPoint by AppleScript stalls on large decks, and LibreOffice may be absent on the host), then pymupdf rasterizes the pages. The rebuild and the step 7 comparison both need this visual reference; the XML alone hides how a slide actually composes. The render commands are in references/tools.md. For PDFs, use pymupdf: rasterize pages for visual reference, list embedded fonts, extract images. A portal page printed to PDF carries the canonical page URL and the capture timestamp in the browser's print header and footer; lift the manifest citation from there.
A large template or timesaver library is inventoried by table of contents first; follow references/template-libraries.md.
When a color comes from an example figure or a printed color guide, read it per references/colors.md.
For a PPTX source, read the type scale, bullet hierarchy, and skeleton geometry off the slide master per references/slide-masters.md.
Write colors.css and, when the font stacks diverge from the defaults, typography.css, both as :root custom property declarations. Structure colors.css in two layers:
--acme-blue: #0045AD;) with Pantone or print notes as trailing comments, so every value stays traceable to the source. When the guide restricts a color (limited use, functional only), carry the rule as a comment block beside the variables it governs; future decks inherit the constraint through the file. Encode sanctioned gradients as linear-gradient variables the same way.--bg, --fg, --accent, --fs-h1) map raw values onto slide intent. Slides read only the semantic names unless a specific brand value is the point (charts, swatches, brand-pinned motifs that must stay one exact color); that is what keeps preset swapping possible.The semantic mapping is a design decision, not extraction: propose which raw colors become the default look and whether a variant is worth encoding (a dark inverse for title and divider slides is common), then let the user decide. Encode each variant as a class scope after :root (.inverse { --bg: ...; }) so a slide or region opts in with one class and every var() reference flips.
Before mapping, check accent contrast (text at 4.5:1) and map the chart token group, both per references/colors.md.
Not every rule has a variable to ride on. Brand expression guidance (personality attributes, tone of voice, imagery selection rules) goes into guidelines.md, condensed to what steers a slide decision; skip the portal boilerplate. Record the layout grammar there too, under ## Layout grammar: the grid (columns, gutter, margins, and the zones where tracker, title, body, and footer sit), declared as layout tokens in colors.css (--grid-cols, --grid-col, --grid-gutter, zone tokens such as --title-top), plus the compositions the brand's slides repeat. Consumers build any layout the gallery lacks from that grammar. Keep guidance files rule-only: source attributions, capture dates, and divergence notes belong in the manifest (step 6), not in the files every deck build loads, where each provenance sentence is a recurring token cost.
Copy rules from the brand's style guide (terminology, word usage, required legal language) go into language.md, written as a positive contract: say what good copy does, then show it with before/after title rewrites in the brand's own voice. Keep the default preset's anti-fabrication rule (never add a fact, figure, name, or arithmetic the source lacks) in every language.md. When the brand states no copy rules, write no language.md; consumers then fall back to the default preset's.
Do not rebuild the whole deck. Propose a shortlist covering the structural slide types (title, divider, agenda, one or two content layouts, closing) plus any slide the user flags as worth keeping: the architecture slide that landed well, the comparison layout that worked. The user picks the final list.
From a template library, shortlist with low-dpi contact sheets and record the unbuilt layouts as a catalogue in guidelines.md, per references/template-libraries.md.
When the source is a color guide with no deck to mine, read references/colors.md, "A color guide with no deck (steps 3 and 4)": what replaces the slide shortlist and rebuild.
One HTML file per slide in slides/, on a 1920x1080 canvas: <link rel="stylesheet" href="../colors.css">, plus <link rel="stylesheet" href="../typography.css"> when present, before an inline <style> that holds only the slide's own rules, every color and font read through the preset's variables, no network requests. The only file references a slide may make are those two links and relative paths into the preset's own assets/; step 5 says when those are the right call. The slide opens standalone from the preset directory. Fidelity to the source layout beats creative improvement; this is extraction, not redesign. Two rules outrank fidelity. Type meets the floors on the 1920x1080 canvas: body at least 36px (40px is the default), captions and chart labels at least 28px, footer and source line at least 24px, never shrunk to fit. And the slide carries no template chrome: no tracked uppercase eyebrow over the title, no accent-colored period, no italic accent word, no mono micro labels, no 01 / 02 numbering where nothing is a sequence, no middle-dot meta strings. When the source template itself uses small type or one of these marks, rebuild at the floor or without the mark and record the source value as an extraction decision in the manifest. Icons come only from the preset's icons/ library or official assets, never drawn freehand; with neither, the slide carries no icon. Fidelity extends to imagery: a photo or figure on the source slide already exists in ppt/media/, so extract and place that file rather than approximating it with CSS; a gradient stand-in for a photograph reads as an unfinished placeholder, and the user will send it back. Simplify only effects with no extractable asset behind them (decorative gradient washes, WordArt), toward the brand's flat values, and record the deviation in the manifest. Source slides stack imagery, marks, and text, so give layered absolutely positioned elements explicit z-index instead of trusting DOM order, which has painted a cover image over the client logo.
Tag each rebuilt slide: add one row to the preset's slides/index.tsv (create it with its header row if missing), with values from the closed vocabulary in ../../presets/TAGS.md and a summary of at most 15 words.
Prefer SVG, it inlines as text. Small rasters (logos, badges) base64-inline. Photographic imagery keeps its source quality: when inlining would force lossy recompression, keep the original file in assets/ and have the slide reference it by relative path (../assets/<file>), noting the choice in the manifest; the slide still opens standalone from the preset directory. Compressing a source photo until it squeezes inline trades away exactly the fidelity the preset exists to keep. Record font licensing in the manifest when the brand typeface is licensed rather than free; the deck skill must know whether it can embed the font or must fall back. An open-licensed brand face is vendored as unmodified woff2 files with its license under assets/fonts/<family>/, declared by @font-face in typography.css, with provenance (source, version, license, Reserved Font Name) in the manifest; never subset a family that carries a Reserved Font Name.
Decks leave this plugin as PowerPoint by default (building-pptx-decks), and a client's own template beats any rebuild of it. When the source includes a PPTX or POTX template, keep it in the preset as pptx/template.pptx (or .potx), unmodified, and write pptx/layouts.md: a table from content-side slide_type and proof object to the template's layout names, read off pptx_tool.py layouts (in ../building-pptx-decks/assets/) and the step 1 render. Do this for local presets only; a client template never ships in a bundled preset. Record in typography.css the fonts PowerPoint should name, from the theme's a:fontScheme: --pptx-font-head and --pptx-font-body (and --pptx-font-mono when the brand has one). When the brand face is a webfont recipients will not have installed, set them to the Office font the brand guide names as fallback, or ask.
Official logo and wordmark downloads need their own care; follow references/brand-marks.md. An icon library file extracts into icons/ per references/icon-libraries.md.
manifest.md is the preset's single home for provenance: who the preset serves, the sources with their dates, what the preset covers, the extraction decisions (divergences recorded as found, with the resolution, including type lifted to the floors and chrome dropped), and what is missing (no official logo yet, no dark variant, closing slide pending). Add one direction line naming the generic default the preset's look avoids (for example, "deep navy and one warm accent; avoids the off-white, lime, and sans-everything default"), so a reader can tell the brand apart from the stock look. Every other preset file stays rule-only and may point here; provenance written anywhere else costs tokens on every deck build.
Cite sources as durable references a reader can follow: the brand portal URL and page path with the capture date. Prefer the portal over provided files (a local PDF, a template on someone's disk), which do not ship with the repo. When a provided file is the only source, cite it by title, version and date as the brand owner names it, never by its local path.
Every rebuilt slide opens standalone in a browser, references only variables declared in the preset's variable files, resolves any relative asset references within the preset, and makes no network requests. Check the variable references with a grep pass (var(-- names against the declarations) rather than by eye, and check that each slide links ../colors.css and, when present, ../typography.css. Check type the same way: read computed font-size by role in the browser (body at least 36px, captions and labels 28px, footer and source 24px), and grep the slides for the chrome marks named in step 4 (text-transform: uppercase with letter-spacing, <em> or font-style: italic inside titles, the middle dot U+00B7). Fix and re-check until every slide in the preset passes; a slide that fails the contract silently breaks preset swapping later.
The contract checks are mechanical; verification is also visual. Screenshot every rebuilt slide at exactly 1920x1080 with a headless browser (command in references/tools.md) and compare it side by side against the step 1 source render before presenting anything; slides that passed every grep have shipped with placeholder art and a logo painted over. Treat every visible defect in the screenshot as real and chase it to a cause in the HTML; a defect waved off as a preview artifact comes straight back as a user correction (a clipped wordmark blamed on screenshot resolution was DOM paint order).
The default home for a new preset is .pgoell/presentations/presets/<name>/ at the working repo root: it is user-owned, consumed by building-pptx-decks and creating-presentations alongside the bundled presets, and requires no plugin change. Only when the user explicitly wants the preset shipped with the plugin does it go into presets/<name>/ at the plugin root (../../presets/ relative to this skill's directory); that is a plugin change and needs the plugin version bumped per the marketplace repo's lockstep rules.
When the user wants an existing preset extended (a new slide worth keeping, another portal page, an updated brand guide), read references/extending-a-preset.md: which workflow step new material enters at, and what to merge and record.
creating-presentations skill consumes the presets this skill produces as HTML.building-pptx-decks skill consumes presets as PowerPoint: it maps the preset onto the Office theme, or fills the kept pptx/template.pptx through pptx/layouts.md.exporting-presentations-to-pptx skill converts finished HTML decks to PowerPoint; at 1920 px wide, one px is 6350 EMU and half a point, which also helps when measuring a source PPTX.references/brand-marks.md (opens in a new tab)references/colors.md (opens in a new tab)references/extending-a-preset.md (opens in a new tab)references/icon-libraries.md (opens in a new tab)references/slide-masters.md (opens in a new tab)references/template-libraries.md (opens in a new tab)references/tools.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub pgoell/pgoell-claude-tools --plugin presentations6 skills in this plugin
/building-pptx-decksUse when the user wants a slide deck as PowerPoint, which is the default when no format is named. Builds a native, editable .pptx from a deck.md, a settled storyline, or their content, styled from a preset or filled into a client template; also edits or extends an existing .pptx in place. A bare deck ask with nothing to build from goes to designing-presentations first. For an HTML deck with a presenter view, see creating-presentations./creating-presentationsUse when the user wants the deck as HTML (a browser deck, an .html file, a presenter view), styled from a brand preset and built from a deck.md, a settled storyline, or their content, or an HTML deck reviewed or polished. A deck with no format named is PowerPoint, see building-pptx-decks; a bare ask with nothing to build from goes to designing-presentations. For hand edits see editing-presentations; for a PowerPoint copy of an HTML deck, exporting-presentations-to-pptx./designing-presentationsUse when the user wants to design the content of a slide presentation, from audience brief to critiqued storyboard, before any slide renders. Produces a deck.md with per-slide front-matter. Triggers on a bare ask for a deck with no deck.md, settled storyline or content to build from, such as "I need a deck about our Q3 results", and on requests to plan a storyline, storyboard a deck, work out key messages, or audit a deck.md. Building it is building-pptx-decks or creating-presentations.Other plugins' skills for the same job