pptx-validation-fallback
Skill này làm gì
Skill này là phương án dự phòng để kiểm tra file .pptx bằng python-pptx. Nó dành cho những người cần xác nhận số slide và tiêu đề của một bài thuyết trình mà công cụ đọc file không xử lý được.
Khi nào nên dùng
- ✓Khi read_file lỗi hoặc trả về thông tin chưa đầy đủ với một file PowerPoint.
- ✓Khi bạn cần kiểm tra bài thuyết trình có đúng số slide như mong đợi.
- ✓Khi bạn muốn liệt kê tiêu đề các slide để xem lại.
Liên kết skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pptx-validation-fallback/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm tra giúp bài thuyết trình của tôi có mười slide và liệt kê tiêu đề của từng slide. Trình đọc file thông thường không hoạt động với file này.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
AI chạy một script python-pptx qua shell để mở bài thuyết trình, in số slide và từng tiêu đề, rồi so sánh số lượng với số slide mong đợi.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Slide không có tiêu đề được xử lý thế nào?
Script in một ghi chú cho biết slide đó không có tiêu đề.
Số slide được kiểm tra ra sao?
Script so sánh số thực tế với số lượng mong đợi và báo cho biết có đạt hay không.
Thư viện nào đọc file?
python-pptx đọc bài thuyết trình.
Chi tiết
Mô tả gốc của tác giả
Validate PowerPoint files using python-pptx when read_file fails
repo: HKUDS/AgentPilot
Độ phổ biến
- Sao GitHub
- 7.8k
- Vị trí xếp hạng
- #12950
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agentpilot
7.8kGiúp agent của bạn cải thiện dự án từng bước bằng cách chuẩn bị tác vụ và chạy vòng lặp AgentPilot, gồm đề xuất, kiểm thử và chấm điểm thay đổi.
openspace
7.8kGiúp agent của bạn thiết lập OpenSpace, công cụ lưu và lấy lại skill của agent, rồi kết nối nó với ứng dụng AI của bạn qua MCP.
rsi-arena
7.8kGiúp agent của bạn thiết lập và chạy các bài kiểm thử benchmark AI chuẩn, như AIME và Terminal-Bench, để so sánh các phương pháp cải tiến khác nhau.
experiment-guide
7.8kGiúp agent của bạn lên kế hoạch các thí nghiệm nhỏ, đọc kết quả và ghi lại phát hiện khi tìm cách cải thiện một chương trình.
Skill tương tự
feishu-doc
394kGiúp agent của bạn đọc, tạo và sửa tài liệu đám mây Feishu, gồm văn bản, hình ảnh và bảng, bằng công cụ tài liệu.
feishu-drive
394kCho phép agent của bạn duyệt, sắp xếp và bình luận các file trong một thư mục đám mây Feishu đã được chia sẻ với bot.
feishu-perm
394kGiúp agent của bạn kiểm tra và thay đổi ai có quyền truy cập một file Feishu, chọn quyền nhỏ nhất đáp ứng yêu cầu của bạn.