agentleFS
vokakovokako/pptx-generator/SKILL.md

pptx-generator

Skill0 starsChanged 3 months agoMITView on GitHub

Generate, edit, and read PowerPoint presentations. Create from scratch with PptxGenJS (cover, TOC, content, section divider, summary slides), edit existing PPTX via XML workflows, or extract text with markitdown. Triggers: PPT, PPTX, PowerPoint, presentation, slide, deck, slides.

  • Installs packages

28 other projects use a version of this, 14 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use react-native-dev, minimax-pdf and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MiniMax-AISkill

    react-native-dev

    React Native and Expo development guide covering components, styling, animations, navigation, state management, forms, networking, performance optimization, testing, native capabilities, and engineering (project structure, deployment, SDK upgrades, CI/CD). Use when: building React Native or Expo apps, implementing animations or native UI, managing state, fetching data, writing tests, optimizing performance, deploying to App Store/Play Store, setting up CI/CD, upgrading Expo SDK, or configuring Tailwind/NativeWind.

    Also in 4 projects that use this

  • HK-hubSkill

    minimax-pdf

    Use this skill when visual quality and design identity matter for a PDF. CREATE (generate from scratch): "make a PDF", "generate a report", "write a proposal", "create a resume", "beautiful PDF", "professional document", "cover page", "polished PDF", "client-ready document". FILL (complete form fields): "fill in the form", "fill out this PDF", "complete the form fields", "write values into PDF", "what fields does this PDF have". REFORMAT (apply design to an existing doc): "reformat this document", "apply our style", "convert this Markdown/text to PDF", "make this doc look good", "re-style this PDF". This skill uses a token-based design system: color, typography, and spacing are derived from the document type and flow through every page. The output is print-ready. Prefer this skill when appearance matters, not just when any PDF output is needed.

    Also in 11 projects that use this

  • MiniMax-AISkill

    ios-application-dev

    iOS application development guide covering UIKit, SnapKit, and SwiftUI. Includes touch targets, safe areas, navigation patterns, Dynamic Type, Dark Mode, accessibility, collection views, common UI components, and SwiftUI design guidelines. For detailed references on specific topics, see the reference files. Use when: developing iOS apps, implementing UI, reviewing iOS code, working with UIKit/SnapKit/SwiftUI layouts, building iPhone interfaces, Swift mobile development, Apple HIG compliance, iOS accessibility implementation.

    Also in 4 projects that use this

  • HK-hubSkill

    minimax-xlsx

    Open, create, read, analyze, edit, or validate Excel/spreadsheet files (.xlsx, .xlsm, .csv, .tsv). Use when the user asks to create, build, modify, analyze, read, validate, or format any Excel spreadsheet, financial model, pivot table, or tabular data file. Covers: creating new xlsx from scratch, reading and analyzing existing files, editing existing xlsx with zero format loss, formula recalculation and validation, and applying professional financial formatting standards. Triggers on 'spreadsheet', 'Excel', '.xlsx', '.csv', 'pivot table', 'financial model', 'formula', or any request to produce tabular data in Excel format.

    Also in 8 projects that use this

  • yangmourSkill

    fullstack-dev

    Also in 5 projects that use this

  • GitHubSkill

    excalidraw-diagram-generator

    Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.

    Also in 3 projects that use this

  • +2 more from HK-hub
  • +3 more from MiniMax-AI

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. 7 are common, 7 are distinctive, and 6 are very specific to this project.

  • 7

    Common

    Most of the 20 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Common:

    Search to understand user requirements — topic, audience, purpose, tone, content depth.

    line 67
  2. Common:

    Use the Color Palette Reference to select a palette matching the topic and audience.

    line 71
  3. Common:

    Use the Style Recipes to choose a visual style (Sharp, Soft, Rounded, or Pill) matching the presentation tone.

    line 75
  4. Very specific:

    Create one JS file per slide in slides/ directory.

    line 83
  5. Common:

    Must use the theme object contract (see Theme Object Contract)

    line 92
  6. Common:

    Must follow the PptxGenJS API reference

    line 93
  7. Very specific:

    Create slides/compile.js to combine all slide modules:

    line 97
  8. Common:

    All slides except Cover Page MUST include a page number badge in the bottom-right corner.

    line 208
  9. Common:

    Use palette colors, keep subtle

    line 212
  10. Distinctive:

    Use semantic names from the start if any of these apply:

    line 276
  11. Distinctive:

    If you're unsure, err on the side of semantic names.

    line 283
  12. Distinctive:

    If you anticipate the user will ask to "insert a slide", "reorder", or "split into a short version + a deep-dive version":

    line 287
  13. Distinctive:

    If you find yourself reaching for a prefix to dodge a number collision, that's the signal to migrate the whole directory to semantic names.

    line 296
  14. Distinctive:

    If a deck has already grown past the numeric-naming threshold:

    line 300
  15. Very specific:

    If your deck is short and stable, skip this — slide-01.js is fine.

    line 357
  16. Distinctive:

    In slide content (visible to audience): keep references off content pages.

    line 365
  17. Distinctive:

    In speaker notes: put per-slide citations there.

    line 367
  18. Very specific:

    When showing a URL or repository link, follow this exact convention — it matches PowerPoint's default hyperlink rendering and reads as …

    line 397
  19. Very specific:

    Always embed hyperlink: { url } so presentation mode is clickable.

    line 415
  20. Very specific:

    If the project package.json has "type": "module", all .js files are treated as ESM and require() won't work.

    line 423

“Common” is measured: kept by at least 6 in 10 of the 20 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

PPTX Generator & Editor

Overview

This skill handles all PowerPoint tasks: reading/analyzing existing presentations, editing template-based decks via XML manipulation, and creating presentations from scratch using PptxGenJS. It includes a complete design system (color palettes, fonts, style recipes) and detailed guidance for every slide type.

Quick Reference

TaskApproach
Read/analyze contentpython -m markitdown presentation.pptx
Edit or create from templateSee Editing Presentations
Create from scratchSee Creating from Scratch below
ItemValue
Dimensions10" x 5.625" (LAYOUT_16x9)
Colors6-char hex without # (e.g., "FF0000")
English fontArial (default), or approved alternatives
Chinese fontMicrosoft YaHei
Page badge positionx: 9.3", y: 5.1"
Theme keysprimary, secondary, accent, light, bg
ShapesRECTANGLE, OVAL, LINE, ROUNDED_RECTANGLE
ChartsBAR, LINE, PIE, DOUGHNUT, SCATTER, BUBBLE, RADAR

Reference Files

FileContents
themes/kiro/template-example.cjs⭐ Kiro theme — READ THIS FIRST. Complete runnable example with all slide types, helpers, pitfalls. Black bg, purple accent.
themes/aws/template-example.cjs⭐ AWS theme — READ THIS FIRST. Complete runnable example with all slide types, helpers, pitfalls. Dark bg, orange accent, cover/section bg images.
slide-types.md5 slide page types (Cover, TOC, Section Divider, Content, Summary) + additional layout patterns
design-system.mdColor palettes, font reference, style recipes (Sharp/Soft/Rounded/Pill), typography & spacing
editing.mdTemplate-based editing workflow, XML manipulation, formatting rules, common pitfalls
pitfalls.mdQA process, common mistakes, critical PptxGenJS pitfalls
pptxgenjs.mdComplete PptxGenJS API reference

Reading Content

# Text extraction
python -m markitdown presentation.pptx

Creating from Scratch — Workflow

Use when no template or reference presentation is available.

Step 1: Research & Requirements

Search to understand user requirements — topic, audience, purpose, tone, content depth.

Step 2: Select Color Palette & Fonts

Use the Color Palette Reference to select a palette matching the topic and audience. Use the Font Reference to choose a font pairing.

Step 3: Select Design Style

Use the Style Recipes to choose a visual style (Sharp, Soft, Rounded, or Pill) matching the presentation tone.

Step 4: Plan Slide Outline

Classify every slide as exactly one of the 5 page types. Plan the content and layout for each slide. Ensure visual variety — do NOT repeat the same layout across slides.

Step 5: Generate Slide JS Files

Create one JS file per slide in slides/ directory. Each file must export a synchronous createSlide(pres, theme) function. Follow the Slide Output Format and the type-specific guidance in slide-types.md. Generate up to 5 slides concurrently using subagents if available.

Tell each subagent:

  1. File naming: see File Naming Conventions below — for short decks (< 10 slides) slides/slide-01.js is fine; for longer or evolving decks use semantic names.
  2. Images go in: slides/imgs/
  3. Final PPTX goes in: slides/output/
  4. Dimensions: 10" x 5.625" (LAYOUT_16x9)
  5. Fonts: Chinese = Microsoft YaHei, English = Arial (or approved alternative)
  6. Colors: 6-char hex without # (e.g. "FF0000")
  7. Must use the theme object contract (see Theme Object Contract)
  8. Must follow the PptxGenJS API reference

Step 6: Compile into Final PPTX

Create slides/compile.js to combine all slide modules:

// slides/compile.js
const pptxgen = require('pptxgenjs');
const pres = new pptxgen();
pres.layout = 'LAYOUT_16x9';

const theme = {
  primary: "22223b",    // dark color for backgrounds/text
  secondary: "4a4e69",  // secondary accent
  accent: "9a8c98",     // highlight color
  light: "c9ada7",      // light accent
  bg: "f2e9e4"          // background color
};

for (let i = 1; i <= 12; i++) {  // adjust count as needed
  const num = String(i).padStart(2, '0');
  const slideModule = require(`./slide-${num}.js`);
  slideModule.createSlide(pres, theme);
}

pres.writeFile({ fileName: './output/presentation.pptx' });

Run with: cd slides && node compile.js

Step 7: QA (Required)

See QA Process.

Output Structure

slides/
├── slide-01.js          # Slide modules
├── slide-02.js
├── ...
├── imgs/                # Images used in slides
└── output/              # Final artifacts
    └── presentation.pptx

Slide Output Format

Each slide is a complete, runnable JS file:

// slide-01.js
const pptxgen = require("pptxgenjs");

const slideConfig = {
  type: 'cover',
  index: 1,
  title: 'Presentation Title'
};

// MUST be synchronous (not async)
function createSlide(pres, theme) {
  const slide = pres.addSlide();
  slide.background = { color: theme.bg };

  slide.addText(slideConfig.title, {
    x: 0.5, y: 2, w: 9, h: 1.2,
    fontSize: 48, fontFace: "Arial",
    color: theme.primary, bold: true, align: "center"
  });

  return slide;
}

// Standalone preview - use slide-specific filename
if (require.main === module) {
  const pres = new pptxgen();
  pres.layout = 'LAYOUT_16x9';
  const theme = {
    primary: "22223b",
    secondary: "4a4e69",
    accent: "9a8c98",
    light: "c9ada7",
    bg: "f2e9e4"
  };
  createSlide(pres, theme);
  pres.writeFile({ fileName: "slide-01-preview.pptx" });
}

module.exports = { createSlide, slideConfig };

Theme Object Contract (MANDATORY)

The compile script passes a theme object with these exact keys:

KeyPurposeExample
theme.primaryDarkest color, titles"22223b"
theme.secondaryDark accent, body text"4a4e69"
theme.accentMid-tone accent"9a8c98"
theme.lightLight accent"c9ada7"
theme.bgBackground color"f2e9e4"

NEVER use other key names like background, text, muted, darkest, lightest.


Page Number Badge (REQUIRED)

All slides except Cover Page MUST include a page number badge in the bottom-right corner.

  • Position: x: 9.3", y: 5.1"
  • Show current number only (e.g. 3 or 03), NOT "3/12"
  • Use palette colors, keep subtle

Circle Badge (Default)

slide.addShape(pres.shapes.OVAL, {
  x: 9.3, y: 5.1, w: 0.4, h: 0.4,
  fill: { color: theme.accent }
});
slide.addText("3", {
  x: 9.3, y: 5.1, w: 0.4, h: 0.4,
  fontSize: 12, fontFace: "Arial",
  color: "FFFFFF", bold: true,
  align: "center", valign: "middle"
});

Pill Badge

slide.addShape(pres.shapes.ROUNDED_RECTANGLE, {
  x: 9.1, y: 5.15, w: 0.6, h: 0.35,
  fill: { color: theme.accent },
  rectRadius: 0.15
});
slide.addText("03", {
  x: 9.1, y: 5.15, w: 0.6, h: 0.35,
  fontSize: 11, fontFace: "Arial",
  color: "FFFFFF", bold: true,
  align: "center", valign: "middle"
});

Image Aspect Ratio (CRITICAL)

⚠️ sizing: { type: 'contain' } does NOT work in PptxGenJS v4!

Must manually calculate w/h:
  imgRatio = originalWidth / originalHeight  (use PIL or sips)
  boxRatio = boxW / boxH

  if imgRatio > boxRatio:
    w = boxW
    h = boxW / imgRatio
  else:
    h = boxH
    w = boxH * imgRatio

File Naming Conventions

Deck sizeRecommended namingWhy
< 10 slidesslide-01.js, slide-02.js, ...Index by position, short and obvious
10+ slides, evolvingslide-cover.js, slide-aidlc-three-phases.js, slide-no-silver-bullet.js, ...Semantic names survive reordering
Multiple decks sharing slidesSemantic names + manifestSame slide-foo.js reused via different manifest arrays

When to default to semantic names

Use semantic names from the start if any of these apply:

  • The deck is for product/changelog content that will be updated as new versions ship — every release adds pages
  • Sections may be inserted, reordered, or split off later
  • You expect to add detail pages under existing overview pages
  • Multiple decks may share slides

If you're unsure, err on the side of semantic names. Numbers feel cheap up front but get expensive later — the cost of getting it wrong is asymmetric.

Why semantic naming for evolving decks

If you anticipate the user will ask to "insert a slide", "reorder", or "split into a short version + a deep-dive version":

  • Numeric names (slide-11.js) force you to renumber every downstream file when one slide is inserted, and to update internal references like ctx.footer(s, 11) inside each file.
  • Semantic names + a separate manifest decouple file identity from position. Inserting a slide is one new file + one manifest entry. No mass renames.

Anti-pattern: prefix-shimming around an early numeric scheme

If a deck starts with slide-01.js...slide-23.js and later needs to insert pages without renumbering, the natural escape route is to prefix new files: slide-d1.js (detail), slide-t1.js (TUI screenshots), slide-n-cli22.js (new batch). This looks like it solves the problem but creates a different one — the codebase ends up with multiple naming dialects coexisting, and the prefixes themselves become positional markers ("d-prefix means video page after the overview"). Future contributors (and your future self) lose the ability to scan the directory and know what's what.

If you find yourself reaching for a prefix to dodge a number collision, that's the signal to migrate the whole directory to semantic names. Don't keep extending the dialect.

Migrating from numeric to semantic naming

If a deck has already grown past the numeric-naming threshold:

  1. List every used slide file — read compile.js and identify which slide-*.js are actually referenced. Anything else is dead code.
  2. Plan a name for each — slide-{section}-{topic}.js:
    • slide-cover.js, slide-toc.js, slide-takeaways.js, slide-thank-you.js
    • Section dividers: slide-sec-cli.js, slide-sec-web.js, slide-sec-enterprise.js
    • Content pages: slide-cli-2-2-adaptive.js, slide-tui-task-queue.js, slide-enterprise-mcp-registry.js
  3. Use git mv for renames so git tracks them as renames, not delete+add. History stays intact.
  4. Delete the dead files at the same time.
  5. Rewrite compile.js to drive from a single order array of semantic ids; remove all numeric padding logic.

Even a 40-page deck migrates in one commit. The longer you wait, the more references inside slide files reference each other by number, and the harder migration becomes.

Manifest + counter pattern (advanced)

For long-running decks where slides shift position frequently, drive the build from a manifest array and let a single compile.js track running page numbers / chapter counts:

// compile.js
const manifest = [
  { file: "slide-cover" },
  { file: "slide-toc" },
  { file: "slide-part-intro-divider" },
  { file: "slide-aidlc-three-phases", meta: { type: "content", label: "三阶段" } },
  { file: "slide-aidlc-five-step-loop", meta: { type: "content", label: "核心五步" } },
  // ...
  { file: "slide-end" },
];

let pageNum = 0, chapter = 0, sub = 0;
for (const entry of manifest) {
  pageNum += 1;
  // advance chapter / sub counters based on entry.meta.type ...
  const ctx = { pageNum, chapter, sub, /* helpers */ };
  require(`./${entry.file}.js`).createSlide(pres, theme, ctx);
}

Each slide file then renders content only — no page numbers, no 2.3 prefixes hardcoded inside the slide. This makes the same slide-aidlc-three-phases.js reusable across a 40-page full version and a 20-page keynote version.

A simpler form (used in real changelog decks) — one semantic id array, page numbers via positional argument:

// compile.js
const order = [
  "cover", "toc",
  "sec-cli",
  "cli-2-2-adaptive", "cli-2-1-overview", "cli-2-1-shell-streaming", ...,
  "sec-web", "web-modes", "web-github", "web-sandbox",
  ...,
  "takeaways", "thank-you"
];
order.forEach((id, idx) => {
  require(`./slide-${id}.js`).createSlide(pres, idx + 1);
});

If your deck is short and stable, skip this — slide-01.js is fine.


References & Citations

For decks that cite external sources, don't put a Source: ... line on every content slide. It clutters the layout and reads as academic over-citation. Instead:

  • In slide content (visible to audience): keep references off content pages. Mention key sources verbally; the deck stays clean.
  • In a single References slide near the end: consolidate the 1-3 most important sources as clickable hyperlinks (see Hyperlinks on Slides).
  • In speaker notes: put per-slide citations there. They're available during rehearsal and Q&A but don't pollute the slide.

Example structure:

slide-end.js
  ├── 正文:感谢页 + 1-2 条核心 References URL(可点击)
  └── speaker notes:完整引用列表(每条文献全 metadata)

slide-foo.js (any content slide)
  ├── 正文:clean,no source line
  └── speaker notes:本页特定 citations + 引用页码

Helper convention:

// In helpers.cjs
function source(s, text) {
  // Intentional no-op. Citations live in speaker notes (notes-data.cjs),
  // injected by compile.js into the slide's notes.
}

This pattern keeps ctx.source(s, "...") calls in slide files for findability (grep-able) without printing them on the slide itself.


Hyperlinks on Slides

When showing a URL or repository link, follow this exact convention — it matches PowerPoint's default hyperlink rendering and reads as conventionally as a <a href> in HTML:

slide.addText("https://github.com/example/project", {
  x: 0.5, y: 6.5, w: 12, h: 0.32,
  fontSize: 11, fontFace: "Courier New",      // monospace — clearly a URL
  color: "0563C1",                            // PowerPoint hyperlink blue
  align: "center", valign: "middle",
  hyperlink: { url: "https://github.com/example/project", tooltip: "..." }
});

Rules (also documented in pitfalls.md):

  • Color must be 0563C1 — PowerPoint's default hyperlink blue. Don't substitute theme accent colors.
  • Display the full URL including https:// so readers can copy it from a printed/exported PDF.
  • Monospace font.
  • No ↗, 🔗, Click here, or emoji prefixes.
  • Always embed hyperlink: { url } so presentation mode is clickable.

For a working example see the "外部参考:开源项目链接页" slide in themes/aws/template-example.cjs.


ES Module Compatibility

If the project package.json has "type": "module", all .js files are treated as ESM and require() won't work. Rename files to .cjs to use CommonJS.


Dependencies

  • pip install "markitdown[pptx]" — text extraction
  • npm install pptxgenjs — creating from scratch
  • npm install react-icons react react-dom sharp — icons (optional)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.