pptx-shell-verify
Skill này làm gì
Skill này giải thích cách kiểm tra bản trình bày .pptx bằng python-pptx khi các công cụ tích hợp không làm được. Dành cho người cần một báo cáo có cấu trúc về nội dung của bộ slide.
Khi nào nên dùng
- ✓Khi read_file hoặc công cụ khác không đọc được tệp PowerPoint.
- ✓Khi tôi cần xác nhận cấu trúc và nội dung của một bản trình bày.
- ✓Khi môi trường có Python nhưng thư viện có thể cần cài trước.
Liên kết skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pptx-shell-verify/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
“Hãy kiểm tra nội dung bản trình bày của tôi, gồm số slide và tiêu đề. Nếu thiếu thư viện thì cài trước.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
AI thử đọc tiêu chuẩn trước, kiểm tra python-pptx có sẵn và cài nếu chưa, rồi chạy một script kiểm chứng in số slide và chi tiết từng slide dưới dạng JSON.
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 Shell Verification
When to Use This Skill
Use this skill when:
read_fileor 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-pptxlibrary 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
- Always verify after creation: Run verification immediately after generating a PowerPoint file
- Keep verification script reusable: Store the script for future presentations
- Validate before delivery: Never deliver a presentation without confirming structure
- Log verification results: Keep verification output for audit trails
Câu hỏi thường gặp
Đầu ra có định dạng gì?
Ví dụ của script in dữ liệu slide dưới dạng JSON.
Điều gì được kiểm tra trước?
Hướng dẫn thử đọc tệp tiêu chuẩn trước khi dùng python-pptx.
Script thu thập những gì?
Số lượng slide và chi tiết từng slide, như số thứ tự và tiêu đề.
Chi tiết
Mô tả gốc của tác giả
Verify PowerPoint presentation contents using python-pptx via shell when standard file readers fail
repo: HKUDS/AgentPilot
Độ phổ biến
- Sao GitHub
- 7.8k
- Vị trí xếp hạng
- #12949
- 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.