/yaml-deck-builder:yaml-deck-builderfrom yaml-deck-builder
Build high-quality presentation decks using a YAML content file and a pptxgenjs JavaScript generator. Use this skill whenever the user wants to create a polished pitch deck, investor deck, sales deck, or any presentation where content will evolve through multiple versions. Also trigger when the user says 'rebuild the deck', asks for deck revisions, or wants to iterate on slide content without breaking previous versions. This skill produces better results than template-based approaches because the generator is custom-written for each project — giving full control over layout, color, typography, and data-driven elements like charts and tables. Prefer this over the standard pptx skill when the user needs a deck they'll iterate on repeatedly.
Ships in yaml-deck-builder. 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.
None: SKILL.md is the whole skill.
A method for creating presentation decks by separating content (YAML) from presentation (JavaScript). The content file is easy for humans to read and edit. The generator script handles all visual design. This separation means anyone can update the deck's words and numbers without touching layout code, and the deck can be rebuilt in seconds after any change.
This approach was developed through extensive iteration on a real investor deck and consistently outperformed template-based tools (like SlideCraft/python-pptx with fixed layouts) because the generator is custom-written for each project — every slide gets exactly the layout it needs rather than being forced into a pre-built template.
project/
├── content-v1.yaml # Content: words, numbers, structure
├── content-v2.yaml # Each version is a new file
├── generate-deck-v1.js # Generator: layout, colors, typography
├── generate-deck-v2.js # Generator versions track content versions
├── output-v1.pptx # Generated output
└── output-v2.pptx
This is what the user edits. It contains every word, number, and data point in the deck — nothing visual. Structure it to mirror the slide order. Each top-level key is a slide.
The YAML should be readable by someone who has never seen the generator script. If you handed the YAML to a designer, they should understand what the deck says without any other context.
Example structure:
title:
company: "Acme Corp"
tagline: "The best widgets in the world."
subtitle: "Series A | Q2 2026"
problem:
title: "The Problem"
stat_left:
number: "40%"
description: "of widget buyers are dissatisfied with current options."
stat_right:
number: "£12B"
description: "Total addressable market for premium widgets."
pain_points:
- "Existing widgets break after 6 months."
- "No widget manufacturer offers a warranty."
team:
title: "Team"
members:
- name: "Jane Smith"
role: "CEO"
bio: "Former McKinsey. 10 years in widget manufacturing."
Key principles for the YAML:
label/value pairs for key-value displaysThis is the code that reads the YAML and produces the .pptx file using pptxgenjs. It contains ALL visual decisions: colors, fonts, positions, sizes, shadows, shapes, charts, images.
The generator should be data-driven — it reads arrays from the YAML and renders them in loops. This means adding a new team member or a new pain point is a YAML edit, not a code change.
Required dependencies:
npm install pptxgenjs js-yaml
Optional but recommended:
npm install react react-dom react-icons sharp
The react-icons + sharp pipeline lets you render any icon from the react-icons library as a PNG and embed it in slides. This is how you get professional-looking icons without shipping image files.
Before writing any code, decide on:
const C = {
navy: "0F1B2D",
gold: "D4A843",
teal: "2A9D8F",
coral: "E76F51",
white: "FFFFFF",
offWhite: "F5F7FA",
text: "1A1A2E",
textMuted: "5A6A7A",
};
Draft the full content structure before touching the generator. Share it with the user for review. The YAML is the artifact they will care about and edit — get it right early.
Each slide is a self-contained block in the generator. Use this pattern:
{
const d = content.slide_name; // destructure from YAML
let s = pres.addSlide();
s.background = { color: C.offWhite };
// Header bar (consistent across slides)
s.addShape(pres.shapes.RECTANGLE, {
x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy }
});
s.addText(d.title, {
x: 0.7, y: 0.2, w: 8, h: 0.6,
fontSize: 28, fontFace: "Georgia", bold: true,
color: C.white, margin: 0
});
// Slide-specific content below...
}
Wrap each slide in a block scope ({ }) so variables don't leak between slides.
Cards, team members, table rows, bullet points — render them from arrays:
d.cards.forEach((card, i) => {
const x = 0.5 + i * 3.15; // 3 cards across
s.addShape(pres.shapes.RECTANGLE, {
x, y: 2.0, w: 2.95, h: 2.5,
fill: { color: C.white },
shadow: { type: "outer", blur: 6, offset: 2, color: "000000", opacity: 0.10 }
});
s.addText(card.title, { /* ... */ });
s.addText(card.description, { /* ... */ });
});
This means adding a 4th card requires only a YAML edit (though you may need to adjust the layout math for 4 columns vs 3).
For professional-looking icons without shipping image files:
const React = require("react");
const ReactDOMServer = require("react-dom/server");
const sharp = require("sharp");
function renderIconSvg(IconComponent, color, size = 256) {
return ReactDOMServer.renderToStaticMarkup(
React.createElement(IconComponent, { color, size: String(size) })
);
}
async function iconToBase64Png(IconComponent, color, size = 256) {
const svg = renderIconSvg(IconComponent, color, size);
const pngBuffer = await sharp(Buffer.from(svg)).png().toBuffer();
return "image/png;base64," + pngBuffer.toString("base64");
}
Pre-render all icons at the top of the buildDeck() function, then reference them by name throughout. This avoids re-rendering the same icon multiple times.
After generating the .pptx, convert to images for quick visual checking without opening PowerPoint:
# PPTX → PDF (LibreOffice)
soffice --headless --convert-to pdf --outdir ./output/ ./output/deck.pptx
# PDF → JPEG (one per slide)
pdftoppm -jpeg -r 150 ./output/deck.pdf ./output/preview
Then read the JPEG files to visually inspect each slide. This is the fastest way to catch layout issues — much faster than telling the user to open the file and report back.
To preview a single slide (e.g., slide 3):
pdftoppm -jpeg -r 150 -f 3 -l 3 ./output/deck.pdf ./output/slide3
This is critical. The user will get feedback from multiple people and want to iterate. Each round of feedback produces a new version of BOTH the YAML and the generator.
Rules:
content-v(N+1).yaml and generate-deck-v(N+1).js.This gives the user a complete audit trail. They can always go back to any previous version and rebuild it exactly as it was.
Naming convention:
content-v1.yaml → generate-deck-v1.js → deck-v1.pptx
content-v2.yaml → generate-deck-v2.js → deck-v2.pptx
Use whatever base name fits the project. The version suffix is what matters.
These are patterns that worked well in practice. Use them as starting points.
Two stat cards side by side with a colored left border accent:
// Left card
s.addShape(pres.shapes.RECTANGLE, {
x: 0.5, y: 1.3, w: 4.2, h: 2.2,
fill: { color: C.white },
shadow: { type: "outer", blur: 6, offset: 2, color: "000000", opacity: 0.10 }
});
s.addShape(pres.shapes.RECTANGLE, {
x: 0.5, y: 1.3, w: 0.08, h: 2.2,
fill: { color: C.coral } // accent color
});
s.addText(d.stat.number, {
x: 0.8, y: 1.4, w: 3.5, h: 1.0,
fontSize: 60, fontFace: "Georgia", bold: true, color: C.coral
});
s.addText(d.stat.description, {
x: 0.8, y: 2.3, w: 3.6, h: 1.0,
fontSize: 13, fontFace: "Noto Sans", color: C.text
});
Cards with icon, title, description. Colored backgrounds for emphasis:
const cardBgs = [C.slate, C.teal, C.navy];
d.cards.forEach((c, i) => {
const x = 0.5 + i * 3.15;
s.addShape(pres.shapes.RECTANGLE, {
x, y: 2.1, w: 2.95, h: 2.8,
fill: { color: cardBgs[i] },
shadow: makeShadow()
});
// icon, title, description inside...
});
Use pptxgenjs's built-in table with styled headers:
const headers = [
{ text: "", options: { fill: { color: C.navy }, color: C.white, bold: true } },
...d.columns.map((col, i) => ({
text: col,
options: {
fill: { color: i === d.columns.length - 1 ? C.teal : C.navy },
color: C.white, bold: true, align: "center"
}
}))
];
Highlight the "us" column with a different header color and a light fill on the data cells.
pptxgenjs has built-in chart support:
s.addChart(pres.charts.BAR, [{
name: d.chart.title,
labels: d.chart.labels,
values: d.chart.values,
}], {
x: 0.5, y: 1.15, w: 5.5, h: 3.0,
barDir: "col",
chartColors: [C.teal],
showValue: true,
dataLabelPosition: "outEnd",
showLegend: false,
});
Draw ovals from largest to smallest. Add text labels AFTER the circles so text renders on top:
const sizes = [
{ w: 7.2, h: 4.0 }, // outermost
{ w: 5.8, h: 3.2 },
{ w: 4.4, h: 2.5 },
{ w: 3.0, h: 1.8 },
{ w: 1.8, h: 1.1 }, // innermost
];
circles.forEach((c, i) => {
s.addShape(pres.shapes.OVAL, {
x: cx - sizes[i].w / 2,
y: cy - sizes[i].h / 2,
w: sizes[i].w,
h: sizes[i].h,
fill: { color: circleColors[i] },
});
});
// THEN add text labels — they'll render on top of the circles
Top row: 3 execution team cards with avatar circles, name, role, bio. Bottom row: advisory board in horizontal cards with a gold left-border accent. The visual hierarchy communicates who runs the company vs. who advises.
pptxgenjs renders elements in the order you add them. Earlier elements are behind later elements. This matters when:
If something looks wrong in the preview (text hidden behind a shape), check the add order in the generator.
"Cannot find module 'pptxgenjs'" — Run npm install pptxgenjs js-yaml from the directory where you'll execute the generator. Don't use -g.
soffice "source file could not be loaded" — Use the full absolute path to the .pptx file, not a relative path.
Text too large for its container — pptxgenjs doesn't auto-shrink text. If content changes make text longer (e.g., "Seed + Facility" becomes "Reinsurance Capital Facility"), reduce fontSize in the generator.
Font not rendering — The font must be installed on the machine that opens the .pptx. Georgia and Noto Sans are safe cross-platform choices. Avoid fonts that only exist on macOS or only on Windows.
Charts look different in LibreOffice vs PowerPoint — LibreOffice's chart rendering is approximate. Trust the PowerPoint rendering for the final version. Use LibreOffice previews only for layout checking.
The power of this approach is the rebuild loop. The user edits the YAML (or you edit it based on their feedback), you run node generate-deck.js, and 2 seconds later there's a new .pptx. No manual slide editing, no drag-and-drop, no "can you move that text box 10 pixels to the right."
The typical cycle:
This loop should take under 2 minutes per iteration. That speed is what makes the approach powerful — the user can get 5 rounds of feedback incorporated in the time it would take to manually edit the deck once.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub jvsteiner/yaml-deck-builder --plugin yaml-deck-builder