Agent skill

Route Failed Searches To Shell Agent

by HKUDS in HKUDS/OpenSpace

Delegate web search tasks to shellagent when direct searchweb tool fails, using its retry mechanism and multi-step capabilities for resilient data gathering

MITAuto-check passedProductivity & Automation

Install Route Failed Searches To Shell Agent

skills CLI
$ npx skills add HKUDS/OpenSpace --skill route-failed-searches-to-shell-agent -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/OpenSpace route-failed-searches-to-shell-agent --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/OpenSpace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/benchmarks/gdpval/skills/route-failed-searches-to-shell-agent .claude/skills/route-failed-searches-to-shell-agent && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
route-failed-searches-to-shell-agent
GitHub stars
7.8k
Token cost
~1.4k tokens
SKILL.md length
541 words
Files
2
Skills in repo
199
Repo updated
First seen
Licence
MIT

At a glance

Delegate web search tasks to shellagent when direct searchweb tool fails, using its retry mechanism and multi-step capabilities for resilient data gathering

  • Works in 4 steps: Detect Search Tool Failure → Delegate to Shell Agent → Verify Results → …
  • Tasks that involve Web search
  • SKILL.md covers When to Use This Skill, Core Pattern, Step-by-Step Instructions and Code Example, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Route Failed Searches To Shell Agent is an agent skill from HKUDS/OpenSpace. Delegate web search tasks to shellagent when direct searchweb tool fails, using its retry mechanism and multi-step capabilities for resilient data gathering

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

It sits in Productivity & Automation, covering Web search. The repository describes itself as: "OpenSpace: The Skill Management Layer for AI Agents" -- https://open-space.cloud/. The licence is MIT.

When your agent uses it

  • Tasks that involve Web search

Example prompts

  • “/route-failed-searches-to-shell-agent”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Detect Search Tool Failure
  2. Delegate to Shell Agent
  3. Verify Results
  4. Extract and Use Data

What it can do on your machine

Read from SKILL.md and the folder at commit 3827781. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Route Failed Searches To Shell Agent loads about 1.4k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 541 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/OpenSpace at commit 3827781, republished under its MIT licence (© HKUDS). 541 words, ~1,381 tokens.

Download SKILL.mdSave it as .claude/skills/route-failed-searches-to-shell-agent/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
route-failed-searches-to-shell-agent
description
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

Route Failed Web Searches to Shell Agent

When to Use This Skill

Use this workflow when:

  • Direct search_web tool 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:

python
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.

python
# 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
Show full SKILL.md (237 more words)Show less

Why This Works

Aspectsearch_web (failing)shell_agent (working)
Retry logicNone or limitedBuilt-in multi-round retry
Error handlingReturns errorAttempts to fix and continue
Approach flexibilitySingle methodCan use Python, bash, APIs, scraping
AdaptationFails completelyTries alternative strategies
Output reliabilityInconsistentStructured, verified results

Best Practices

  1. Don't chain failed tools: Once search_web fails twice, switch to shell_agent immediately rather than accumulating more failures.

  2. Set appropriate timeouts: Shell_agent needs time to iterate (200-300 seconds typical for complex searches).

  3. Be specific about data needs: Shell_agent performs better with clear requirements than broad queries.

  4. Trust the autonomy: Don't micromanage which tools shell_agent should use - let it decide the best approach.

  5. Validate outputs: Always verify shell_agent results meet your needs before proceeding to downstream tasks.

Troubleshooting

Shell_agent also fails?

  • Increase timeout (try 400-500 seconds)
  • Break the task into smaller sub-tasks
  • Specify more concrete data sources or APIs to try

Results are incomplete?

  • Add explicit output format requirements
  • Request source citations to verify coverage
  • Consider running multiple targeted shell_agent calls for different data categories

Task takes too long?

  • Set clear timeout boundaries
  • Prioritize most critical data in the task description
  • Consider running parallel shell_agent calls for independent data categories
  • Combine with execute_code_sandbox for custom data processing after shell_agent gathers raw data
  • Use alongside create_file to persist collected data for downstream tasks
  • Pair with read_webpage for targeted extraction when shell_agent identifies specific URLs

© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in benchmarks/gdpval/skills/route-failed-searches-to-shell-agent of HKUDS/OpenSpace.

  • SKILL.md
  • .skill_id

Open the folder on GitHubat commit 3827781

Compare with similar skills

Route Failed Searches To Shell Agent next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Route Failed Searches To Shell Agent compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Route Failed Searches To Shell Agent this skillHKUDS/OpenSpace7.8k—~1.4kAutomated safety check: PassMIT
Brave Searchbadlogic/pi-skills2.6k5 repos~592Automated safety check: PassMIT
Enterprise AI Scenario MapMetaInFLow/Enterprise-ai-scenario-map-skill632—~1.8kAutomated safety check: PassMIT
Web Searchjjyaoao/HelloAgents3.2k1 repos~5.6kAutomated safety check: PassMIT
Ddg SearchTheSyart/claude-agent-examples4071 repos~493Automated safety check: PassNone
Local Web SearchuluckyXH/OpenMOSS1.3k—~392Automated safety check: NotesMIT

Similar skills

  • Brave Search

    badlogic/pi-skills

    Web search and content extraction via Brave Search API. An agent skill from badlogic/pi-skills.

    2.6k GitHub starsUsed in 5 repos~592 tokens
    Productivity & AutomationAuto-check passed
  • Enterprise AI Scenario Map

    MetaInFLow/Enterprise-ai-scenario-map-skill

    企业AI场景地图生成报告工具。通过 web-search 深度调研企业信息,按照V2.1标准模板生成结构化AI应用场景地图报告,包含企业画像、业务诊断、行业实践、AI场景全量表、实施路径等完整内容。

    632 GitHub stars~1.8k tokensUpdated 6 mo ago
    Productivity & AutomationAuto-check passed
  • Web Search

    jjyaoao/HelloAgents

    Implement web search capabilities using the z-ai-web-dev-sdk.

    3.2k GitHub starsUsed in 1 repo~5.6k tokens
    Productivity & AutomationAuto-check passed
  • Ddg Search

    TheSyart/claude-agent-examples

    Web search without an API key using DuckDuckGo Lite via webfetch.

    407 GitHub starsUsed in 1 repo~493 tokens
    Productivity & AutomationAuto-check passed
  • Local Web Search

    uluckyXH/OpenMOSS

    A skill your agent uses when the user asks for web search that should run via the local-160 Responses API with websearch tool (base URL like https://proxy.example.com, model gpt-5.2-codex(xhigh)).

    1.3k GitHub stars~392 tokensUpdated 3 mo ago
    Productivity & AutomationAuto-check: notes
  • Ask Search

    ythx-101/ask-search

    Web search via self-hosted SearxNG. An agent skill from ythx-101/ask-search.

    538 GitHub stars~332 tokensUpdated 6 mo ago
    Productivity & AutomationAuto-check passed

More from HKUDS/OpenSpace

All 199 skills in this repo
  • Walks through producing a master audio track plus stems in Python, from checking a reference file and timing sections by BPM to effects, a zip archive and final verification.

    7.8k GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Handle cascading data retrieval tool failures by falling back to embedded knowledge generation

    7.8k GitHub stars~765 tokensUpdated 1 mo ago
    Auto-check passed
  • Gives an agent a workaround when its code-execution sandbox keeps failing: save the Python script to a file and run it through the shell instead.

    7.8k GitHub stars~588 tokensUpdated 1 mo ago
    Auto-check passed
  • A recovery routine for agents whose sandboxed code runner keeps failing: save the Python script to disk, then run it through the shell and read the output.

    7.8k GitHub stars~652 tokensUpdated 1 mo ago
    Auto-check passed
  • Fallback ladder for failed sandboxed code runs, plus the habit of fixing the working directory first so generated files land in the right place.

    7.8k GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Fallback workflow for executing Python code when executecodesandbox fails repeatedly

    7.8k GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Route Failed Searches To Shell Agent

What does Route Failed Searches To Shell Agent do?

Delegate web search tasks to shellagent when direct searchweb tool fails, using its retry mechanism and multi-step capabilities for resilient data gathering. Route Failed Searches To Shell Agent is an agent skill from HKUDS/OpenSpace.

When should I use Route Failed Searches To Shell Agent?

Route Failed Searches To Shell Agent fits situations like: tasks that involve Web search.

How do I install Route Failed Searches To Shell Agent in Claude Code?

Run `npx skills add HKUDS/OpenSpace --skill route-failed-searches-to-shell-agent -a claude-code`. Or copy the skill folder (benchmarks/gdpval/skills/route-failed-searches-to-shell-agent in HKUDS/OpenSpace) into .claude/skills/route-failed-searches-to-shell-agent in your project. Claude Code loads it when a task matches its description.

How do I install Route Failed Searches To Shell Agent in Codex?

Run `npx skills add HKUDS/OpenSpace --skill route-failed-searches-to-shell-agent -a codex`. Or copy the skill folder (benchmarks/gdpval/skills/route-failed-searches-to-shell-agent in HKUDS/OpenSpace) into .agents/skills/route-failed-searches-to-shell-agent in your project. Codex loads it when a task matches its description.

Can I use Route Failed Searches To Shell Agent in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/OpenSpace --skill route-failed-searches-to-shell-agent -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/route-failed-searches-to-shell-agent, .gemini/skills/route-failed-searches-to-shell-agent, .github/skills/route-failed-searches-to-shell-agent and .opencode/skills/route-failed-searches-to-shell-agent in your project.

What does Route Failed Searches To Shell Agent need to run?

SKILL.md names no scripts, command-line tools or credentials: Route Failed Searches To Shell Agent is instructions for the agent only. Our summary lists: Python 3.

Does Route Failed Searches To Shell Agent access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Route Failed Searches To Shell Agent safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Route Failed Searches To Shell Agent use?

Route Failed Searches To Shell Agent is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Route Failed Searches To Shell Agent use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Route Failed Searches To Shell Agent?

Skills that share tags, products or a category with Route Failed Searches To Shell Agent: Brave Search (badlogic/pi-skills, 2.6k stars), Enterprise AI Scenario Map (MetaInFLow/Enterprise-ai-scenario-map-skill, 632 stars), Web Search (jjyaoao/HelloAgents, 3.2k stars) and Ddg Search (TheSyart/claude-agent-examples, 407 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Route Failed Searches To Shell Agent?

HKUDS (a GitHub organization) maintains it in HKUDS/OpenSpace, which has 7,754 GitHub stars. The repository holds 199 skills in this directory. The repository was last updated on August 12, 2026.

Source: HKUDS/OpenSpace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.