pptx
하는 일
이 스킬은 AI 에이전트가 개요에서 PowerPoint 슬라이드를 만들고 기존 덱을 바꾸는 방법을 알려 줍니다. 발표 자료를 만들거나 고치는 사람에게 맞습니다.
사용하는 경우
- ✓개요나 메모를 바탕으로 새 슬라이드 덱을 만들고 싶을 때.
- ✓기존 PowerPoint 파일에서 텍스트나 발표자 노트를 뽑아야 할 때.
- ✓이미 있는 덱의 이미지, 표, 차트를 바꾸고 싶을 때.
스킬 링크
https://github.com/HKUDS/DeepTutor/blob/main/deeptutor/skills/builtin/pptx/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 개요를 열 장짜리 PowerPoint 덱으로 만들어 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 PowerPoint 파일의 부분을 읽고 쓰는 Python 라이브러리를 사용합니다. 변경을 적용하고 완성된 덱을 돌려줍니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
pptx
Work with PowerPoint .pptx files using python-pptx (preinstalled). A .pptx
is a ZIP of XML parts; python-pptx handles the structure so you rarely touch XML.
Drop to raw OOXML only for the few things the library can't express (see Advanced).
Use exec with complete Python source (language: python). Keep asset creation,
deck generation, reopening, and structural verification in one call when
possible; later calls can revise the same relative filename. Follow the turn's
User workspace instructions for locating inputs, output boundaries, and
presenting the finished deck.
Mental model
- A presentation has slides; each slide is built from a layout; layouts
live on slide masters. Layouts define placeholders (title, body,
picture, etc.) by
idxand type. - A slide holds shapes: placeholders, text boxes, pictures, tables, charts.
- Shapes with text expose
.text_frame→.paragraphs→.runs. A run is the unit that carries formatting (font, size, bold, color). - Units are EMU. Use the helpers:
from pptx.util import Inches, Pt, Emu.
Read / extract
from pptx import Presentation
prs = Presentation("deck.pptx")
print(len(prs.slides), prs.slide_width, prs.slide_height) # EMU dims
for i, slide in enumerate(prs.slides, 1):
print(f"--- slide {i} (layout: {slide.slide_layout.name}) ---")
for shape in slide.shapes:
if shape.has_text_frame:
print(shape.text_frame.text) # \n-joined paragraphs
elif shape.has_table:
for row in shape.table.rows:
print([c.text for c in row.cells])
if slide.has_notes_slide:
notes = slide.notes_slide.notes_text_frame.text
if notes:
print("NOTES:", notes)
Iterate slide.placeholders to see placeholder idx / placeholder_format.type.
For a fast text-only dump, just collect shape.text_frame.text across slides.
Create from an outline
List the layouts first — indices vary by template. With the default template, layout 0 = Title, 1 = Title+Content, 5 = Title Only, 6 = Blank.
from pptx import Presentation
from pptx.util import Inches, Pt
prs = Presentation() # or Presentation("template.pptx") to inherit a theme
for idx, lay in enumerate(prs.slide_layouts):
print(idx, lay.name, [(p.placeholder_format.idx, p.name) for p in lay.placeholders])
# Title slide
s = prs.slides.add_slide(prs.slide_layouts[0])
s.shapes.title.text = "My Deck"
s.placeholders[1].text = "Subtitle" # idx from the listing above
# Title + bullets
s = prs.slides.add_slide(prs.slide_layouts[1])
s.shapes.title.text = "Agenda"
tf = s.placeholders[1].text_frame
tf.text = "First point" # first paragraph
for line, lvl in [("Second", 0), ("Sub-point", 1)]:
p = tf.add_paragraph()
p.text = line
p.level = lvl
prs.save("out.pptx")
Always set text via placeholders/shapes — never hand-write bullet glyphs (•);
indentation/bullets come from the layout via paragraph.level.
Add a free text box or picture on any slide:
tb = s.shapes.add_textbox(Inches(1), Inches(1), Inches(8), Inches(1))
r = tb.text_frame.paragraphs[0].add_run()
r.text = "Hi"
r.font.size = Pt(28)
r.font.bold = True
s.shapes.add_picture("logo.png", Inches(0.5), Inches(0.5), height=Inches(1)) # omit w to keep ratio
Edit existing
Edit at the run level to preserve a run's formatting; rewriting
text_frame.text collapses to one run and drops inline formatting.
for slide in prs.slides:
for shape in slide.shapes:
if not shape.has_text_frame:
continue
for para in shape.text_frame.paragraphs:
for run in para.runs:
if "{{NAME}}" in run.text:
run.text = run.text.replace("{{NAME}}", "Frank")
To delete a shape/placeholder: sp = shape._element; sp.getparent().remove(sp).
If the template has more slots than your data, remove the extra shapes entirely
rather than leaving empty placeholders.
Replace an image in place (keep size/position)
python-pptx has no direct setter; swap the bytes of the related image part. Read
the picture's r:embed rId off its <a:blip>, then overwrite the part's blob.
The replacement bytes must use the same image encoding as the original part
(for example PNG for PNG). A different encoding also requires a new correctly
typed media part and relationship; changing _blob alone would leave invalid
content-type metadata.
from pptx.oxml.n
자주 묻는 질문
덱을 PDF로 내보낼 수 있나요?
네. 스킬은 PDF나 이미지로 내보내기를 선택지 중 하나로 든다고 설명합니다.
기존 덱의 발표자 노트를 읽을 수 있나요?
네. 기존 덱에서 슬라이드 텍스트와 발표자 노트를 추출할 수 있습니다.
기존 덱의 디자인을 바꿀 수 있나요?
도형, 텍스트, 표, 차트는 편집할 수 있습니다. 더 큰 디자인 변경은 파일에 있는 레이아웃에 따라 달라집니다.
상세 정보
작성자의 원본 설명
Read, create, or edit PowerPoint .pptx decks — build slides from an outline, extract slide text/speaker notes, edit shapes/tables/charts, replace images, or export to PDF/images. Use whenever a .pptx (or .ppt) file is an input or output, or the user mentions a deck, slides, or a presentation.
repo: HKUDS/DeepTutor
인기도
- GitHub 스타
- 54k
- 순위
- #3370
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 31.
댓글
- …
이 저장소의 다른 스킬
deeptutor-cli
54k에이전트가 학습 플랫폼 DeepTutor를 명령줄에서 설정하고 실행하도록 돕습니다. 지식 베이스, 노트북, 웹 앱을 포함합니다.
docx
54k에이전트가 Word .docx 파일을 읽고, 만들고, 고치도록 돕습니다. 보고서, 표, 찾아 바꾸기, 댓글이 달린 변경 추적을 포함합니다.
에이전트가 PDF 파일을 읽고, 병합하고, 나누고, 양식을 채우고, 새로 만들도록 돕습니다. 텍스트와 표를 뽑아내는 작업도 포함합니다.
skill-creator
54k에이전트가 DeepTutor 스킬, 즉 특정 작업을 AI에 가르치는 짧은 지침 묶음을 쓰거나 개선하도록 돕습니다.
비슷한 스킬
feishu-doc
394k에이전트가 문서 도구를 사용해 텍스트, 이미지, 표를 포함한 Feishu 클라우드 문서를 읽고, 만들고, 편집하도록 돕습니다.
feishu-drive
394k에이전트가 봇과 공유된 Feishu 클라우드 폴더의 파일을 찾아보고, 정리하고, 댓글을 달도록 돕습니다.
feishu-perm
394k에이전트가 요청을 충족하는 가장 작은 권한을 골라, Feishu 파일에 누가 접근할 수 있는지 확인하고 바꾸도록 돕습니다.