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

pptx-validation-fallback

하는 일

이 스킬은 .pptx 파일을 python-pptx로 확인하는 예비 방법입니다. 파일 리더가 다루지 못하는 덱의 슬라이드 수와 제목을 확인해야 하는 사람에게 맞습니다.

사용하는 경우

  • ✓PowerPoint 파일에서 read_file이 실패하거나 정보를 불완전하게 줄 때.
  • ✓발표 자료에 예상한 수의 슬라이드가 있는지 확인해야 할 때.
  • ✓검토를 위해 슬라이드 제목 목록이 필요한 경우.

스킬 링크

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

AI에게 요청하는 예시

“제 발표 자료에 슬라이드가 열 장 있는지 확인하고 각 슬라이드의 제목을 나열해 주세요. 일반 파일 리더는 이 파일에서 작동하지 않습니다.”

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

작동 방식

AI는 셸에서 python-pptx 스크립트를 실행해 덱을 불러오고, 슬라이드 수와 각 제목을 출력한 뒤, 예상한 수와 비교합니다.

기술 내용 (원본 SKILL.md)

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

PowerPoint Validation Fallback

When to Use

Use this skill when read_file fails to properly read or validate PowerPoint (.pptx) files. This provides a reliable alternative for verifying presentation contents including slide count, titles, and structure.

Procedure

Step 1: Check if read_file Failed

If read_file with filetype pptx returns errors, incomplete content, or cannot extract slide information, proceed to the fallback method.

Step 2: Use run_shell with python-pptx

Execute Python code via run_shell using the python-pptx library to inspect the presentation:

from pptx import Presentation

# Load the presentation
prs = Presentation('path/to/file.pptx')

# Get basic info
slide_count = len(prs.slides)
print(f"Total slides: {slide_count}")

# Extract slide titles
for i, slide in enumerate(prs.slides):
    if slide.shapes.title:
        title = slide.shapes.title.text
        print(f"Slide {i+1}: {title}")
    else:
        print(f"Slide {i+1}: [No title]")

Step 3: Validate Structure

Check that the presentation meets expected requirements:

from pptx import Presentation

prs = Presentation('path/to/file.pptx')

# Validation checks
expected_slides = 10  # Adjust based on requirements
actual_slides = len(prs.slides)

if actual_slides >= expected_slides:
    print(f"✓ Slide count OK: {actual_slides} slides")
else:
    print(f"✗ Insufficient slides: {actual_slides}/{expected_slides}")

# Check for content on each slide
for i, slide in enumerate(prs.slides):
    has_title = slide.shapes.title is not None
    has_content = len(slide.shapes) > 1
    print(f"Slide {i+1}: title={has_title}, content={has_content}")

Step 4: Extract Detailed Content (Optional)

For deeper validation, extract text content from all shapes:

from pptx import Presentation

prs = Presentation('path/to/file.pptx')

for i, slide in enumerate(prs.slides):
    print(f"\n=== Slide {i+1} ===")
    for shape in slide.shapes:
        if hasattr(shape, "text") and shape.text.strip():
            print(shape.text)

Expected Output

Successful validation should provide:

  • Confirmed slide count
  • List of slide titles
  • Verification that each slide has expected content structure

Common Use Cases

  • Verifying generated presentations have correct number of slides
  • Confirming slide titles match required topics
  • Validating presentation structure before delivery
  • Debugging why read_file cannot parse a .pptx file

Dependencies

The python-pptx library must be available in the execution environment. Most Python environments support it via pip:

pip install python-pptx
자주 묻는 질문

제목이 없는 슬라이드는 어떻게 처리하나요?

스크립트는 그 슬라이드에 제목이 없다는 메모를 출력합니다.

슬라이드 수는 어떻게 확인하나요?

스크립트는 실제 수를 예상한 수와 비교해 통과 여부를 보고합니다.

파일을 읽는 라이브러리는 무엇인가요?

python-pptx가 발표 자료를 읽습니다.

상세 정보

작성자의 원본 설명

Validate PowerPoint files using python-pptx when read_file fails

repo: HKUDS/AgentPilot

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬