AgentSkillsCN

powerpoint-presentations

通过 Bedrock Code Interpreter 使用 python-pptx 创建、修改与管理 PowerPoint 演示文稿。

SKILL.md
--- frontmatter
name: powerpoint-presentations
description: Create, modify, and manage PowerPoint presentations with python-pptx via Bedrock Code Interpreter.

PowerPoint Presentations

Quick Reference

TaskHow
Create newget_slide_code_examplescreate_presentation
Edit existinganalyze_presentationupdate_slide_content. Read editing-guide.md for details.
Verifypreview_presentation_slides after every change

Design Ideas

Don't create boring slides. Plain bullets on a white background won't impress anyone.

Before Starting

  • Pick a bold, content-informed color palette: The palette should feel designed for THIS topic.
  • Dominance over equality: One color dominates (60-70% visual weight), with 1-2 supporting tones and one sharp accent. Never give all colors equal weight.
  • Dark/light contrast: Dark backgrounds for title + conclusion slides, lighter tints for content slides. Or commit to dark throughout for a premium feel.
  • Commit to a visual motif: Pick ONE distinctive element and repeat it — rounded image frames, icons in colored circles, thick single-side borders.

Color Palettes

Choose colors that match your topic — don't default to generic blue.

ThemePrimaryAccentText
Midnight Executive1E2761 (navy)408EC6 (blue)FFFFFF
Teal Trust0A1A2A (charcoal)028090 (teal)FFFFFF
Forest & Moss2C5F2D (forest)97BC62 (moss)FFFFFF
Berry & CreamECE2D0 (cream)6D2E46 (berry)333333
Coral Energy1A1A2E (midnight)FF6F61 (coral)FFFFFF
Ocean Gradient065A82 (ocean)1B9AAA (aqua)FFFFFF
Charcoal Minimal1C1C1E (near-black)E8E8E8 (gray)FFFFFF
Cherry Bold150E11 (burgundy)990011 (cherry)FFFFFF
Sage Calm2D3A2D (sage)8FB96A (green)FFFFFF

For Each Slide

Every slide needs a visual element — image, chart, icon, or shape. Text-only slides are forgettable.

Layout options: two-column, icon + text rows, 2x2 grid, half-bleed image with overlay, large stat callouts (48-120pt), timeline/process flow.

Typography

ElementSizeFont
Slide title36-44pt boldGeorgia or Arial Black
Body text14-16ptCalibri
Stats/numbers48-120pt bold

Font pairings: Georgia + Calibri (classic), Arial Black + Arial (modern), Calibri Bold + Calibri Light (corporate). Left-align body text; center only titles and stats.

Spacing

  • 0.5″+ margins from edges. 0.3-0.5″ between elements. 0.5″+ below titles.

Avoid (Common Mistakes)

  • Plain bullets on white background
  • Default PowerPoint blue (#4472C4)
  • Accent lines directly under titles
  • Text-only slides without visual elements
  • More than 4 bullet points per slide
  • Repeating the same layout on every slide

See design-guide.md for visual element code patterns (accent bars, icon circles, side stripes) and detailed anti-pattern explanations.

Workflow

  1. Create: Call get_slide_code_examples first (use "design_reference" for palettes and font pairings) → then create_presentation with slides parameter.
  2. Edit: Read editing-guide.md for detailed editing workflows. Then: analyze_presentation → identify element IDs → update_slide_content.
  3. Verify: Call preview_presentation_slides after any modification. Assume there are problems — inspect carefully.

Rules

  • Batch all edits in ONE update_slide_content call. Parallel calls cause data loss.
  • output_name must differ from presentation_name.
  • All slide indices are 0-based EXCEPT preview_presentation_slides which uses 1-based slide_numbers.
  • Filenames: letters, numbers, hyphens only.

Tool Reference

get_slide_code_examples

Get python-pptx code examples as reference for creating slides.

ParameterTypeRequiredDescription
categorystrNo (default "text_layout")"text_layout", "number_highlight", "grid_layout", "image_text", "visual_emphasis", "design_reference", "all"

create_presentation

Create a new presentation with custom-designed slides (16:9 widescreen).

ParameterTypeRequiredDescription
presentation_namestrYesFilename without extension (letters, numbers, hyphens only)
slideslist or nullYesList of {"custom_code": "..."} dicts, or null for blank
template_namestrNoTemplate filename to use as base

Example tool_input:

json
{
  "presentation_name": "my-deck",
  "slides": [
    {"custom_code": "from pptx.util import Inches, Pt\nfrom pptx.dml.color import RGBColor\nfrom pptx.enum.text import PP_ALIGN\ntitle = slide.shapes.add_textbox(Inches(1), Inches(1), Inches(8), Inches(1.5))\ntf = title.text_frame\np = tf.paragraphs[0]\np.text = 'Welcome'\np.font.size = Pt(44)\np.font.bold = True\np.font.color.rgb = RGBColor(0xFF, 0xFF, 0xFF)\nslide.background.fill.solid()\nslide.background.fill.fore_color.rgb = RGBColor(0x1E, 0x27, 0x61)"}
  ]
}

IMPORTANT: The slides parameter takes a list of {"custom_code": "..."} dicts. Available in custom_code: prs, slide, slide_width, slide_height, Inches, Pt, RGBColor, PP_ALIGN, MSO_SHAPE.

analyze_presentation

Analyze structure with element IDs and positions for editing.

ParameterTypeRequiredDescription
presentation_namestrYesPresentation to analyze
slide_indexintNoAnalyze a specific slide only
include_notesboolNo (default false)Include speaker notes

update_slide_content

Update one or more slides with operations in a single call.

ParameterTypeRequiredDescription
presentation_namestrYesSource file
slide_updateslistYesList of update operations
output_namestrYesOutput filename (MUST differ from source)

add_slide

Add a new slide at a specific position.

ParameterTypeRequiredDescription
presentation_namestrYesSource presentation
layout_namestrYesLayout name from get_presentation_layouts
positionintYes0-based index
output_namestrYesOutput filename
custom_codestrNoPython-pptx code to customize the slide

delete_slides

Delete slides by indices.

ParameterTypeRequired
presentation_namestrYes
slide_indiceslist[int]Yes (0-based)
output_namestrYes

move_slide

Move a slide from one position to another.

ParameterTypeRequired
presentation_namestrYes
from_indexintYes (0-based)
to_indexintYes (0-based)
output_namestrYes

duplicate_slide

Duplicate a slide to a specified position.

ParameterTypeRequired
presentation_namestrYes
slide_indexintYes (0-based)
positionintYes (0-based)
output_namestrYes

update_slide_notes

Update speaker notes for a specific slide.

ParameterTypeRequired
presentation_namestrYes
slide_indexintYes (0-based)
notes_textstrYes
output_namestrYes

list_my_powerpoint_presentations

List all presentations in workspace. No parameters needed.

get_presentation_layouts

Get available slide layouts from a presentation.

ParameterTypeRequired
presentation_namestrYes

preview_presentation_slides

Get slide screenshots for visual inspection.

ParameterTypeRequiredDescription
presentation_namestrYesPresentation to preview
slide_numberslist[int]Yes1-based slide numbers (not 0-based)