pptx-shell-verify
What it does
This skill explains how to inspect a .pptx presentation with python-pptx when built-in tools cannot. It is for people who need a structured report of what is in a deck.
When to use it
- ✓When read_file or other tools cannot read a PowerPoint file.
- ✓When I need to confirm the structure and content of a presentation.
- ✓When the environment has Python but the library may need installing first.
Skill link
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pptx-shell-verify/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Please verify the contents of my presentation, including slide count and titles. If the library is missing, install it first.”
5 new skills a week. 1 minute to read.
How it works
The AI tries the normal read, checks that python-pptx is available and installs it if not, then runs a verification script that outputs the slide count and slide details as JSON.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
FAQ
What format is the output?
The script's example prints the slide data as JSON.
What is checked first?
The guide tries the standard file read before using python-pptx.
What does the script collect?
The slide count and details for each slide, such as its number and title.
Details
Original description by the author
Verify PowerPoint presentation contents using python-pptx via shell when standard file readers fail
repo: HKUDS/AgentPilot
Popularity
- GitHub stars
- 7.8k
- Ranking position
- #12949
- License
- MIT
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
agentpilot
7.8kHelps your agent improve a project step by step by preparing a task and running the AgentPilot loop that proposes, tests and scores changes.
openspace
7.8kHelps your agent set up OpenSpace, a tool that stores and fetches agent skills, and connect it to your AI app through MCP.
rsi-arena
7.8kHelps your agent set up and run standard AI benchmark tests, such as AIME and Terminal-Bench, to compare different improvement methods.
experiment-guide
7.8kHelps your agent plan small experiments, read their results and record findings while it investigates how to improve a program.
Similar skills
feishu-doc
394kHelps your agent read, create, and edit Feishu cloud documents, including text, images, and tables, using the document tool.
feishu-drive
394kLets your agent browse, organize, and comment on files in a Feishu cloud folder that has been shared with the bot.
feishu-perm
394kHelps your agent check and change who can access a Feishu file, choosing the smallest permission that meets your request.