Zum Inhalt springen
Skillpedia
PDF, Word & Folien7.8k · #12949

pptx-shell-verify

Was er macht

Dieser Skill erklärt, wie eine .pptx-Präsentation mit python-pptx untersucht wird, wenn die eingebauten Werkzeuge es nicht können. Er richtet sich an Menschen, die einen strukturierten Bericht darüber brauchen, was in einem Deck steckt.

Wann du ihn nutzt

  • ✓Wenn read_file oder andere Werkzeuge eine PowerPoint-Datei nicht lesen können.
  • ✓Wenn ich den Aufbau und den Inhalt einer Präsentation bestätigen muss.
  • ✓Wenn die Umgebung Python hat, die Bibliothek aber vielleicht erst installiert werden muss.

Link zum Skill

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pptx-shell-verify/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pptx-shell-verify/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Bitte prüfe den Inhalt meiner Präsentation, inklusive Folienanzahl und Titel. Wenn die Bibliothek fehlt, installiere sie zuerst.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Die KI versucht zuerst das normale Lesen, prüft, ob python-pptx verfügbar ist, und installiert es bei Bedarf. Dann führt sie ein Prüfskript aus, das die Folienanzahl und die Details jeder Folie als JSON ausgibt.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von 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
Häufige Fragen

In welchem Format wird die Ausgabe geliefert?

Das Beispiel des Skripts gibt die Folieninformationen als JSON aus.

Was wird zuerst geprüft?

Die Anleitung versucht das normale Lesen der Datei, bevor sie python-pptx nutzt.

Welche Daten sammelt das Skript?

Die Folienanzahl und die Details jeder Folie, etwa Nummer und Titel.

Details

Originalbeschreibung des Autors

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

repo: HKUDS/AgentPilot

Beliebtheit

GitHub-Sterne
7.8k
Platz im Ranking
#12949
Lizenz
MIT
Aktualisiert
1.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills