route-failed-searches-to-shell-agent
できること
このスキルは、何度も失敗するウェブ検索を、別のアプローチを試せるシェルのエージェントに渡すようAIエージェントに指示します。検索ツールが信頼できず、ウェブの情報が必要な人向けです。
使う場面
- ✓検索ツールが、いくつかのクエリにわたって、不明なエラーや空の結果を返し続けるとき。
- ✓タスクに、再試行のループで扱える複数ステップのデータ収集が必要なとき。
- ✓APIやスクリプトなど、データを集める方法をエージェントに自分で選ばせたいとき。
スキルのリンク
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/route-failed-searches-to-shell-agent/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私の地域の現在のエネルギー価格を調べてください。検索ツールが失敗し続けるので、シェルのエージェントに別の方法で探させてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、検索ツールを何度も再試行する代わりに、シェルのエージェントに明確な目標を与えます。シェルのエージェントは、再試行したり、小さなスクリプトを書いたり、ほかのツールを使ったりして、データを集められます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Route Failed Web Searches to Shell Agent
When to Use This Skill
Use this workflow when:
- Direct
search_webtool calls consistently fail with 'unknown error' or similar failures - You need to gather web-based information but the standard search tool is unreliable
- The task requires multi-step data collection that benefits from autonomous retry logic
- You need resilient data gathering that can adapt when initial approaches fail
Core Pattern
Instead of repeatedly calling search_web when it fails, delegate the entire search task to shell_agent. The shell_agent's internal capabilities provide:
- Automatic retry logic with error detection and recovery
- Multi-step approach - can try different methods (APIs, scraping, alternative sources)
- Code-based solutions - can write Python scripts, use curl, or other tools
- Autonomous adaptation - figures out the best approach without manual intervention
Step-by-Step Instructions
Step 1: Detect Search Tool Failure
When search_web returns errors like:
- "unknown error"
- Empty or incomplete results
- Consistent failures across multiple queries
Recognize this as a signal to switch strategies rather than retrying the same failing tool.
Step 2: Delegate to Shell Agent
Create a task for shell_agent with clear objectives:
shell_agent(
task="Gather current energy market data including oil prices, gas prices, and bond market information. Search multiple sources and compile findings into a structured summary.",
timeout=300
)
Key task formulation principles:
- Specify the what (data needed) not the how (specific tools to use)
- Include success criteria and output format expectations
- Allow sufficient timeout for multi-step execution (300+ seconds)
- Let shell_agent decide whether to use Python, curl, or other approaches
Step 3: Verify Results
Check shell_agent output for:
- Complete data collection (not partial results)
- Multiple sources cited (indicates thorough searching)
- Structured, usable output format
- Evidence of error handling (mentions of retry attempts, alternative approaches tried)
Step 4: Extract and Use Data
Process the shell_agent results for your downstream task:
- Parse collected data into required format
- Cross-reference with any partial results from failed search_web calls
- Document sources for verification if needed
Code Example
Scenario: Gathering market data for a financial report when search_web fails.
# Failed approach - don't keep retrying this:
try:
results = search_web(query="current oil gas bond market prices 2025")
# This fails with unknown error
except:
pass # Don't just catch and retry the same failing tool
# Correct approach - delegate to shell_agent:
from tools import shell_agent
market_data = shell_agent(
task="""
Gather comprehensive energy market data for a trading strategy report.
Required information:
1. Current crude oil prices (WTI, Brent)
2. Natural gas prices
3. Relevant bond issuer analysis and yields
4. Recent market trends and forecasts
Use multiple sources, handle any errors by trying alternative approaches,
and provide structured output with source citations.
""",
timeout=300
)
# Now use market_data for your report
Why This Works
| Aspect | search_web (failing) | shell_agent (working) |
|---|---|---|
| Retry logic | None or limited | Built-in multi-round retry |
| Error handling | Returns error | Attempts to fix and continue |
| Approach flexibility | Single method | Can use Python, bash, APIs, scraping |
| Adaptation | Fails completely | Tries alternative strategies |
| Output reliability | Inconsistent | Structured, verified results |
Best Practices
Don't chain failed tools: Once search_web fails twice, switch to shell_agent immediately rather than accumulating more failures.
Set appropriate timeouts: Shell_agent needs time to iterate (200-300 seconds typical for complex searches).
Be specific about data needs: Shell_agent performs better with clear requirements than broad queries.
Trust the autonomy: Don't micromanage which tools shell_agent should use - let it decide the best approach.
Validate outputs: Always verify shell_agent results meet your needs before proceeding to downstream tasks.
Troubleshooting
Shell_agent also fails?
- Increase timeout (
よくある質問
シェルのエージェントは何が違うのですか?
スクリプトやAPI、ほかの情報源など、異なるアプローチを試せ、自分で再試行もできます。
検索が失敗したとどう分かりますか?
不明なエラー、タイムアウト、空や不完全な結果が、失敗の兆候だとスキルは挙げています。
結果は確認されますか?
スキルは確認の方法を説明していません。頼る前に、データを確かめてください。
詳細
作者による元の説明
Delegate web search tasks to shell_agent when direct search_web tool fails, using its retry mechanism and multi-step capabilities for resilient data gathering
repo: HKUDS/AgentPilot
人気
- GitHubのスター
- 7.8k
- ランキング
- #12978
- ライセンス
- 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ページを段階的に操作するようエージェントに教えます。