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

ppt-reliable-creation

하는 일

이 스킬은 .pptx 슬라이드 덱을 만드는 두 경로(도우미 경로와 직접 Python 경로) 방법입니다. 슬라이드 파일을 안정적으로 얻어야 하는 사람에게 맞습니다.

사용하는 경우

  • ✓정해진 슬라이드 수와 내용이 있는 PowerPoint 발표 자료가 필요할 때.
  • ✓도우미가 덱을 만드는 중 실패하거나 불분명한 오류를 낼 수 있을 때.
  • ✓출력 파일이 예상치 못한 폴더에 생길 수 있는 경우.

스킬 링크

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

AI에게 요청하는 예시

“우리 프로젝트 계획에 관한 10장짜리 PowerPoint를 만들어 주세요. 도우미가 실패하면 Python으로 직접 만들고, 파일의 전체 경로를 알려 주세요.”

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

작동 방식

AI는 현재 폴더를 확인하고, 도우미에게 슬라이드 제작을 요청하고, 실패하면 python-pptx 스크립트를 직접 쓰고, .pptx 파일이 저장된 위치를 확인합니다.

기술 내용 (원본 SKILL.md)

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

Reliable PowerPoint Creation Workflow

When to Use This Skill

Use this workflow when:

  • You need to create PowerPoint presentations with specific slide content and structure
  • shell_agent may fail or produce opaque error messages
  • Output files may be created in unexpected nested directories
  • You need a reliable fallback when primary generation methods fail

Overview: Dual-Path Strategy

This skill provides two paths:

  1. Primary Path: shell_agent delegation (simpler, but may fail)
  2. Fallback Path: Direct Python execution with python-pptx (more reliable, more control)

Step 0: Pre-Check Working Directory

Before any generation, verify your current working directory:

# Check and record current directory
pwd
# Output should be saved for later reference

# List current contents to establish baseline
ls -la

Important: Save the pwd output. You'll need this to verify where files are created.

Step 1: Primary Path - shell_agent Generation

Attempt PowerPoint creation via shell_agent first (quickest if successful):

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

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 and tell me the full file path where you saved it.

shell_agent Error Handling

If shell_agent returns "unknown error" or fails:

# Capture actual error by adding stderr redirect
# Re-run the task or check previous error output
# Add 2>&1 to any shell commands to see real errors

After 2 failures or opaque errors, switch to Fallback Path (Step 2).

Step 2: Fallback Path - Direct Python with python-pptx

When shell_agent fails, use direct Python execution. Always write script to file first, then execute.

2a: Create the Python Script

Write a complete Python script using python-pptx:

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

# Create presentation
prs = Presentation()

# Slide 1: Title slide
slide_layout = prs.slide_layouts[0]
slide = prs.slides.add_slide(slide_layout)
title = slide.shapes.title
subtitle = slide.placeholders[1]
title.text = "Title Here"
subtitle.text = "Subtitle Here"

# Slide 2+: Content slides
for i in range(2, 11):
    slide_layout = prs.slide_layouts[1]
    slide = prs.slides.add_slide(slide_layout)
    title = slide.shapes.title
    title.text = f"Slide {i} Title"
    
    # Add content
    content = slide.placeholders[1]
    content.text = f"Content for slide {i}"

# Save to current working directory
prs.save('presentation.pptx')
print("File saved to:", os.path.abspath('presentation.pptx'))

Save this script as: create_presentation.py

2b: Execute with Error Capture

# Write script to file first, then execute with stderr capture
python create_presentation.py 2>&1 | tee execution_log.txt

# Check for success
if [ -f "presentation.pptx" ]; then
    echo "SUCCESS: File created in current directory"
    ls -la presentation.pptx
else
    echo "FAILED: Check execution_log.txt for errors"
    cat execution_log.txt
fi

2c: Verify Working Directory Match

# Confirm file is where expected
CURRENT_PWD=$(pwd)
FILE_PATH=$(realpath presentation.pptx 2>/dev/null)

if [[ "$FILE_PATH" == "$CURRENT_PWD"* ]]; then
    echo "✓ File is in expected directory"
else
    echo "⚠ File created elsewhere: $FILE_PATH"
    echo "Current directory: $CURRENT_PWD"
fi

Step 3: Locate the Output File

PowerPoint files may be created in nested directories. Always search before assuming location:

# Search for all .pptx files in workspace
find . -name "*.pptx" -type f 2>/dev/null

# Search for specific filename
find . -name "presentation.pptx" -type f 2>/dev/null

# If not found, broaden search
find . -name "*.pptx" -type f -mmin -5 2>/dev/null

Step 4: Copy to Working Directory

Once located, bring the file to your known working directory:

# Found path example: ./workspace/task_123/output/presentation.pptx
FOUND_PATH=$(find . -name "presentation.pptx" -type f | head -1)

if [ -n "$FOUND_PATH" ]; then
    cp "$FOUND_PATH" .
    echo "Copied from: $FOUND_PATH"
else
    echo "ERROR: File not found
자주 묻는 질문

첫 번째 경로는 무엇인가요?

도우미 에이전트가 명확한 설명으로 발표 자료를 만드는 것입니다.

예비 방법은 무엇인가요?

AI가 쓰고 실행하는 python-pptx Python 스크립트입니다.

현재 폴더를 왜 기록하나요?

파일이 중첩 폴더에 생길 수 있어서, 파일이 만들어진 위치를 확인하는 기준점이 되기 때문입니다.

상세 정보

작성자의 원본 설명

Robust PowerPoint generation with shell_agent primary and python-pptx fallback, including directory verification and error debugging

repo: HKUDS/AgentPilot

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬