.claude/skills/pptx/SKILL.md
PowerPoint presentation generation using python-pptx. Create slides from Claude output, data analysis, or structured content. Covers slide templates, shapes, charts, tables, and themed presentations. Use for generating .pptx files programmatically.
npx skillsauth add oimiragieo/agent-studio pptxInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate .pptx files programmatically using python-pptx. Convert Claude output, data analysis results, research reports, and structured data into polished PowerPoint presentations.
Skill({ skill: 'pptx' }) when:
pip install python-pptx
# or
uv add python-pptx
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.enum.text import PP_ALIGN
from pptx.dml.color import RGBColor
# Create presentation
prs = Presentation()
# Set slide dimensions (widescreen 16:9)
prs.slide_width = Inches(13.33)
prs.slide_height = Inches(7.5)
# Add title slide using layout 0
title_layout = prs.slide_layouts[0]
slide = prs.slides.add_slide(title_layout)
title = slide.shapes.title
subtitle = slide.placeholders[1]
title.text = "Q1 2026 Business Review"
subtitle.text = "Prepared by Claude Agent"
# Add content slide using layout 1 (title + content)
content_layout = prs.slide_layouts[1]
slide = prs.slides.add_slide(content_layout)
slide.shapes.title.text = "Key Findings"
tf = slide.placeholders[1].text_frame
tf.text = "Revenue grew 23% YoY"
p = tf.add_paragraph()
p.text = "Customer retention at 94%"
p.level = 1 # Indent level
prs.save("presentation.pptx")
Standard layouts available in default template:
| Index | Name | Use For | | ----- | --------------------- | --------------------------- | | 0 | Title Slide | Opening slide | | 1 | Title and Content | Main content slides | | 2 | Title and Two Content | Side-by-side comparison | | 5 | Title Only | Charts or images with title | | 6 | Blank | Custom layouts |
# List all layouts in a template
for i, layout in enumerate(prs.slide_layouts):
print(f"{i}: {layout.name}")
from pptx.util import Pt
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN
def format_paragraph(paragraph, text, size=18, bold=False, color=None, align=PP_ALIGN.LEFT):
run = paragraph.add_run()
run.text = text
font = run.font
font.size = Pt(size)
font.bold = bold
if color:
font.color.rgb = RGBColor(*color) # e.g., (0x1F, 0x49, 0x7D) for dark blue
paragraph.alignment = align
return run
# Usage
tf = slide.placeholders[1].text_frame
tf.clear() # Clear existing content
p = tf.paragraphs[0]
format_paragraph(p, "Important Metric: 94%", size=24, bold=True, color=(0x1F, 0x49, 0x7D))
from pptx.util import Inches
def add_table_slide(prs, title, headers, rows):
"""Add a slide with a formatted table."""
slide = prs.slides.add_slide(prs.slide_layouts[5]) # Title Only
slide.shapes.title.text = title
# Position: left, top, width, height
left = Inches(0.5)
top = Inches(1.5)
width = Inches(12.3)
height = Inches(0.8 * (len(rows) + 1))
table = slide.shapes.add_table(
len(rows) + 1, len(headers), left, top, width, height
).table
# Header row
for col_idx, header in enumerate(headers):
cell = table.cell(0, col_idx)
cell.text = header
cell.text_frame.paragraphs[0].runs[0].font.bold = True
# Data rows
for row_idx, row in enumerate(rows):
for col_idx, value in enumerate(row):
table.cell(row_idx + 1, col_idx).text = str(value)
return slide
# Usage
headers = ["Product", "Revenue", "Growth"]
rows = [
("Widget A", "$1.2M", "+23%"),
("Widget B", "$890K", "+15%"),
("Widget C", "$450K", "-5%"),
]
add_table_slide(prs, "Revenue by Product", headers, rows)
from pptx.chart.data import ChartData
from pptx.enum.chart import XL_CHART_TYPE
from pptx.util import Inches
def add_bar_chart(slide, title, categories, series_name, values):
"""Add a bar chart to a slide."""
chart_data = ChartData()
chart_data.categories = categories
chart_data.add_series(series_name, values)
chart = slide.shapes.add_chart(
XL_CHART_TYPE.COLUMN_CLUSTERED,
Inches(1), Inches(1.5), # left, top
Inches(11), Inches(5.5), # width, height
chart_data
).chart
chart.has_title = True
chart.chart_title.text_frame.text = title
chart.has_legend = False
return chart
# Usage
slide = prs.slides.add_slide(prs.slide_layouts[5])
slide.shapes.title.text = "Monthly Revenue"
add_bar_chart(
slide,
"Revenue by Month (2026)",
["Jan", "Feb", "Mar"],
"Revenue ($K)",
(450, 520, 610)
)
from pptx.util import Inches
def add_image_slide(prs, title, image_path, caption=None):
slide = prs.slides.add_slide(prs.slide_layouts[5])
slide.shapes.title.text = title
# Center image on slide
pic = slide.shapes.add_picture(
image_path,
left=Inches(1.5),
top=Inches(1.5),
width=Inches(10),
)
if caption:
txBox = slide.shapes.add_textbox(
Inches(1.5), Inches(6.8), Inches(10), Inches(0.5)
)
tf = txBox.text_frame
tf.text = caption
tf.paragraphs[0].alignment = PP_ALIGN.CENTER
return slide
import json
from pptx import Presentation
from pptx.util import Inches, Pt
def claude_output_to_slides(slide_data: list[dict], output_path: str):
"""
Convert Claude structured output to a PowerPoint file.
Expected slide_data format:
[
{"type": "title", "title": "...", "subtitle": "..."},
{"type": "content", "title": "...", "bullets": ["...", "..."]},
{"type": "table", "title": "...", "headers": [...], "rows": [[...], ...]},
]
"""
prs = Presentation()
prs.slide_width = Inches(13.33)
prs.slide_height = Inches(7.5)
for slide_spec in slide_data:
if slide_spec["type"] == "title":
slide = prs.slides.add_slide(prs.slide_layouts[0])
slide.shapes.title.text = slide_spec["title"]
if "subtitle" in slide_spec:
slide.placeholders[1].text = slide_spec["subtitle"]
elif slide_spec["type"] == "content":
slide = prs.slides.add_slide(prs.slide_layouts[1])
slide.shapes.title.text = slide_spec["title"]
tf = slide.placeholders[1].text_frame
tf.text = slide_spec["bullets"][0]
for bullet in slide_spec["bullets"][1:]:
p = tf.add_paragraph()
p.text = bullet
p.level = 1
elif slide_spec["type"] == "table":
add_table_slide(
prs,
slide_spec["title"],
slide_spec["headers"],
slide_spec["rows"]
)
prs.save(output_path)
return output_path
# Example: Generate from Claude JSON output
slide_data = [
{"type": "title", "title": "Q1 2026 Report", "subtitle": "Generated by Claude"},
{"type": "content", "title": "Key Highlights", "bullets": [
"Revenue up 23% YoY",
"New customer acquisition: +450",
"NPS score improved to 72",
]},
{"type": "table", "title": "Regional Performance",
"headers": ["Region", "Revenue", "Target", "Variance"],
"rows": [["North", "$2.1M", "$2.0M", "+5%"], ["South", "$1.8M", "$2.0M", "-10%"]]},
]
claude_output_to_slides(slide_data, "q1-report.pptx")
# Load existing branded template
prs = Presentation("company-template.pptx")
# Add slide using template's layouts
# Template layouts preserve branding (fonts, colors, logos)
slide = prs.slides.add_slide(prs.slide_layouts[1])
slide.shapes.title.text = "New Content Slide"
Save generated .pptx files to:
.claude/context/artifacts/ for agent-generated presentationsPt(), Inches(), or Emu()RGBColor — inconsistent on dark/light themestf.clear() before setting text on a reused placeholderslide_layouts[6] (blank) for content — placeholder positions will be missingxlsx — Excel spreadsheet generation (tabular data export)diagram-generator — Mermaid diagrams (for embedding architecture diagrams)markitdown-converter — Convert existing files to Markdown for Claude processingBefore starting: Read .claude/context/memory/learnings.md
After completing: Record any python-pptx version compatibility issues or slide layout gotchas.
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.
tools
Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.
tools
Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. Use when working with network/graph data structures, analyzing relationships between entities, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks, or visualizing network topologies. Applicable to social networks, biological networks, transportation systems, citation networks, and any domain involving pairwise relationships.
data-ai
Molecular featurization for ML (100+ featurizers). ECFP, MACCS, descriptors, pretrained models (ChemBERTa), convert SMILES to features, for QSAR and molecular ML.
development
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.