shell-agent-file-workflow
できること
このワークフローは、AIエージェントがシェルエージェントに複雑なファイルを作らせ、その後で見つけるよう導きます。スライド、書類、PDFなどの形式でファイルツールが失敗する人向けです。
使う場面
- ✓スライドや書類などの複雑な形式で、直接のファイル作成ツールが失敗したとき。
- ✓ファイルを作るのに、複数の手順、ライブラリ、エラー修正が必要なとき。
- ✓生成されたファイルが、見つけにくいネストされたフォルダーに保存されるかもしれないとき。
スキルのリンク
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-file-workflow/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“四半期レビュー用のPowerPointデッキを作ってください。直接のツールが失敗したので、シェルエージェントに作らせてから、ファイルを見つけてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、シェルエージェントに分かりやすい作業を渡します。終わったら、ワークスペースを名前と最近の更新日時で検索し、ネストされたフォルダーの中でも新しいファイルを見つけます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Shell Agent File Generation Workflow
When direct document or file generation approaches fail, delegate the task to shell_agent which can autonomously write code, execute it, and retry on errors. Generated files may appear in nested workspace directories.
When to Use
- Direct file generation tools or
create_filefunctions fail for complex formats - Complex file creation requiring multiple steps, libraries, or error recovery
- When you need an autonomous agent to figure out how to accomplish a goal
- File generation that requires iteration and automatic error fixing
Workflow Steps
Step 1: Delegate File Generation to shell_agent
Use shell_agent with a clear, specific task description:
shell_agent(task="Create a [file type] with [specific content/structure requirements]")
The agent will:
- Decide whether to use Python or Bash
- Write and execute code
- Inspect output and iterate
- Automatically retry and fix errors (up to several rounds)
Step 2: Locate Generated Files
Files may be created in nested directories within the workspace. Use find to locate them:
find . -name "*.extension" -type f
For multiple file types:
find . -type f \( -name "*.pptx" -o -name "*.docx" -o -name "*.pdf" \)
For recently modified files (last 10 minutes):
find . -name "*.extension" -type f -mmin -10
Step 3: Copy Files to Working Directory
Once located, copy the file to your working directory:
cp /path/to/found/file.extension ./
Example
Creating a PowerPoint Presentation
# Step 1: Delegate to shell_agent
shell_agent(task="Create a 10-slide PowerPoint presentation covering: topic A, topic B, topic C")
# Step 2: Find the generated file
find . -name "*.pptx" -type f
# Output might show: ./workspace/nested/path/presentation.pptx
# Step 3: Copy to working directory
cp ./workspace/nested/path/presentation.pptx ./
Creating a PDF Report
# Step 1: Delegate generation
shell_agent(task="Generate a PDF report with charts and tables from the provided data")
# Step 2: Locate output
find . -name "*.pdf" -type f -mmin -5
# Step 3: Retrieve file
cp ./generated/reports/output.pdf ./
Tips
- Be specific in task description: Include file format, structure, and content requirements explicitly
- Check multiple extensions: If unsure of output format, search for common extensions
- Use modification time: Filter by recent files to identify newly created outputs
- Verify file integrity: After copying, check that the file is valid and complete
Troubleshooting
| Issue | Solution |
|---|---|
| No files found | Expand search: remove extension filter, increase time window |
| Multiple files found | Sort by modification time: find . -name "*.ext" -type f -printf '%T@ %p\n' | sort -n |
| File is corrupted | Re-run shell_agent with more specific requirements |
| Permission errors | Use sudo or check directory permissions |
よくある質問
エージェントはどのようにファイルを見つけますか?
findコマンドでファイルの種類から検索し、最近数分以内に変更されたファイルに絞り込むこともできます。
どのファイルの種類を検索できますか?
スキルは、PowerPoint、Word、PDFを例として挙げています。
同じファイルの複数のバージョンがあったらどうしますか?
スキルは、更新日時で絞り込み、最新のものを選ぶよう提案しています。
詳細
作者による元の説明
Delegate file generation to shell_agent when direct tools fail, with systematic file location and retrieval
repo: HKUDS/AgentPilot
人気
- GitHubのスター
- 7.8k
- ランキング
- #12998
- ライセンス
- 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エージェントが、プログラムを改善する方法を調べる間に、小さな実験を計画し、その結果を読み、発見を記録できるよう支援します。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。