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

pptx-shell-verify

하는 일

이 스킬은 내장 도구가 읽지 못할 때 python-pptx로 .pptx 발표 자료를 점검하는 방법입니다. 덱의 내용을 구조화된 보고서로 얻어야 하는 사람에게 맞습니다.

사용하는 경우

  • ✓read_file 같은 도구가 PowerPoint 파일을 읽지 못할 때.
  • ✓발표 자료의 구조와 내용을 확인해야 할 때.
  • ✓환경에 Python은 있지만 라이브러리를 먼저 설치해야 할 수 있는 경우.

스킬 링크

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pptx-shell-verify/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-shell-verify/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가 있는지 확인해 없으면 설치한 뒤, 슬라이드 수와 세부 정보를 JSON으로 출력하는 검증 스크립트를 실행합니다.

기술 내용 (원본 SKILL.md)

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

PowerPoint Shell Verification

When to Use This Skill

Use this skill when:

  • read_file or other built-in tools fail to read PowerPoint (.pptx) files
  • You need to verify presentation structure (slide count, titles, content)
  • Standard file inspection methods return errors or incomplete data

Prerequisites

  • Python 3.x installed in the execution environment
  • python-pptx library available (install if needed)

Step-by-Step Instructions

Step 1: Attempt Standard File Read

First, try to read the file using standard methods:

read_file: path/to/presentation.pptx

If this fails or returns unusable data, proceed to Step 2.

Step 2: Verify python-pptx Availability

Check if the library is installed:

run_shell: python -c "import pptx; print('pptx available')"

If not available, install it:

run_shell: pip install python-pptx

Step 3: Create Verification Script

Create a Python script to extract presentation metadata:

# verify_pptx.py
from pptx import Presentation
import sys
import json

def verify_presentation(filepath):
    try:
        prs = Presentation(filepath)
        data = {
            "slide_count": len(prs.slides),
            "slides": []
        }
        
        for i, slide in enumerate(prs.slides):
            slide_data = {
                "slide_number": i + 1,
                "title": None,
                "shapes_count": len(slide.shapes)
            }
            
            # Extract title if present
            if slide.shapes.title:
                slide_data["title"] = slide.shapes.title.text
            
            data["slides"].append(slide_data)
        
        print(json.dumps(data, indent=2))
        return True
    except Exception as e:
        print(f"ERROR: {str(e)}", file=sys.stderr)
        return False

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("Usage: python verify_pptx.py <file.pptx>", file=sys.stderr)
        sys.exit(1)
    
    success = verify_presentation(sys.argv[1])
    sys.exit(0 if success else 1)

Step 4: Execute Verification

Run the verification script:

run_shell: python verify_pptx.py path/to/presentation.pptx

Step 5: Interpret Results

Expected output format:

{
  "slide_count": 10,
  "slides": [
    {
      "slide_number": 1,
      "title": "Introduction",
      "shapes_count": 3
    },
    ...
  ]
}

Use this data to:

  • Confirm expected slide count matches
  • Verify slide titles are present
  • Validate presentation structure before delivery

Example Validation Checks

# Check slide count matches requirement
assert data["slide_count"] >= expected_min_slides

# Check all slides have titles
for slide in data["slides"]:
    assert slide["title"] is not None, f"Slide {slide['slide_number']} missing title"

Troubleshooting

Issue Solution
Corrupted file Verify file was created successfully, check file size
Permission denied Ensure file path is accessible, check read permissions
Library not found Install with pip install python-pptx
Empty presentation File may be 0 bytes or incomplete write

Best Practices

  1. Always verify after creation: Run verification immediately after generating a PowerPoint file
  2. Keep verification script reusable: Store the script for future presentations
  3. Validate before delivery: Never deliver a presentation without confirming structure
  4. Log verification results: Keep verification output for audit trails
자주 묻는 질문

출력 형식은 무엇인가요?

예제 스크립트는 슬라이드 데이터를 JSON으로 출력합니다.

무엇을 먼저 확인하나요?

가이드는 python-pptx를 쓰기 전에 표준 파일 읽기를 먼저 시도합니다.

스크립트는 무엇을 모으나요?

각 슬라이드의 번호와 제목 같은 슬라이드 수와 세부 정보를 모읍니다.

상세 정보

작성자의 원본 설명

Verify PowerPoint presentation contents using python-pptx via shell when standard file readers fail

repo: HKUDS/AgentPilot

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬