Skip to content

HezaoHezao/poirot / poirot/backend/agents/skill/builtin_skills/productivity/ppt-generation

ppt-generation

Verified

Generate PPTX presentations from slide plan + content.

PPT Generation

Overview

Generate professional PowerPoint presentations. Plan the structure with a consistent visual style, generate slide content, and compose into a PPTX file.

Poirot note: The original deer-flow skill uses AI image-generation per slide. Poirot may not have image-generation available. This version generates text-based slides with python-pptx. Install: pip install python-pptx.

When to Use

  • User requests to generate, create, or make presentations (PPT/PPTX)
  • User wants slides for a topic with structured content
  • User needs a visual presentation from research findings

Presentation Styles

StyleDescriptionBest For
dark-premiumBlack bg, luminous accents, luxury aestheticExecutive presentations
gradient-modernBold mesh gradients, contemporary typographyStartups, brand launches
minimal-swissGrid-based, bold negative space, timelessConsulting, architecture
keynoteApple-inspired, bold typography, dramatic imageryKeynotes, product reveals
editorialMagazine-quality layouts, sophisticated typographyAnnual reports, thought leadership

Workflow

Step 1: Understand Requirements

  • Topic/subject
  • Number of slides (default: 5-10)
  • Style: dark-premium / gradient-modern / minimal-swiss / keynote / editorial
  • Aspect ratio: 16:9 (standard) or 4:3
  • Content outline: key points per slide

Step 2: Research (if needed)

Use deep-research skill to gather content for the presentation.

Step 3: Create Presentation Plan

{
  "title": "Presentation Title",
  "style": "dark-premium",
  "slides": [
    {"number": 1, "type": "title", "title": "...", "subtitle": "..."},
    {"number": 2, "type": "content", "title": "...", "bullets": ["...", "..."]},
    {"number": 3, "type": "chart", "title": "...", "data": {...}},
    {"number": 4, "type": "section", "title": "..."},
    {"number": 5, "type": "content", "title": "...", "bullets": ["...", "..."]},
    {"number": 6, "type": "closing", "title": "Thank You", "subtitle": "..."}
  ]
}

Step 4: Generate PPTX

python3 -c "
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN

prs = Presentation()
prs.slide_width = Inches(13.333)  # 16:9
prs.slide_height = Inches(7.5)

# Style: dark-premium
BG_COLOR = RGBColor(0x0A, 0x0A, 0x0A)
TEXT_COLOR = RGBColor(0xFF, 0xFF, 0xFF)
ACCENT_COLOR = RGBColor(0x00, 0xD9, 0xFF)

def add_slide(prs, layout_idx=6):  # 6 = blank
    slide = prs.slides.add_slide(prs.slide_layouts[layout_idx])
    bg = slide.background
    fill = bg.fill
    fill.solid()
    fill.fore_color.rgb = BG_COLOR
    return slide

def add_text(slide, text, left, top, width, height, size=24, color=TEXT_COLOR, bold=False):
    txBox = slide.shapes.add_textbox(Inches(left), Inches(top), Inches(width), Inches(height))
    tf = txBox.text_frame
    p = tf.paragraphs[0]
    p.text = text
    p.font.size = Pt(size)
    p.font.color.rgb = color
    p.font.bold = bold
    return txBox

# Slide 1: Title
slide = add_slide(prs)
add_text(slide, 'Presentation Title', 1, 2, 11, 2, size=44, bold=True)
add_text(slide, 'Subtitle', 1, 4, 11, 1, size=24, color=ACCENT_COLOR)

# Slide 2: Content with bullets
slide = add_slide(prs)
add_text(slide, 'Key Points', 1, 0.5, 11, 1, size=36, bold=True)
for i, bullet in enumerate(['Point one', 'Point two', 'Point three']):
    add_text(slide, f'• {bullet}', 1, 2 + i*0.8, 11, 0.7, size=24)

# Slide 3: Section divider
slide = add_slide(prs)
add_text(slide, 'Section Title', 1, 3, 11, 1.5, size=40, bold=True, color=ACCENT_COLOR)

# Save
prs.save('.poirot/outputs/presentation.pptx')
print('Saved to .poirot/outputs/presentation.pptx')
"

Step 5: Present

present_files([".poirot/outputs/presentation.pptx"])

Slide Types

TypeContentLayout
titleTitle + subtitleCentered, large font
contentTitle + bulletsLeft-aligned, 3-5 bullets
sectionSection title onlyCentered, accent color
chartTitle + chart imageChart from chart-visualization skill
quoteLarge quote + attributionCentered, italic
closingThank you + contactCentered

Pitfalls

  • Too much text per slide: max 5-6 bullets, max 2 lines each. Slides are visual aids, not documents.
  • Font sizes too small: title ≥36pt, body ≥24pt. If text doesn't fit, split into more slides.
  • Inconsistent style: all slides must use the same color palette, font sizes, and layout patterns.
  • No visual hierarchy: title > section headers > bullets > footnotes. Use size + weight + color to establish hierarchy.
  • python-pptx not installed: pip install python-pptx first.
  • Image slides: if you need chart images, generate them first with the chart-visualization skill, then embed as slide.shapes.add_picture().
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall