R

Rapid Presentation Builder Workshop

Boost productivity with intelligent create and adjust slides, layouts, and presentation templates. Built for Claude Code with best practices and real-world patterns.

SkillCommunitydevelopmentv1.0.0MIT
0 views0 copies

Rapid Presentation Builder

A document automation skill for programmatically creating, modifying, and generating PowerPoint presentations using libraries like python-pptx and PptxGenJS for automated report generation and slide deck assembly.

When to Use

Choose Rapid Presentation Builder when:

  • Generating slide decks automatically from data (quarterly reports, dashboards)
  • Building presentation templates with dynamic content injection
  • Converting data visualizations and charts into slide format
  • Automating recurring presentation workflows for business reporting

Consider alternatives when:

  • Creating a single custom presentation — use PowerPoint or Google Slides directly
  • Building interactive web presentations — use Reveal.js or Slidev
  • Generating PDF reports — use a PDF generation library

Quick Start

# Python pip install python-pptx matplotlib # Node.js npm install pptxgenjs
from pptx import Presentation from pptx.util import Inches, Pt, Emu from pptx.dml.color import RGBColor from pptx.enum.text import PP_ALIGN def create_report_deck(data): prs = Presentation() prs.slide_width = Inches(13.333) prs.slide_height = Inches(7.5) # Title slide slide = prs.slides.add_slide(prs.slide_layouts[0]) slide.shapes.title.text = data['title'] slide.placeholders[1].text = f"{data['subtitle']}\n{data['date']}" # Metrics slide slide = prs.slides.add_slide(prs.slide_layouts[5]) # Blank slide.shapes.title.text = "Key Metrics" metrics = data['metrics'] card_width = Inches(2.8) card_height = Inches(2) start_x = Inches(0.8) for i, metric in enumerate(metrics): left = start_x + (card_width + Inches(0.3)) * i top = Inches(2.5) shape = slide.shapes.add_shape( 1, left, top, card_width, card_height # Rectangle ) shape.fill.solid() shape.fill.fore_color.rgb = RGBColor(0x44, 0x72, 0xC4) tf = shape.text_frame tf.word_wrap = True p = tf.paragraphs[0] p.text = str(metric['value']) p.font.size = Pt(36) p.font.color.rgb = RGBColor(0xFF, 0xFF, 0xFF) p.font.bold = True p.alignment = PP_ALIGN.CENTER p2 = tf.add_paragraph() p2.text = metric['label'] p2.font.size = Pt(14) p2.font.color.rgb = RGBColor(0xDD, 0xDD, 0xFF) p2.alignment = PP_ALIGN.CENTER # Chart slide (add matplotlib chart as image) if data.get('chart_path'): slide = prs.slides.add_slide(prs.slide_layouts[5]) slide.shapes.title.text = "Trend Analysis" slide.shapes.add_picture( data['chart_path'], Inches(1.5), Inches(2), Inches(10), Inches(5) ) # Table slide slide = prs.slides.add_slide(prs.slide_layouts[5]) slide.shapes.title.text = "Detailed Breakdown" table_data = data['table'] rows, cols = len(table_data) + 1, len(table_data[0]) table = slide.shapes.add_table( rows, cols, Inches(1), Inches(2), Inches(11), Inches(4) ).table # Header row for j, header in enumerate(data['table_headers']): cell = table.cell(0, j) cell.text = header cell.fill.solid() cell.fill.fore_color.rgb = RGBColor(0x44, 0x72, 0xC4) for paragraph in cell.text_frame.paragraphs: paragraph.font.color.rgb = RGBColor(0xFF, 0xFF, 0xFF) paragraph.font.bold = True # Data rows for i, row in enumerate(table_data): for j, val in enumerate(row): table.cell(i + 1, j).text = str(val) prs.save(data['output_path']) return data['output_path']

Core Concepts

Slide Layout Types

Layout IndexNameUse Case
0Title SlideOpening slide with title and subtitle
1Title and ContentStandard content slide
2Section HeaderDivider between sections
5BlankCustom layouts with shapes/images
6Content with CaptionImage with description

Automated Slide Generation

const pptxgen = require('pptxgenjs'); function generateDeck(data) { const pptx = new pptxgen(); pptx.defineLayout({ name: 'WIDE', width: 13.33, height: 7.5 }); pptx.layout = 'WIDE'; // Dynamic slide generation from data array for (const section of data.sections) { const slide = pptx.addSlide(); slide.addText(section.title, { x: 0.5, y: 0.3, w: 12, h: 1, fontSize: 28, bold: true, color: '363636' }); if (section.type === 'bullets') { slide.addText( section.points.map(p => ({ text: p, options: { bullet: true } })), { x: 0.8, y: 1.5, w: 11, h: 5, fontSize: 18, color: '555555' } ); } else if (section.type === 'chart') { slide.addChart(pptx.charts.BAR, section.chartData, { x: 1, y: 1.5, w: 10, h: 5 }); } else if (section.type === 'table') { slide.addTable(section.tableData, { x: 0.5, y: 1.5, w: 12, fontSize: 12, border: { pt: 1, color: 'CFCFCF' } }); } } return pptx.writeFile({ fileName: data.filename }); }

Configuration

OptionDescriptionDefault
slide_widthSlide width in inches13.333 (widescreen)
slide_heightSlide height in inches7.5
default_fontDefault font family"Calibri"
title_font_sizeTitle text size (points)28
body_font_sizeBody text size (points)18
brand_colorPrimary brand color (hex)"#4472C4"
template_pathBase template .pptx filenull
output_formatOutput format: pptx, pdf"pptx"

Best Practices

  1. Start with a branded template as the base presentation and add slides to it rather than building from scratch — this preserves master slides, fonts, color themes, and logos that are difficult to replicate programmatically
  2. Use Inches/Pt helper functions consistently for all positioning to avoid confusion between EMU units, inches, and points — mixing units is the most common source of positioning bugs
  3. Generate charts as images with Matplotlib or Chart.js and embed them rather than using PowerPoint's native charts, which have limited customization options and can render differently across versions
  4. Test with both PowerPoint and Google Slides because they handle shapes, fonts, and layouts slightly differently; generated presentations should look correct in both applications
  5. Add speaker notes programmatically with context and talking points so the generated deck is presentation-ready, not just a visual export

Common Issues

Text overflowing shape boundaries: Long text does not auto-shrink in programmatically created shapes like it does in the PowerPoint editor. Set autofit properties on text frames, calculate text length before setting font sizes, or truncate text to fit the available space.

Master slide styles not applying: Slides created with add_slide(layout) should inherit master formatting, but custom elements added with add_shape or add_text do not. Apply fonts, colors, and sizes explicitly on every element, or use placeholders from the layout rather than adding new shapes.

Inconsistent rendering across viewers: PowerPoint, Google Slides, LibreOffice, and Keynote render .pptx files with subtle differences in font metrics, shape rendering, and color handling. Test generated presentations in the primary target viewer and avoid complex features like 3D effects and advanced animations that render inconsistently.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates