मुख्य सामग्री पर जाएँ
Skillpedia
PDF, Word और स्लाइड7.8k · #12944

ppt-generation-resilient

यह क्या करती है

यह स्किल दो रास्तों और फ़ोल्डर जाँच के साथ .pptx प्रेज़ेंटेशन बनाने का भरोसेमंद तरीका बताती है। यह उन लोगों के लिए है जिन्हें स्लाइड डेक भरोसे से बनवानी हैं।

कब इस्तेमाल करें

  • ✓जब मुझे खास स्लाइड सामग्री और ढाँचे वाली PowerPoint प्रेज़ेंटेशन चाहिए।
  • ✓जब सहायक का PowerPoint बनाना अस्पष्ट एरर दे।
  • ✓जब फ़ाइल बनने के बाद उसकी जगह की पुष्टि चाहिए।

Skill का लिंक

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/ppt-workflow-location-enhanced-877e03/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/ppt-workflow-location-enhanced-877e03/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“हमारे तिमाही नतीजों पर एक प्रेज़ेंटेशन बनाइए, जिसमें एक शीर्षक स्लाइड और छह सामग्री स्लाइड हों। बताइए कि फ़ाइल कहाँ सहेजी गई।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

AI कार्य-फ़ोल्डर सहेजता है, सहायक से तय फ़ाइल पाथ के साथ डेक बनवाता है, और सहायक विफल होने पर एरर कैप्चर करते हुए python-pptx से बनाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Resilient PowerPoint Generation Workflow

When to Use This Skill

Use this workflow when:

  • You need to create PowerPoint presentations with specific slide content and structure
  • Direct document generation tools fail or are unavailable
  • shell_agent encounters opaque errors during PowerPoint generation
  • Output files may be created in unexpected nested directories within the workspace

Overview

This workflow provides a resilient approach with two tiers:

  1. Primary: shell_agent delegation with clear specifications
  2. Fallback: Direct Python execution using python-pptx library with proper error capture

Step 0: Verify Working Directory

Before starting, establish your working directory context:

# Capture current working directory
pwd
# Store for later reference
WORK_DIR=$(pwd)
echo "Working directory: $WORK_DIR"

Step 1: Attempt PowerPoint Generation via shell_agent (Primary)

Delegate the PowerPoint creation task to shell_agent with explicit specifications:

Use shell_agent to create a PowerPoint presentation with:
- Specify the exact number of slides needed
- Define the content/topic for each slide
- Request the file be saved with a clear filename (e.g., presentation.pptx)
- Ask the agent to confirm the file path after creation using: echo "FILE_PATH: $(pwd)/presentation.pptx"
- Request that any errors be printed to stderr with full tracebacks

Example task description:

Create a PowerPoint presentation with 10 slides covering [topic]. Each slide should have a title and bullet points. Save it as presentation.pptx in the current working directory. After creation, run: echo "FILE_PATH: $(pwd)/presentation.pptx" and report any errors with full tracebacks.

Wait for shell_agent response. If successful with file path confirmed, proceed to Step 4. If shell_agent fails or returns opaque errors, proceed to Step 2.

Step 2: Fallback to Direct Python Execution with python-pptx

When shell_agent fails, create and execute a Python script directly:

2a: Create the Python Script

Write the PowerPoint generation script to a .py file first:

# save as generate_pptx.py
from pptx import Presentation
from pptx.util import Inches, Pt
import os

# Verify working directory
print(f"Working directory: {os.getcwd()}")

# Create presentation
prs = Presentation()

# Slide 1: Title slide
slide_layout = prs.slide_layouts[0]
slide = prs.slides.add_slide(slide_layout)
title = slide.shapes.title
subtitle = slide.placeholders[1]
title.text = "Your Title"
subtitle.text = "Your Subtitle"

# Additional slides (add as needed)
for i in range(2, 11):
    slide_layout = prs.slide_layouts[1]
    slide = prs.slides.add_slide(slide_layout)
    title = slide.shapes.title
    content = slide.placeholders[1]
    title.text = f"Slide {i} Title"
    content.text = f"• Bullet point 1\n• Bullet point 2\n• Bullet point 3"

# Save with full path verification
output_path = os.path.join(os.getcwd(), "presentation.pptx")
prs.save(output_path)
print(f"FILE_PATH: {output_path}")
print(f"File size: {os.path.getsize(output_path)} bytes")

2b: Execute with Full Error Capture

Run the script with stderr redirected to capture actual errors:

# Execute with full error output capture
python generate_pptx.py 2>&1 | tee execution_log.txt

# Or if using run_shell tool, ensure 2>&1 is included
python generate_pptx.py 2>&1

Critical: The 2>&1 redirect ensures Python exceptions are captured, not masked as "unknown error".

2c: Verify Script Execution Output

Check the execution log for:

  • FILE_PATH: confirmation line
  • File size confirmation
  • Any error tracebacks in execution_log.txt

Step 3: Locate the Output File

PowerPoint files may be in nested workspace directories. Use find to locate them:

# Find all .pptx files in the workspace
find . -name "*.pptx" -type f 2>&1

# Or search for a specific filename
find . -name "presentation.pptx" -type f 2>&1

# If not found, search broader (may require elevated permissions)
find /workspace -name "*.pptx" -type f 2>/dev/null

Expected output format:

./presentation.pptx
or
./workspace/task_123/output/presentation.pptx

Step 4: Copy to Working Directory

Once located, copy the file to your working directory:

# Copy the found file to current directory
cp /path/to/found/presentation.pptx .

# Or move it if you prefer
mv /path/to/found/presentation.pptx .

# Verify copy succeeded
ls -la presentati
अक्सर पूछे जाने वाले सवाल

कार्य-फ़ोल्डर पहले क्यों सहेजें?

इससे फ़ाइल कहाँ सहेजी गई यह ढूँढने के लिए एक संदर्भ बिंदु मिलता है।

फ़ाइल पाथ की पुष्टि कैसे होती है?

सहायक से कहा जाता है कि सहेजने के बाद पूरा पाथ छापे।

क्या एरर दिखती हैं?

गाइड कहती है कि एरर पूरे विवरण के साथ छापी जाएँ।

जानकारी

लेखक का मूल विवरण

Robust PowerPoint generation with shell_agent primary approach and python-pptx fallback, including working directory verification and inline error debugging

repo: HKUDS/AgentPilot

लोकप्रियता

GitHub स्टार
7.8k
रैंकिंग में स्थान
#12944
लाइसेंस
MIT
अपडेट की गई
1/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills