Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问clear审计提醒

pptxPPTX 演示文稿处理

Agent Skill

pptx 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

306

周安装

13

GitHub Stars

9

下载量

107
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/autumnsgrove/claudeskills --skill pptx

简介

pptx 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于 PowerPoint 演示文稿的创建、编辑和自动化处理,支持文本、形状、图片、表格、图表等多种内容类型。
  • 通过 Python 的 python-pptx 库实现,提供完整的布局控制、主题应用和视觉格式化能力。
  • 安装命令为 npx skills add https://github.com/autumnsgrove/claudeskills --skill pptx,需确认权限范围和文件读写操作。
  • 建议结合原始 README 核验具体用法,注意维护状态及是否会触发联网或命令执行。

SKILL.md

PowerPoint (PPTX) Skill

Overview

This skill provides comprehensive PowerPoint presentation creation, editing, and automation capabilities using Python's python-pptx library. Create professional presentations programmatically with full control over layouts, themes, content, charts, and visualizations.

Core Capabilities

  • Presentation Creation: New presentations, templates, metadata, page configuration
  • Slide Management: Add, duplicate, delete, reorder slides with predefined layouts
  • Content Types: Text, shapes, images, tables, charts, SmartArt, hyperlinks
  • Design & Formatting: Themes, color schemes, fonts, fills, borders, effects
  • Advanced Features: Transitions, animations, embedded objects, video/audio, comments

Installation

Install the required library:

pip install python-pptx
# or with uv
uv pip install python-pptx

Basic imports:

from pptx import Presentation
from pptx.util import Inches, Pt, Cm
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.chart.data import CategoryChartData
from pptx.enum.chart import XL_CHART_TYPE

For complete library setup and supporting packages (Pillow, pandas, matplotlib), see references/library-setup.md.

Core Workflows

Workflow 1: Creating a Business Presentation

Goal: Create a professional presentation with title slide, content slides, and conclusion.

Steps:

  1. Initialize Presentation

- Create new presentation object - Set slide dimensions (standard 16:9 or 4:3) - Configure metadata (title, author, subject, keywords)

  1. Add Title Slide

- Use title slide layout (typically prs.slide_layouts[0]) - Set title and subtitle text - Apply formatting (font size, color, bold)

  1. Add Content Slides

- Use appropriate layouts (bullet, two-column, title-only, blank) - Populate placeholders or add text boxes - Format text with proper hierarchy

  1. Add Visual Elements

- Insert images with proper sizing and positioning - Add charts with formatted data - Create tables with cell styling

  1. Save Presentation

- Save to.pptx format - Verify file creation

Quick Example:

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

prs = Presentation()
prs.slide_width = Inches(10)
prs.slide_height = Inches(7.5)

# Title slide
slide = prs.slides.add_slide(prs.slide_layouts[0])
slide.shapes.title.text = "Q4 Business Review"
slide.placeholders[1].text = "Prepared by: Jane Doe\nDate: October 25, 2025"

prs.save('presentation.pptx')

See examples/business-presentation.md for complete implementation.

Workflow 2: Adding Charts

Goal: Create data visualizations with bar, line, and pie charts.

Steps:

  1. Prepare chart data using CategoryChartData
  2. Define categories and series
  3. Add chart to slide with positioning
  4. Format chart (legend, gridlines, labels)

Quick Example:

from pptx.chart.data import CategoryChartData
from pptx.enum.chart import XL_CHART_TYPE

chart_data = CategoryChartData()
chart_data.categories = ['Q1', 'Q2', 'Q3', 'Q4']
chart_data.add_series('2025', (9.5, 10.8, 11.2, 13.1))

chart = slide.shapes.add_chart(
    XL_CHART_TYPE.COLUMN_CLUSTERED,
    Inches(1), Inches(2), Inches(8), Inches(4.5),
    chart_data
).chart

See examples/chart-examples.md for all chart types.

Workflow 3: Working with Images

Goal: Add, position, and format images in presentations.

Steps:

  1. Add image with slide.shapes.add_picture()
  2. Specify position (left, top) and size (width, height)
  3. Calculate centered positioning if needed
  4. Optimize images before adding (use Pillow for preprocessing)

Quick Example:

# Add image with auto-scaled aspect ratio
pic = slide.shapes.add_picture('logo.png', Inches(1), Inches(1), height=Inches(2))

# Center image on slide
pic.left = int((prs.slide_width - pic.width) / 2)
pic.top = int((prs.slide_height - pic.height) / 2)

See examples/image-handling.md for advanced techniques.

Workflow 4: Creating Tables

Goal: Add structured data tables with formatting.

Steps:

  1. Define table dimensions (rows, cols)
  2. Add table with positioning
  3. Set column widths
  4. Populate headers with bold formatting and background color
  5. Fill data cells with proper alignment

Quick Example:

table = slide.shapes.add_table(4, 3, Inches(1.5), Inches(2), Inches(7), Inches(3)).table

# Header formatting
cell = table.cell(0, 0)
cell.text = "Product"
cell.text_frame.paragraphs[0].font.bold = True
cell.fill.solid()
cell.fill.fore_color.rgb = RGBColor(0, 51, 102)

See examples/table-examples.md for advanced formatting.

Workflow 5: Editing Existing Presentations

Goal: Modify existing PowerPoint files.

Steps:

  1. Open presentation with Presentation('file.pptx')
  2. Iterate through slides to find content
  3. Modify text, shapes, or add new elements
  4. Save with same or different filename

Quick Example:

prs = Presentation('existing.pptx')

# Find and update text
for slide in prs.slides:
    for shape in slide.shapes:
        if hasattr(shape, "text") and "Old Name" in shape.text:
            shape.text = shape.text.replace("Old Name", "New Name")

prs.save('updated.pptx')

See examples/editing-presentations.md for slide copying and advanced editing.

Workflow 6: Using Templates

Goal: Apply consistent branding with master slides and templates.

Steps:

  1. Start with template file: Presentation('template.pptx')
  2. Examine available layouts
  3. Add slides using template layouts
  4. Apply brand colors consistently

Quick Example:

prs = Presentation('corporate_template.pptx')

# Use template layouts
title_slide = prs.slides.add_slide(prs.slide_layouts[0])
content_slide = prs.slides.add_slide(prs.slide_layouts[1])

# Layouts inherit master formatting
prs.save('branded_presentation.pptx')

See references/templates-and-themes.md for master slide customization.

Workflow 7: Bulk Slide Generation

Goal: Generate multiple slides automatically from data.

Steps:

  1. Load data from CSV, JSON, or database
  2. Create presentation object
  3. Iterate through data records
  4. Generate one slide per record
  5. Populate slide with record data

Quick Example:

import pandas as pd

df = pd.read_csv('employee_data.csv')
prs = Presentation()

for _, row in df.iterrows():
    slide = prs.slides.add_slide(prs.slide_layouts[1])
    slide.shapes.title.text = row['Name']
    # Add employee details to slide body

prs.save('employee_directory.pptx')

See examples/bulk-generation.md for complete implementations.

Design Principles

Color & Typography

  • Use 60-30-10 color rule (60% primary, 30% secondary, 10% accent)
  • Ensure WCAG AA contrast ratios (4.5:1 minimum)
  • Limit to 2 font families maximum
  • Minimum body text: 18pt for readability

Layout & Composition

  • Follow rule of thirds for element placement
  • Maintain minimum 0.5" margins on all sides
  • Limit to 5-7 elements per slide
  • Use consistent alignment (snap to grid)

Visual Hierarchy

  • Size indicates importance (larger = more important)
  • Use color contrast for emphasis
  • Follow Z-pattern for content flow

Chart Best Practices

  • Choose appropriate chart type (bar for comparison, line for trends, pie for parts-of-whole)
  • Limit to 3-5 colors maximum
  • Always label axes and include data labels
  • Use gridlines sparingly

For complete design guidelines, see references/design-best-practices.md.

Common Patterns

Brand Color Application

BRAND_COLORS = {
    'primary': RGBColor(0, 51, 102),
    'secondary': RGBColor(0, 153, 204),
    'accent': RGBColor(255, 102, 0)
}

# Apply to text
shape.text_frame.paragraphs[0].font.color.rgb = BRAND_COLORS['primary']

# Apply to fill
shape.fill.solid()
shape.fill.fore_color.rgb = BRAND_COLORS['secondary']

Centered Element

def center_shape(shape, prs):
    """Center shape on slide."""
    shape.left = int((prs.slide_width - shape.width) / 2)
    shape.top = int((prs.slide_height - shape.height) / 2)

Text Auto-Fit

from pptx.enum.text import MSO_AUTO_SIZE

text_frame = shape.text_frame
text_frame.auto_size = MSO_AUTO_SIZE.TEXT_TO_FIT_SHAPE  # Shrink text
# or
text_frame.auto_size = MSO_AUTO_SIZE.SHAPE_TO_FIT_TEXT  # Expand shape

Troubleshooting Quick Reference

"ModuleNotFoundError: No module named 'pptx'"

pip install python-pptx

"AttributeError: 'NoneType' object has no attribute..."

  • Check placeholder indices: [p.placeholder_format.idx for p in slide.placeholders]
  • Verify layout has expected placeholders

Images not found

  • Use absolute paths: os.path.abspath('image.png')
  • Verify file exists: os.path.exists(img_path)

Text doesn't fit

  • Enable auto-fit: text_frame.auto_size = MSO_AUTO_SIZE.TEXT_TO_FIT_SHAPE
  • Truncate long text with ellipsis

File size too large

  • Compress images before adding (use Pillow)
  • Resize images to presentation dimensions (1920x1080 max)

For complete troubleshooting, see references/troubleshooting.md.

Helper Scripts

The scripts/pptx_helper.py module provides utility functions:

  • create_presentation(): Initialize with defaults
  • add_title_slide(): Add formatted title slide
  • add_bullet_slide(): Add slide with bullet points
  • add_image_slide(): Add slide with centered image
  • add_chart_slide(): Add slide with chart
  • add_table_slide(): Add formatted table
  • apply_brand_colors(): Apply consistent color scheme
  • optimize_images(): Batch optimize images

Usage:

from scripts.pptx_helper import create_presentation, add_title_slide, add_chart_slide

prs = create_presentation(title="My Presentation")
add_title_slide(prs, "Main Title", "Subtitle")
add_chart_slide(prs, "Sales Data", chart_type='bar',
                categories=['Q1', 'Q2', 'Q3', 'Q4'],
                values=[10, 20, 15, 25])
prs.save('output.pptx')

Additional Resources

Documentation

Detailed References

Examples

Design Resources

Best Practices Summary

  1. Always use templates for consistent branding
  2. Optimize images before adding to presentation
  3. Limit text on each slide (5-7 bullet points max)
  4. Use high contrast for readability
  5. Test on target device before presenting
  6. Keep file size manageable (<20MB for email)
  7. Use speaker notes for detailed talking points
  8. Follow 6x6 rule: Max 6 bullets, max 6 words per bullet
  9. Validate data before creating charts
  10. Use consistent spacing and alignment

When to Use This Skill:

  • Creating business presentations from data
  • Automating report generation
  • Bulk slide creation from databases
  • Template-based presentations
  • Educational content with charts/images
  • Converting documents to slides

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

windsurf

26.7%
按下载量换算29

OpenCode

23.89%
按下载量换算26

Codex

17.17%
按下载量换算18

Claude Code

12.93%
按下载量换算14

Antigravity

8.27%
按下载量换算9

Gemini CLI

3.92%
按下载量换算4

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

只读

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills