home / skills / ntaksh42 / agents / pptx-generator

pptx-generator skill

/.claude/skills/pptx-generator

This skill helps you generate PowerPoint presentations with slides, charts, and templates programmatically using Python and pptx.

npx playbooks add skill ntaksh42/agents --skill pptx-generator

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.4 KB
---
name: pptx-generator
description: Generate PowerPoint presentations with slides, charts, and formatting. Use when creating presentations programmatically.
---

# PowerPoint Generator Skill

PowerPointプレゼンテーション(.pptx)を生成するスキルです。

## 主な機能

- **スライド作成**: タイトル、コンテンツ
- **グラフ**: 棒、折れ線、円グラフ
- **画像**: 画像挿入
- **テーブル**: 表作成
- **テンプレート**: デザインテンプレート

## Python (python-pptx)

```python
from pptx import Presentation
from pptx.util import Inches, Pt

prs = Presentation()

# タイトルスライド
title_slide = prs.slides.add_slide(prs.slide_layouts[0])
title = title_slide.shapes.title
subtitle = title_slide.placeholders[1]
title.text = "プレゼンテーションタイトル"
subtitle.text = "サブタイトル"

# コンテンツスライド
content_slide = prs.slides.add_slide(prs.slide_layouts[1])
title = content_slide.shapes.title
title.text = "主なポイント"

content = content_slide.placeholders[1]
tf = content.text_frame
tf.text = "ポイント1"

p = tf.add_paragraph()
p.text = "ポイント2"
p.level = 1

# 画像スライド
img_slide = prs.slides.add_slide(prs.slide_layouts[6])
left = Inches(1)
top = Inches(1)
img_slide.shapes.add_picture('chart.png', left, top, width=Inches(8))

prs.save('presentation.pptx')
```

## バージョン情報
- Version: 1.0.0

Overview

This skill generates PowerPoint (.pptx) presentations programmatically, including slides, charts, images, tables, and design templates. It streamlines building consistent slide decks from code, suitable for reports, dashboards, and automated exports. Versioned tooling provides a predictable, reusable workflow for presentation generation.

How this skill works

The skill constructs Presentation objects, adds slide layouts (title, content, blank), and populates placeholders with text, paragraphs, and hierarchical bullet levels. It creates common chart types (bar, line, pie), inserts images at specified positions and sizes, and builds tables with rows and columns. Templates and formatting options let you apply consistent styles and export a final .pptx file for distribution.

When to use it

  • Automating report or dashboard exports on a schedule
  • Generating slide decks from data pipelines or APIs
  • Batch-creating customized presentations for clients or teams
  • Programmatic creation of charts and tables for reproducible slides
  • Embedding images or charts produced by other tools into slides

Best practices

  • Design a base template with master slides to enforce branding and reduce per-slide formatting
  • Build slides from structured data models to keep content predictable and testable
  • Generate charts as image assets when advanced styling is needed, then insert images for consistency
  • Limit complex layout edits at runtime; prefer placeholder-based content insertion
  • Save and validate .pptx output in a CI step to catch formatting regressions early

Example use cases

  • Create a weekly KPI presentation by pulling metrics, generating charts, and exporting a deck automatically
  • Produce client proposals with templated title and content slides populated from a CRM
  • Convert notebook analysis outputs into a slide deck with images of plots and summary tables
  • Batch-generate individualized training materials by merging user data into template slides
  • Assemble investor update slides with programmatically generated financial charts

FAQ

Which chart types are supported?

Common chart types are supported, including bar, line, and pie charts; you can also insert externally generated chart images.

Can I apply a corporate template or master slide?

Yes. Use a base template with master slides and apply it when creating the Presentation to keep branding and layout consistent.