ppt-reliable-creation
Fungsinya
Skill ini adalah cara dua jalur untuk membuat dek .pptx: jalur helper dan jalur Python langsung. Skill ini cocok untuk orang yang membutuhkan file dek slide dan menginginkan hasil yang andal.
Kapan dipakai
- βSaat saya membutuhkan presentasi PowerPoint dengan jumlah dan isi slide tertentu.
- βSaat agent helper mungkin gagal atau mengembalikan galat yang tidak jelas saat membuat dek.
- βSaat file keluaran mungkin berakhir di folder yang tidak terduga.
Link skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/ppt-workflow-location-enhanced-72b4a5/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBuat PowerPoint 10 slide tentang rencana proyek kami. Jika helper gagal, bangun dengan Python saja, dan beri tahu saya jalur file lengkapnya.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
AI mencatat folder saat ini, meminta helper membangun slide, dan jika itu gagal, menulis sendiri skrip python-pptx, lalu memastikan lokasi file .pptx yang disimpan.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Reliable PowerPoint Creation Workflow
When to Use This Skill
Use this workflow when:
- You need to create PowerPoint presentations with specific slide content and structure
- shell_agent may fail or produce opaque error messages
- Output files may be created in unexpected nested directories
- You need a reliable fallback when primary generation methods fail
Overview: Dual-Path Strategy
This skill provides two paths:
- Primary Path: shell_agent delegation (simpler, but may fail)
- Fallback Path: Direct Python execution with python-pptx (more reliable, more control)
Step 0: Pre-Check Working Directory
Before any generation, verify your current working directory:
# Check and record current directory
pwd
# Output should be saved for later reference
# List current contents to establish baseline
ls -la
Important: Save the pwd output. You'll need this to verify where files are created.
Step 1: Primary Path - shell_agent Generation
Attempt PowerPoint creation via shell_agent first (quickest if successful):
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 full file path after creation
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 and tell me the full file path where you saved it.
shell_agent Error Handling
If shell_agent returns "unknown error" or fails:
# Capture actual error by adding stderr redirect
# Re-run the task or check previous error output
# Add 2>&1 to any shell commands to see real errors
After 2 failures or opaque errors, switch to Fallback Path (Step 2).
Step 2: Fallback Path - Direct Python with python-pptx
When shell_agent fails, use direct Python execution. Always write script to file first, then execute.
2a: Create the Python Script
Write a complete Python script using python-pptx:
from pptx import Presentation
from pptx.util import Inches, Pt
# 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 = "Title Here"
subtitle.text = "Subtitle Here"
# Slide 2+: Content slides
for i in range(2, 11):
slide_layout = prs.slide_layouts[1]
slide = prs.slides.add_slide(slide_layout)
title = slide.shapes.title
title.text = f"Slide {i} Title"
# Add content
content = slide.placeholders[1]
content.text = f"Content for slide {i}"
# Save to current working directory
prs.save('presentation.pptx')
print("File saved to:", os.path.abspath('presentation.pptx'))
Save this script as: create_presentation.py
2b: Execute with Error Capture
# Write script to file first, then execute with stderr capture
python create_presentation.py 2>&1 | tee execution_log.txt
# Check for success
if [ -f "presentation.pptx" ]; then
echo "SUCCESS: File created in current directory"
ls -la presentation.pptx
else
echo "FAILED: Check execution_log.txt for errors"
cat execution_log.txt
fi
2c: Verify Working Directory Match
# Confirm file is where expected
CURRENT_PWD=$(pwd)
FILE_PATH=$(realpath presentation.pptx 2>/dev/null)
if [[ "$FILE_PATH" == "$CURRENT_PWD"* ]]; then
echo "β File is in expected directory"
else
echo "β File created elsewhere: $FILE_PATH"
echo "Current directory: $CURRENT_PWD"
fi
Step 3: Locate the Output File
PowerPoint files may be created in nested directories. Always search before assuming location:
# Search for all .pptx files in workspace
find . -name "*.pptx" -type f 2>/dev/null
# Search for specific filename
find . -name "presentation.pptx" -type f 2>/dev/null
# If not found, broaden search
find . -name "*.pptx" -type f -mmin -5 2>/dev/null
Step 4: Copy to Working Directory
Once located, bring the file to your known working directory:
# Found path example: ./workspace/task_123/output/presentation.pptx
FOUND_PATH=$(find . -name "presentation.pptx" -type f | head -1)
if [ -n "$FOUND_PATH" ]; then
cp "$FOUND_PATH" .
echo "Copied from: $FOUND_PATH"
else
echo "ERROR: File not found
Pertanyaan umum
Apa jalur pertama?
Agent helper membangun presentasi dari deskripsi yang jelas.
Apa cadangannya?
Skrip Python menggunakan python-pptx yang ditulis dan dijalankan oleh AI.
Mengapa folder saat ini dicatat?
Ini membantu memastikan di mana file dibuat, karena file bisa berakhir di folder bersarang.
Detail
Deskripsi asli dari pembuat
Robust PowerPoint generation with shell_agent primary and python-pptx fallback, including directory verification and error debugging
repo: HKUDS/AgentPilot
Popularitas
- Bintang GitHub
- 7.8k
- Peringkat
- #12943
- Lisensi
- MIT
- Diperbarui
- 1/11/2026
Komentar
- β¦
Skill lain dari repositori ini
agentpilot
7.8kMembantu agent Anda meningkatkan proyek langkah demi langkah dengan menyiapkan tugas dan menjalankan loop AgentPilot yang mengusulkan, menguji, dan memberi skor pada perubahan.
openspace
7.8kMembantu agent Anda menyiapkan OpenSpace, alat yang menyimpan dan mengambil skill agent, lalu menghubungkannya ke aplikasi AI Anda melalui MCP.
rsi-arena
7.8kMembantu agent Anda menyiapkan dan menjalankan tes benchmark AI standar, seperti AIME dan Terminal-Bench, untuk membandingkan berbagai metode perbaikan.
experiment-guide
7.8kMembantu agent Anda merencanakan eksperimen kecil, membaca hasilnya, dan mencatat temuan saat menyelidiki cara memperbaiki sebuah program.
Skill serupa
feishu-doc
394kMembantu agent Anda membaca, membuat, dan mengedit dokumen cloud Feishu, termasuk teks, gambar, dan tabel, dengan memakai alat dokumen.
feishu-drive
394kMemungkinkan agent Anda menelusuri, mengatur, dan memberi komentar pada file di folder cloud Feishu yang sudah dibagikan kepada bot.
feishu-perm
394kMembantu agent Anda memeriksa dan mengubah siapa yang dapat mengakses file Feishu, dengan memilih izin terkecil yang memenuhi permintaan Anda.