ppt-generation-resilient
できること
このスキルは、フォルダの確認を伴う2つの経路で、.pptxのプレゼンテーションを確実に作る方法を説明します。スライドデッキを確実に作る必要がある人向けです。
使う場面
- ✓特定のスライドの内容と構成を持つプレゼンテーションが必要なとき。
- ✓ヘルパーのPowerPoint生成が、不透明なエラーを返すとき。
- ✓作成後にファイルの場所を確認したいとき。
スキルのリンク
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/ppt-workflow-location-enhanced-877e03/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“四半期の結果についてのプレゼンテーションを、タイトルスライドと内容のスライド6枚で作ってください。ファイルの保存先も確認してください。”
毎週5つの新しいスキル。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:
- Primary: shell_agent delegation with clear specifications
- 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
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
agentpilot
7.8kエージェントが、作業を準備し、変更案を提案してテストし、評価するAgentPilotのループを実行することで、プロジェクトを段階的に改善できるよう支援します。
openspace
7.8kエージェントが、スキルを保存し取り出すツールであるOpenSpaceをセットアップし、MCPを通じてAIアプリに接続できるよう支援します。
rsi-arena
7.8kエージェントが、AIMEやTerminal-Benchなどの標準的なAIベンチマークテストをセットアップして実行し、異なる改善方法を比較できるよう支援します。
experiment-guide
7.8kエージェントが、プログラムを改善する方法を調べる間に、小さな実験を計画し、その結果を読み、発見を記録できるよう支援します。
似ているスキル
feishu-doc
394kテキスト、画像、表を含むFeishuのクラウドドキュメントを、ドキュメントツールを使って読み、作成し、編集するようエージェントを支援します。
feishu-drive
394kボットと共有されたFeishuのクラウドフォルダ内のファイルを閲覧、整理、コメントできるようエージェントを支援します。
feishu-perm
394kFeishuのファイルにアクセスできる人を確認し、変更するようエージェントを支援します。依頼を満たす最小の権限を選びます。