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
60
68%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./benchmarks/gdpval/skills/route-failed-searches-to-shell-agent/SKILL.mdUse this workflow when:
search_web tool calls consistently fail with 'unknown error' or similar failuresInstead of repeatedly calling search_web when it fails, delegate the entire search task to shell_agent. The shell_agent's internal capabilities provide:
When search_web returns errors like:
Recognize this as a signal to switch strategies rather than retrying the same failing tool.
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:
Check shell_agent output for:
Process the shell_agent results for your downstream task:
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| 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 |
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.
Shell_agent also fails?
Results are incomplete?
Task takes too long?
execute_code_sandbox for custom data processing after shell_agent gathers raw datacreate_file to persist collected data for downstream tasksread_webpage for targeted extraction when shell_agent identifies specific URLsc5a9c4b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.