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.8kAIME나 Terminal-Bench 같은 표준 AI 벤치마크 테스트를 설정하고 실행해 서로 다른 개선 방법을 비교하도록 돕습니다.
experiment-guide
7.8k프로그램을 개선하는 방법을 조사하면서 작은 실험을 계획하고, 결과를 읽고, 발견 사항을 기록하도록 돕습니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.