CommunityWriting & Editinggithub.com

bruc3van/bruce-pptx-generator

An AI coding agent skill designed to generate professional PowerPoint presentations from scratch using code, based on your requirements.

What is bruce-pptx-generator?

This skill enables AI coding agents like Claude Code, Cursor, or Codex to create professional PowerPoint (.pptx) presentations programmatically using the PptxGenJS library. It provides a structured workflow for either editing existing templates or creating new presentations from scratch using pre-defined style presets. The skill enforces a high-quality "furnished apartment" standard, requiring rich content on each slide including data, taglines, visual elements, and proper formatting. It supports multiple visual styles such as McKinsey Blue, Huawei Corporate, Apple Minimal, Pitch Deck, Data Analysis, and Dark Tech, each with dedicated rich card components and layout rules. The skill also includes rules for data inference, prompting users for missing data or using industry benchmarks with appropriate disclaimers, and strict formatting constraints to ensure compatibility and professional appearance. The entire workflow, from style selection to slide generation, is guided by a routing table that loads specific reference files (e.g., workflow.md, pptxgenjs.md, qa.md) based on the task type.

Works with~Claude Code~Codex CLI~Cursor
npx skills add bruc3van/bruce-pptx-generator

Installed? Explore more Writing & Editing skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Bruce's PPTX Generator

Task Routing

Based on the task type, select the correct path and load the corresponding file.

TaskFile to Load
Editing an existing PPTX templateediting.md + pptxgenjs.md
Creating from scratch (using a style preset)workflow.md + preset file + pptxgenjs.md + qa.md

Style Presets

When using a preset, load the preset file which includes complete page layouts, component functions, color palettes, and content density rules.

Style Selection

If the user doesn't specify a style, default to Huawei Corporate. To confirm, use AskUserQuestion: What feeling should the audience have after viewing this presentation?

PresetAudience FeelingFontFileUse Case
McKinsey BlueLogical RigorYaHei + Arial Blackmckinsey-style.mdStrategic briefings, consulting reports, management proposals
Huawei CorporateProfessional AuthorityYaHei + Arial Blackhuawei-style.mdProduct introductions, company overviews, solutions, government/enterprise proposals
Apple MinimalInspiringYaHei + Arial Blackapple-minimal-style.mdProduct launches, Demos, Vision talks, external roadshows
Pitch DeckSell the VisionYaHei + Arial Blackpitch-deck-style.mdFundraising roadshows, Roadmap proposals, Business Cases
Data AnalysisClarify InsightsYaHei + Arial Blackdata-analysis-style.mdUser research reports, A/B results, OKR reviews, Metrics meetings
Dark TechInnovation & Forward-thinkingYaHei + Arial Blackdark-tech-style.mdProduct launches, Technical talks, AI capability demos

Inform the user of the recommended preset and the reason, then enter the workflow. Allow manual selection if the user is unsatisfied.

Data Inference Principles

Vague statements are prohibited in presentations. Every argument must be supported by specific data. When user input lacks data:

  1. Ask First: If there are 1–3 data gaps in the input, use AskUserQuestion to ask for all missing numbers at once, specifying which slide each number is for.
  2. Allow Estimations: When there are many gaps or the user explicitly says "generate directly," use typical industry benchmark values. Add a footnote at the bottom of the slide: "Based on industry estimates; replace with actual data." Inform the user which values are estimated in your response.
  3. No Empty Placeholders: Do not write "XX%", "N items", "hundreds of thousands of users" without filling in actual numbers.

Signal words triggering a question (ask for numbers if any appear):

"many users," "significant improvement," "dramatic reduction," "rapid growth," "substantial," "clearly," "effective"

Furnished Apartment Delivery Standard (Mandatory)

Every presentation must meet the "furnished apartment" standard; delivering "bare shell" slides with just a title and one sentence is prohibited.

Content Richness (Required per content slide)

  1. Data or statistics are mandatory: Every core argument must be supported by a number, ratio, time, or industry data. E.g., "Chronic follow-up dropout rate > 60%" or "Reaching 118 million empty-nest elderly."
  2. Tagline is mandatory: Each card or module must have a precise tagline of 12–20 words explaining "What problem does this solve?" E.g., "Financial-grade identity authentication, fully controllable data access."
  3. Bullets must have visual prefixes: Use small squares/dots/numbers as prefixes. Pure text stacking is prohibited. Each bullet should be a complete semantic sentence, not just a keyword.
  4. Non-text visual elements are mandatory: Except for Apple Minimal, every content slide must include at least one non-text visual component (SVG icon, data card, flow chart, progress ring, comparison matrix, architecture diagram, KPI card). A slide with only a text list is considered a bare shell and must be supplemented with visual elements. For Apple Minimal style, which emphasizes minimalism and restraint, add visual elements as appropriate per slide.
  5. Graphic density limits (overflow prevention):
    • Each slide may use at most one large graphic component (Flowchart OR Matrix OR Progress Ring Group OR Pyramid – choose one; stacking is prohibited)
    • Do not combine two large graphics on the same page: Progress Ring + Matrix, Pyramid + Flowchart = high overflow risk
    • The content area height is only 3.95" (y:1.05 → y:5.0). After placing a large graphic, remaining text space is limited; estimate before adding whether the text can fit
    • Do not hand-code from scratch the following components (not in the preset library; implementing an algorithm would be required): Funnel chart, Gantt chart, Radar chart. If the current preset file contains a corresponding function, use it; otherwise, skip.
  6. Bottom note/insight area is mandatory: The bottom of each core module should have a 1–2 line supplementary note to reinforce value or provide an action recommendation.

Component Upgrade Principle

Each style has corresponding Furnished Rich Card components that must be used as the first choice; avoid falling back to basic cards with only title + desc:

StyleRich Cover ComponentRich Content ComponentsProhibited Basic Components
Huawei CorporatecreateRichCoveraddHuaweiRichCard, makePainPointCard, addHuaweiProcessFlowBasic usage of addHuaweiNumberedCard (only title+desc, no tagline/bullet/bottom note)
McKinsey BluecreateRichCoveraddMcKinseyRichCard, makeProgressRing + KPI cardaddMcKinseyCard(value, label, desc)
Apple MinimalcreateRichCoveraddAppleRichCard, addAppleKPIaddAppleBullets used alone
Pitch DeckcreateRichCoveraddPitchRichCard, addTractionCardPlain text list slide
Dark TechcreateRichCoveraddDarkRichCard, addFeatureItemOnly title + body paragraph
Data AnalysiscreateRichCoveraddDataRichCard, createChartWithInsightsSlidePlain text analysis slide
  • The cover slide must have decorative visual elements (geometric shapes, SVG decorations, capability cards on the right, etc.); a cover with only title and date is prohibited.
  • Note: createRichCover has different parameter signatures per style (Huawei version has metrics/valueSlogan, Apple version has spotlight, Pitch Deck version has traction/stage). Always consult the current preset file for call examples before use; do not apply parameters across styles.

Mandatory Rules

The following rules apply to every slide in every presentation.

Dimensions — 10" × 5.625" (LAYOUT_16x9). Every element must satisfy x + w ≤ 10 and y + h ≤ 5.625.

Colors — 6-digit hexadecimal, without # (e.g., "FF0000"). Using "#FF0000" is prohibited — it will corrupt the file.

Fonts — Chinese: Microsoft YaHei | English: Arial (or alternative fonts specified in the current preset)

Prohibited Fonts — The following fonts are prohibited for display/title fonts: SimSun, Fangsong, Times New Roman. They look amateurish in modern presentations.

theme object — Two-layer convention that must be clearly distinguished:

① compile.js / subagent input layer (strictly 5 keys)

KeyPurpose
theme.primaryDarkest color — titles, main text
theme.secondaryAccent color — interactive elements, highlights
theme.accentSignature decorative color (e.g., orange lines)
theme.lightLight fill — card backgrounds, zebra striping rows
theme.bgSlide background color

The theme object defined in compile.js should only pass these 5 keys. The subagent must also declare only these 5 in the DESIGN INTENT comment. Do not use background, text, muted, darkest, lightest, or other invented key names at this layer.

② Style preset file internal layer (allows extended keys)

Component functions in each preset file (e.g., huawei-style.md) may reference extended keys defined within the preset file, such as theme.border, theme.bodyText, theme.mutedText, theme.orangeLight, etc. These keys are defined in the theme const block of the preset file and are not considered violations.

Page Number Badge — Every slide except the cover must have one:

  • Circle shape: x: 9.3, y: 5.1, w: 0.4, h: 0.4
  • Capsule shape: x: 9.1, y: 5.15, w: 0.6, h: 0.35
  • Show only the page number (e.g., "3"); using a "3/12" format is prohibited

createSlide() must be a synchronous function — Do not use async. compile.js will not await it.

Prohibitions (Common AI-Generated Quality Traps)

These are patterns most likely to make a presentation look low-quality. Actively avoid them every time:

Content Density

  • More than 6 bullet points on a single content slide — if exceeded, split into two slides
  • Any bullet exceeding 20 words — shorten or switch to a card layout
  • More than 3 consecutive slides with the same layout type

Visual

  • Inconsistent background colors across slides (all content slides must consistently use theme.bg)
  • Adding gradients to every element — gradients are for emphasis only, not for overuse
  • Center-aligned everything — it looks bland; left alignment creates better hierarchy
  • Stacking decorative color blocks without layout logic

Text

  • Title that copies the first sentence of the body text — the title should be the conclusion or main point, not a description
  • English text mixed with SimSun/Fangsong fonts — English must use the specified English font
  • Color values with # prefix ("#1F3864" → change to "1F3864") — will corrupt the file

Dependency Installation

npm install -g pptxgenjs

Related Skills