본문으로 건너뛰기
cccskills
무료GitHub에 공개

powerpoint

Create, inspect, and edit PowerPoint presentations with python-pptx. Build slides from a specification, extract text and chart data, update existing decks, or fill company templates, with optional tools for slide images and PDF export.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Create, read, edit .pptx decks with python-pptx.

연동 도구PowerPoint
설치 방법 보기

이럴 때 유용합니다

  • Creating report presentations or pitch decks
  • Extracting text, notes, and chart data from presentations
  • Updating logos, wording, or chart values
  • Building presentations from company templates

포함된 파일(8)

  • SKILL.md10.5 KB
  • LICENSE1.0 KB
  • scripts/pptx_create.py8.4 KB
  • scripts/pptx_edit.py16.8 KB
  • scripts/pptx_from_template.py3.4 KB
  • scripts/pptx_read.py4.6 KB
  • scripts/pptx_render.py3.5 KB
  • tests/test_powerpoint_skill.py19.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Powerpoint Skill

Create, inspect, and edit PowerPoint (.pptx) presentations using the python-pptx library. Five helper scripts cover deck creation from a JSON spec, structured read-back, in-place edits, template-driven brand decks, and slide rendering — all offline, no PowerPoint installation required.

When to Use

  • The user asks to build a slide deck, report presentation, or pitch deck.
  • You need to extract text, notes, tables, chart data, or images from a .pptx someone shared.
  • You need to update an existing deck: replace text, refresh or patch chart data, swap a logo, duplicate/remove/reorder slides, set backgrounds, footers, hyperlinks, or speaker notes.
  • You must produce an on-brand deck from a company .pptx template.
  • Do NOT use this for .ppt (legacy binary) files — convert them first with soffice --convert-to pptx old.ppt if LibreOffice is available.

Prerequisites

  • Python 3.10+ with python-pptx installed (pip install python-pptx).
  • Optional: LibreOffice (soffice) plus poppler (pdftoppm or pdftocairo) for rendering slides to PNGs and for PDF export. pptx_render.py detects both with shutil.which and degrades gracefully (reports {"rendered": false, "missing": [...]}, exit 0) when absent — all create/read/edit operations work without them.
  • Check availability via terminal: python -c "import pptx; print(pptx.__version__)" and which soffice pdftoppm.

How to Run

All scripts live in scripts/, take --help, print JSON to stdout, and exit non-zero on failure. Run them with terminal:

python scripts/pptx_create.py deck.json out.pptx
python scripts/pptx_read.py deck.pptx --outline      # full JSON outline
python scripts/pptx_read.py deck.pptx --notes        # speaker notes
python scripts/pptx_read.py deck.pptx --images ./img # export pictures
python scripts/pptx_edit.py deck.pptx --replace-text "Old Corp" "New Corp"
python scripts/pptx_edit.py deck.pptx --chart-data update.json
python scripts/pptx_edit.py deck.pptx --duplicate-slide 2
python scripts/pptx_edit.py deck.pptx --remove-slide 3 --move-slide 2 0
python scripts/pptx_from_template.py brand.pptx out.pptx --values vals.json
python scripts/pptx_render.py deck.pptx --outdir ./render  # slide PNGs

Author JSON specs with write_file; inspect script output and generated JSON with read_file.

Quick Reference

TaskCommand
New deck from specpptx_create.py spec.json out.pptx
16:9 vs 4:3"slide_size": "16:9" or "4:3" in the spec
Outline as JSONpptx_read.py deck.pptx --outline
Export imagespptx_read.py deck.pptx --images DIR
Replace textpptx_edit.py deck.pptx --replace-text OLD NEW
Replace chart datapptx_edit.py deck.pptx --chart-data spec.json
Patch one seriessame flag, spec with "ops" (see below)
Swap picturepptx_edit.py deck.pptx --swap-image N NAME new.png
Duplicate slidepptx_edit.py deck.pptx --duplicate-slide N
Remove slidepptx_edit.py deck.pptx --remove-slide N
Reorder slidepptx_edit.py deck.pptx --move-slide FROM TO
Slide backgroundpptx_edit.py deck.pptx --set-background N RRGGBB
Hyperlink runspptx_edit.py deck.pptx --hyperlink N TEXT URL
Slide number onpptx_edit.py deck.pptx --enable-slide-number N
Footer textpptx_edit.py deck.pptx --set-footer N TEXT
Set notespptx_edit.py deck.pptx --set-notes N TEXT
Append notespptx_edit.py deck.pptx --append-notes N TEXT
Fill templatepptx_from_template.py tpl.pptx out.pptx --values v.json
Render slide PNGspptx_render.py deck.pptx --outdir DIR

Procedure

1. Create a deck

Write a JSON spec (see pptx_create.py --help for the full format), then run pptx_create.py. Per slide you can set: layout (title, title_content, section, two_content, title_only, blank), title, subtitle, bullets (strings, or dicts with level 0-4, size pt, bold, italic, font, color hex, link URL for a hyperlink), background (solid hex), footer (text; enables the layout's footer placeholder), slide_number (true; enables the layout's slide-number placeholder), images (path + left/top/width/height in inches), tables (rows as list-of-lists), shapes (rectangle, rounded_rectangle, oval, diamond, right_arrow, chevron, with fill hex + optional text), charts (bar, bar_h, line, pie with categories + series), and notes (speaker notes).

2. Read a deck

pptx_read.py deck.pptx --outline returns slide size, layout inventory, and per slide: layout name, all shape texts, table cells, image inventory (filename/ext/bytes), chart categories/series/values, and speaker notes. Use --images DIR to dump embedded pictures to files, then vision_analyze on any exported image if you need to see its content.

3. Edit a deck

pptx_edit.py combines operations in one pass; use --output to keep the original. Text replacement scans slide shapes, table cells, and notes. Image swap retargets the picture's relationship id so position and size are preserved. Slide removal drops the relationship and the <p:sldId> entry; reorder moves the <p:sldId> element within <p:sldIdLst> (python-pptx has no public API for either — the script does the XML-level work). --duplicate-slide N appends an independent deep copy of slide N: shape XML plus image/media/hyperlink relationships are cloned and rIds remapped, so editing the copy never touches the original. Chart slides are refused (see Pitfalls). --set-notes/--append-notes edit speaker notes; --set-background, --hyperlink, --enable-slide-number, and --set-footer handle deck polish.

Chart updates take a JSON spec via --chart-data. Full replace: {"slide": 0, "chart": 0, "categories": [...], "series": {...}}. For surgical edits, pass "ops" instead — a list of {"op": "update_series", "name": ..., "values": [...]}, add_series, remove_series, rename_category (from/to or index), and set_title. python-pptx can only swap a chart's entire dataset (replace_data), so ops are implemented as read-existing → modify → replace; the per-part UX is a wrapper, and any chart data not expressible as categories + numeric series will be normalized by the round-trip.

4. Build from a template

pptx_from_template.py opens a brand .pptx, replaces every {{token}} from a values JSON across slides/tables/notes, and can append new slides that use the template's own layouts (by layout name or index) so they inherit the master's fonts and colors. Tip: to start from a template with zero slides, delete existing ones afterward with pptx_edit.py --remove-slide.

5. Visual verification

pptx_render.py deck.pptx --outdir ./render converts the deck to PDF with soffice --headless and splits it into one PNG per slide with pdftoppm (or pdftocairo). Output JSON lists the PNG paths — review each with vision_analyze. When either tool is missing the script exits 0 with {"rendered": false, "missing": [...]} and guidance; fall back to the JSON outline from pptx_read.py, which verifies content and structure, just not visuals.

Converting to PDF

If LibreOffice is installed, export the finished deck to PDF directly:

soffice --headless --convert-to pdf --outdir ./out deck.pptx

The output lands at ./out/deck.pdf. Fonts not installed on the host are substituted, so render-verify (Procedure step 5) before shipping the PDF. There is no offline pure-Python .pptx→PDF path; if soffice is absent, say so rather than approximating.

Pitfalls

  • Run splitting: PowerPoint fragments paragraph text into runs at spell-check and edit boundaries. --replace-text first merges adjacent runs whose formatting is identical, so matches split across such runs are replaced with formatting fully preserved. Only when a match spans genuinely differently-formatted runs is the paragraph rewritten with the first run's formatting — verify those slides after replacement.
  • Chart slides cannot be duplicated: each chart relationship embeds a separate XLSX workbook part; cloning that graph reliably is not supported, so --duplicate-slide refuses chart slides cleanly instead of corrupting the deck. Rebuild the chart on a new slide instead. External-hyperlink and image/media rels are carried over; layout and notes rels are recreated fresh.
  • Chart ops are a wrapper: python-pptx replaces the whole dataset; "ops" round-trips existing plot data through replace_data, and changing chart type is not possible.
  • Reordering is XML-level: python-pptx has no supported reorder API. --move-slide manipulates <p:sldIdLst> directly; safe for ordinary decks but re-read the deck afterward to confirm.
  • Copying slides between decks is unsupported — duplication works only within one deck, where layouts and masters are shared.
  • Footer/slide-number enablement copies the placeholder from the slide's layout; on layouts without those placeholders, --set-footer fails with a clear message (add a textbox instead).
  • Hyperlinks apply to whole runs; --hyperlink links every run containing the given text on that slide.
  • The default python-pptx template is 4:3; the create script sets 16:9 unless the spec says otherwise. Custom templates keep their own size.
  • Layout indexes vary by template. For brand templates, list layout names first: pptx_read.py template.pptx --outline (layouts_available).
  • slide.shapes.title is None on blank layouts — the create script handles this, but remember it when writing ad-hoc python-pptx code.
  • Always pass encoding="utf-8" when writing spec files; tokens like {{city}} may be filled with non-ASCII values.

Verification

  1. After any create/edit, run pptx_read.py OUT.pptx --outline and check slide count, texts, tables, notes, and chart values match intent.
  2. --images DIR then file-size check confirms pictures embedded.
  3. Render every slide with pptx_render.py deck.pptx --outdir ./render and review each PNG with vision_analyze — this catches overlapping shapes, truncated text, and color problems the outline cannot. If the render tools are missing, the script says so; rely on the outline.
  4. The bundled test suite is the full contract: python -m pytest tests/ -q (requires python-pptx + pytest).

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

1password

무료

Set up the 1Password CLI and use stored passwords or API keys in commands and configuration templates. Choose an authentication method, retrieve secret references, and pass credentials to processes through environment variables.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Installing and configuring the 1Password CLI
  • Running commands with stored API keys
  • Filling configuration templates with stored secrets
NousResearch/hermes-agent25.5만2026년 10월 18일 업데이트

Build an Excel workbook linking the income statement, balance sheet, and cash flow statement. Populate historical figures, create formula-based forecasts, compare scenarios, and check that balances and cash totals agree across all three statements.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Populating a financial model template with historical data
  • Building linked forecasts across three financial statements
  • Comparing base, upside, and downside scenarios
NousResearch/hermes-agent25.5만2026년 10월 18일 업데이트

Adapt existing PyTorch training scripts to use multiple GPUs or machines with limited code changes. The skill guides configuration, launch commands, mixed precision, which uses lower-precision numbers, and DeepSpeed or FSDP settings for distributing training work and memory.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Move a single-GPU training script to multiple GPUs
  • Configure mixed precision training
  • Set up DeepSpeed or FSDP to reduce memory use
NousResearch/hermes-agent25.5만2026년 10월 18일 업데이트

Configure Hermes to run AI models through Actual Computer on your own hardware. Set up either the hosted relay or a local connection, select models, verify responses, and troubleshoot request errors or empty output.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Connecting Hermes with an Actual inference key
  • Running models through a local Actual daemon
  • Downloading and loading local models
NousResearch/hermes-agent25.5만2026년 10월 18일 업데이트

Test an app from the perspective of a frustrated, less technical user. Find confusing steps and barriers, separate actionable usability problems from personal complaints, and produce screenshots, suggested fixes, and prioritized tickets.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing usability before a launch or demo
  • Checking the experience of a new user
  • Finding friction in signup and subscription flows
NousResearch/hermes-agent25.5만2026년 10월 18일 업데이트

Resolve Git merge conflicts between two agents by comparing both changes and their stated goals. Combine compatible work, explain choices where designs differ, and verify the merged result with project builds or tests.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Resolving conflicts between branches edited by two agents
  • Integrating changes from parallel worktrees
  • Reviewing reasons for conflicting design choices
NousResearch/hermes-agent25.5만2026년 10월 18일 업데이트

NousResearch의 스킬 모두 보기

이 스킬의 문제 신고