本文へスキップ
Skillpedia
エージェント7.8k · #12998

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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-file-workflow/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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_file functions 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

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル