route-failed-searches-to-shell-agent
O que ela faz
Esta skill orienta o agente de IA a passar uma busca na web que continua falhando a um agente de shell, que pode tentar abordagens diferentes. É para pessoas que precisam de informações da web quando a ferramenta de busca não é confiável.
Quando usar
- ✓Quando a ferramenta de busca retorna erros desconhecidos ou resultados vazios em várias consultas.
- ✓Quando a tarefa exige várias etapas de coleta de dados que um ciclo de novas tentativas consegue resolver.
- ✓Quando você quer que o agente escolha seu próprio método, como uma API ou um script, para obter os dados.
Link da skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/route-failed-searches-to-shell-agent/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Encontre os preços atuais de energia da minha região. A ferramenta de busca continua falhando, então peça a um agente de shell que os encontre de outra forma.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
Em vez de tentar de novo a ferramenta de busca várias vezes, o agente dá a um agente de shell um objetivo claro. O agente de shell pode tentar de novo, escrever pequenos scripts ou usar outras ferramentas para reunir os dados.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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 (
Perguntas frequentes
O que o agente de shell faz de diferente?
Ele pode tentar abordagens diferentes, como scripts, APIs ou outras fontes, e tentar de novo por conta própria.
Como o agente sabe que a busca falhou?
A skill cita erros desconhecidos, tempos limite e resultados vazios ou incompletos como sinais de falha.
Os resultados são conferidos?
A skill não descreve uma conferência, então revise os dados antes de confiar neles.
Detalhes
Descrição original do autor
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
Popularidade
- Estrelas no GitHub
- 7,8 mil
- Posição no ranking
- #12978
- Licença
- MIT
- Atualizada em
- 01/11/2026
Comentários
- …
Mais skills deste repositório
agentpilot
7,8 milAjuda seu agente a melhorar um projeto passo a passo, preparando uma tarefa e executando o ciclo do AgentPilot, que propõe, testa e pontua mudanças.
openspace
7,8 milAjuda seu agente a configurar o OpenSpace, uma ferramenta que armazena e busca skills de agentes, e a conectá-la ao seu app de IA pelo MCP.
rsi-arena
7,8 milAjuda seu agente a configurar e rodar testes padrão de benchmark de IA, como AIME e Terminal-Bench, para comparar diferentes métodos de melhoria.
experiment-guide
7,8 milAjuda seu agente a planejar pequenos experimentos, ler seus resultados e registrar descobertas enquanto investiga como melhorar um programa.
Skills parecidas
add-model-provider
394 milPermite que seu agente conecte um novo provedor de modelos de IA ao OpenClaw com comandos seguros, guarde as chaves de API com segurança e faça um teste ao vivo.
acp-router
394 milAjuda seu agente a enviar uma tarefa a um assistente de programação, como Claude Code ou Cursor, pelo OpenClaw, para que o trabalho rode nessa ferramenta.
browser-automation
394 milEnsina seu agente a controlar páginas web passo a passo, incluindo logins, abas e recuperação quando uma página para de responder.