본문으로 건너뛰기
Skillpedia
PDF, Word, 슬라이드7.8k · #12945

ppt-generation-resilient

하는 일

이 스킬은 도우미 경로를 먼저 쓰는 PowerPoint 발표 자료 제작의 두 경로를 설명합니다. 슬라이드 덱이 필요하고 첫 경로가 실패할 때 예비가 필요한 사람에게 맞습니다.

사용하는 경우

  • ✓PowerPoint 발표 자료를 프로그램으로 만들어야 할 때.
  • ✓도우미가 실패하거나 불분명한 오류를 낼 수 있는 경우.
  • ✓발표 자료가 Python으로 직접 제어할 만큼 복잡할 때.

스킬 링크

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/ppt-workflow-location-enhanced/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/ppt-workflow-location-enhanced/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리 제품 로드맵에 관한 발표 자료를 만들어 주세요. 각 슬라이드에 제목과 글머리 기호를 넣어 주세요. 도우미가 실패하면 Python으로 직접 해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 명확한 사양으로 도우미에게 덱 제작을 요청하고, 전체 파일 경로를 요구하며, 결과가 만족스럽지 않으면 python-pptx 직접 코드를 씁니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Resilient PowerPoint Generation Workflow

When to Use This Skill

Use this workflow when:

  • You need to create PowerPoint presentations programmatically
  • shell_agent may fail or produce opaque error messages
  • You need robust error handling and debugging capabilities
  • Output files may be created in unexpected nested directories

Overview

This workflow provides two paths:

  1. Primary: Use shell_agent with clear specifications (preferred for simple presentations)
  2. Fallback: Direct Python execution with python-pptx library (for complex or failed shell_agent attempts)

Both paths include automatic error capture and file location verification.


Path 1: shell_agent (Primary)

Step 1.1: Delegate with Clear Specifications

Use shell_agent to create a PowerPoint presentation with:
- Specify exact number of slides needed
- Define content/topic for each slide
- Request file saved with clear filename (e.g., presentation.pptx)
- Ask agent to confirm the full file path after creation
- Request agent report any errors with full output

Example task description:

Create a PowerPoint presentation with 10 slides covering [topic]. Each slide should have a title and bullet points. Save it as presentation.pptx in the current working directory and report the full file path. If you encounter any errors, show the complete error message.

Step 1.2: Verify shell_agent Success

Check if shell_agent completed successfully:

  • Did it report a file path?
  • Can you access the file at that path?
  • Is the file size > 0 bytes?

If any check fails, proceed to Path 2 (Fallback).


Path 2: Direct Python with python-pptx (Fallback)

Step 2.1: Create Python Script File

First, write the PowerPoint generation script to a .py file (do NOT use inline execution):

# save as: generate_presentation.py
from pptx import Presentation
from pptx.util import Inches, Pt
import os

# CRITICAL: Explicitly set and verify working directory
working_dir = os.getcwd()
print(f"Working directory: {working_dir}")

# Create presentation
prs = Presentation()

# Example: Add slides with content
slides_content = [
    {"title": "Slide 1 Title", "content": ["Bullet 1", "Bullet 2"]},
    {"title": "Slide 2 Title", "content": ["Point A", "Point B", "Point C"]},
    # Add more slides as needed
]

for slide_data in slides_content:
    slide_layout = prs.slide_layouts[1]  # Title and Content layout
    slide = prs.slides.add_slide(slide_layout)
    
    # Set title
    title = slide.shapes.title
    title.text = slide_data["title"]
    
    # Set content
    content = slide.placeholders[1]
    tf = content.text_frame
    tf.clear()  # Clear existing content
    
    for i, point in enumerate(slide_data["content"]):
        if i == 0:
            p = tf.paragraphs[0]
        else:
            p = tf.add_paragraph()
        p.text = point
        p.font.size = Pt(18)

# Save to current working directory with explicit path
output_filename = "presentation.pptx"
output_path = os.path.join(working_dir, output_filename)
prs.save(output_path)

print(f"Presentation saved to: {output_path}")
print(f"File exists: {os.path.exists(output_path)}")
print(f"File size: {os.path.getsize(output_path)} bytes")

Step 2.2: Execute with Error Output Capture

CRITICAL: Always redirect stderr to stdout to capture actual error messages:

# Execute the script with full error output
python generate_presentation.py 2>&1

# Or if using run_shell tool, ensure 2>&1 is included

Why this matters: Without 2>&1, Python exceptions are sent to stderr and you only see "unknown error" instead of the actual exception message.

Step 2.3: Debug Common Issues

If execution fails, add these debugging commands:

# Check if python-pptx is installed
python -c "import pptx; print(pptx.__version__)" 2>&1

# Check working directory
pwd
ls -la

# Check Python version
python --version

# Run with verbose error output
python -u generate_presentation.py 2>&1 | tee execution_log.txt

Step 3: Locate the Output File (Both Paths)

PowerPoint files may be in nested workspace directories. Always verify location:

# Find all .pptx files in workspace
find . -name "*.pptx" -type f 2>&1

# Or search for specific filename
find . -name "presentation.pptx" -type f 2>&1

# If not found locally, search broader (last resort)
find /workspace -name "*.pptx" -type f 2>/dev/null

Step 4: Copy to Working Direct

자주 묻는 질문

어떤 덱이 도우미 경로에 맞나요?

가이드는 기본 슬라이드가 있는 간단한 발표 자료에 도우미 경로를 추천합니다.

직접 Python은 언제 더 좋나요?

가이드는 복잡한 덱이거나 도우미가 실패한 뒤에 직접 Python을 추천합니다.

도우미는 무엇을 보고해야 하나요?

전체 파일 경로와, 완전한 출력이 포함된 오류 메시지입니다.

상세 정보

작성자의 원본 설명

Resilient PowerPoint generation with shell_agent primary path and python-pptx fallback

repo: HKUDS/AgentPilot

인기도

GitHub 스타
7.8k
순위
#12945
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬