Token导航 LogoToken导航TokenDH.com
前端设计只读github未标认证来源可访问clear审计通过

pptxPPTX 演示文稿处理

Agent Skill

pptx 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

474

周安装

19

GitHub Stars

8

下载量

154
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:pptx(PPTX 演示文稿处理)
来源仓库:https://github.com/vamseeachanta/workspace-hub
仓库路径:skills/pptx
安装命令:
npx skills add https://github.com/vamseeachanta/workspace-hub --skill pptx
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/vamseeachanta/workspace-hub --skill pptx

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合围绕仓库状态、代码变更或协作事项进行整理。

  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 安装命令:npx skills add https://github.com/vamseeachanta/workspace-hub --skill pptx
  • 适用于 Codex、Claude、Cursor、Gemini CLI 等宿主环境。

SKILL.md

PPTX Processing Skill

Overview

This skill provides three primary workflows for PowerPoint manipulation: creating from scratch, editing existing presentations, and using templates.

Quick Start

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

prs = Presentation()

# Add title slide
title_slide = prs.slides.add_slide(prs.slide_layouts[0])
title_slide.shapes.title.text = "My Presentation"
title_slide.placeholders[1].text = "By Claude"

prs.save("presentation.pptx")

When to Use

  • Creating automated presentation reports
  • Building slide decks from data
  • Generating pitch presentations
  • Converting HTML content to slides
  • Adding charts and tables to presentations
  • Batch processing multiple presentations
  • Updating existing presentations programmatically
  • Creating consistent branded presentations from templates

Creating New Presentations

Basic Creation with python-pptx

from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.enum.text import PP_ALIGN

prs = Presentation()

# Add title slide
title_slide_layout = prs.slide_layouts[0]
slide = prs.slides.add_slide(title_slide_layout)
title = slide.shapes.title
subtitle = slide.placeholders[1]

title.text = "Presentation Title"
subtitle.text = "Subtitle or Author"

# Add content slide
bullet_slide_layout = prs.slide_layouts[1]
slide = prs.slides.add_slide(bullet_slide_layout)
shapes = slide.shapes

title_shape = shapes.title
body_shape = shapes.placeholders[1]

title_shape.text = "Slide Title"
tf = body_shape.text_frame
tf.text = "First bullet point"

p = tf.add_paragraph()
p.text = "Second bullet point"
p.level = 0

p = tf.add_paragraph()
p.text = "Sub-bullet"
p.level = 1

prs.save("presentation.pptx")

Add Images

from pptx import Presentation
from pptx.util import Inches

prs = Presentation()
blank_slide_layout = prs.slide_layouts[6]
slide = prs.slides.add_slide(blank_slide_layout)

left = Inches(1)
top = Inches(1)
width = Inches(5)

slide.shapes.add_picture("image.png", left, top, width=width)

prs.save("with_image.pptx")

Add Charts

from pptx import Presentation
from pptx.chart.data import CategoryChartData
from pptx.enum.chart import XL_CHART_TYPE
from pptx.util import Inches

prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[6])

chart_data = CategoryChartData()
chart_data.categories = ['Q1', 'Q2', 'Q3', 'Q4']
chart_data.add_series('Sales', (19.2, 21.4, 16.7, 28.0))
chart_data.add_series('Expenses', (14.2, 18.3, 15.4, 20.1))

x, y, cx, cy = Inches(2), Inches(2), Inches(6), Inches(4.5)
slide.shapes.add_chart(
    XL_CHART_TYPE.COLUMN_CLUSTERED, x, y, cx, cy, chart_data
)

prs.save("with_chart.pptx")

Add Tables

from pptx import Presentation
from pptx.util import Inches

prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[6])

rows, cols = 3, 4
left = Inches(1)
top = Inches(2)
width = Inches(6)
height = Inches(2)

table = slide.shapes.add_table(rows, cols, left, top, width, height).table

# Set column widths
for col_idx in range(cols):
    table.columns[col_idx].width = Inches(1.5)

# Fill cells
for row_idx, row in enumerate(table.rows):
    for col_idx, cell in enumerate(row.cells):
        cell.text = f"R{row_idx+1}C{col_idx+1}"

prs.save("with_table.pptx")

Design Principles

Before Writing Code

State your content-informed design approach:

  1. What is the purpose and tone?
  2. Select colors that genuinely match the topic
  3. Plan visual hierarchy and layout
  4. Consider typography choices

Professional Styling

from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN

prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[6])

# Add styled text box
left = Inches(1)
top = Inches(1)
width = Inches(8)
height = Inches(1)

txBox = slide.shapes.add_textbox(left, top, width, height)
tf = txBox.text_frame

p = tf.paragraphs[0]
p.text = "Styled Heading"
p.font.size = Pt(44)
p.font.bold = True
p.font.color.rgb = RGBColor(0x2E, 0x74, 0xB5)
p.alignment = PP_ALIGN.CENTER

prs.save("styled.pptx")

Editing Existing Presentations

Read and Modify

from pptx import Presentation

prs = Presentation("existing.pptx")

for slide in prs.slides:
    for shape in slide.shapes:
        if shape.has_text_frame:
            for paragraph in shape.text_frame.paragraphs:
                for run in paragraph.runs:
                    if "old text" in run.text:
                        run.text = run.text.replace("old text", "new text")

prs.save("modified.pptx")

Extract Text

from pptx import Presentation

prs = Presentation("presentation.pptx")

for slide_num, slide in enumerate(prs.slides, 1):
    print(f"\n--- Slide {slide_num} ---")
    for shape in slide.shapes:
        if shape.has_text_frame:
            for paragraph in shape.text_frame.paragraphs:
                print(paragraph.text)

Copy Slides

from pptx import Presentation
from copy import deepcopy

prs = Presentation("source.pptx")
# Note: python-pptx doesn't directly support slide copying
# Use slide layouts from the same presentation instead

Using Templates

Apply Template

from pptx import Presentation

# Open template
prs = Presentation("template.pptx")

# Add slides using template layouts
slide_layout = prs.slide_layouts[1]  # Use template's layout
slide = prs.slides.add_slide(slide_layout)

# Fill placeholders
for shape in slide.placeholders:
    print(f"{shape.placeholder_format.idx}: {shape.name}")

prs.save("from_template.pptx")

OOXML Editing (Advanced)

For complex modifications, work directly with XML:

Unpack Presentation

unzip presentation.pptx -d presentation_extracted/

Edit XML

Navigate to ppt/slides/ and edit slide1.xml, etc.

Repack

cd presentation_extracted
zip -r ../modified.pptx .

Execution Checklist

  • Define presentation purpose and audience
  • Plan slide structure before coding
  • Use consistent styling throughout
  • Verify all images exist and are accessible
  • Test output in PowerPoint/LibreOffice
  • Check chart data accuracy
  • Validate table formatting

Error Handling

Common Errors

Error: KeyError on placeholder

  • Cause: Placeholder index doesn't exist in layout
  • Solution: List placeholders first with slide.placeholders

Error: Image not found

  • Cause: Image path is incorrect
  • Solution: Use absolute paths or verify relative path

Error: Font not available

  • Cause: System font missing
  • Solution: Use common fonts or embed fonts

Error: PackageNotFoundError

  • Cause: Template file not found or corrupt
  • Solution: Verify template path and file integrity

Metrics

MetricTypical Value
Slide creation~50 slides/second
Chart generation~10 charts/second
Table creation~20 tables/second
Image insertion~30 images/second
Memory usage~20MB per presentation

Quick Reference

TaskMethod
Create presentationPresentation()
Add slideslides.add_slide(layout)
Add textadd_textbox()
Add imageadd_picture()
Add chartadd_chart()
Add tableadd_table()
Style textfont.size, font.bold, font.color

Dependencies

pip install python-pptx

Optional tools:

  • LibreOffice (for PDF conversion)
  • Pandoc (for format conversion)

Version History

  • 1.1.0 (2026-01-02): Added Quick Start, When to Use, Execution Checklist, Error Handling, Metrics sections; updated frontmatter with version, category, related_skills
  • 1.0.0 (2024-10-15): Initial release with python-pptx, templates, OOXML editing

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

30.91%
按下载量换算48

windsurf

25.13%
按下载量换算39

trae

19.99%
按下载量换算31

OpenCode

11.64%
按下载量换算18

Cursor

7.38%
按下载量换算11

Codex

3.78%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills