web-tool-fallback
What it does
This skill guides the AI agent through backup steps when its web reading and search tools fail together. It is for people who still need information from the web to finish a task.
When to use it
- ✓When the page reader and the search tool both fail with unknown errors.
- ✓When the information is still needed to complete the task.
- ✓When a page address might work in a different form, such as an archived or alternate version.
Skill link
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/web-tool-fallback/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“The page reader and search both fail on this site. Try other versions of the address, such as an archive, and tell me what you find.”
5 new skills a week. 1 minute to read.
How it works
The agent first tries alternative sources, such as archive copies, other domains and simpler versions of the address. If those also fail, it switches to a backup shell method to get the data.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Web Tool Fallback Strategy
When to Use This Skill
Apply this skill when all web-reading tools (read_webpage, search_web) fail simultaneously with unknown errors during a research or information-gathering task.
Recognition Criteria
Confirm this pattern before applying fallbacks:
- Multiple web tool calls have failed (not just one isolated failure)
- Errors are unknown/unexpected (not expected 404s or rate limits that can be handled normally)
- The information is still needed to complete the task
Fallback Procedure
Critical: execute_code_sandbox may also fail during system-wide issues. Always be prepared to immediately fall back to run_shell if sandbox execution returns errors.
Step 1: Attempt Alternative Sources
Before abandoning web access, try these alternatives:
Alternative URLs:
- Archive.org / Wayback Machine versions
- Alternative domains (e.g., .org instead of .com)
- Different subdomains or paths
Simplified Requests:
- Try reading just the domain root
- Remove query parameters from URLs
- Try HTTP instead of HTTPS (or vice versa)
# Example: Generate alternative URL formats
original_url = "https://example.com/research/report?id=123"
alternatives = [
"https://example.com/research/report",
"http://example.com/research/report?id=123",
"https://web.archive.org/web/*/https://example.com/research/report"
]
Step 2: Use execute_code_sandbox for Embedded Knowledge
Step 2: Use execute_code_sandbox for Embedded Knowledge (May Fail)
When web access is unavailable, generate content from reliable embedded knowledge. Note: execute_code_sandbox can fail during cascading system issues—if it returns errors, immediately proceed to Step 2b.
code = '''
# Generate structured information from embedded knowledge
evaluation_frameworks = {
"Kirkpatrick Model": ["Reaction", "Learning", "Behavior", "Results"],
"Bloom's Taxonomy": ["Remember", "Understand", "Apply", "Analyze", "Evaluate", "Create"],
"SMART Criteria": ["Specific", "Measurable", "Achievable", "Relevant", "Time-bound"]
}
# Create comprehensive reference material
for framework, levels in evaluation_frameworks.items():
print(f"## {framework}\\n")
for i, level in enumerate(levels, 1):
print(f"{i}. {level}")
print()
'''
If execute_code_sandbox returns any error (unknown error, timeout, execution failure):
- Do not retry execute_code_sandbox multiple times
- Immediately proceed to Step 2b (run_shell fallback)
- Document the sandbox failure in your Research Access Notes
- Established frameworks and methodologies
- Standard best practices
- Well-documented technical concepts
- Historical information that doesn't change frequently
### Step 2b: Fall Back to run_shell if execute_code_sandbox Fails
### Step 2b: Fall Back to run_shell if execute_code_sandbox Fails (REQUIRED)
**When to use**: execute_code_sandbox returns any error OR fails to produce output within reasonable time.
**Action**: Immediately switch to run_shell with direct Python execution. Do not continue attempting execute_code_sandbox.
1. **Use run_shell with direct Python execution** (simplest, most reliable):
1. **Use run_shell with direct Python execution**:
```bash
python3 -c "print('content from embedded knowledge')"
Use heredoc for multi-line scripts:
python3 << 'EOF' # Your Python code here frameworks = {"Kirkpatrick": ["Reaction", "Learning", "Behavior", "Results"]} for name, levels in frameworks.items(): print(f"## {name}") for level in levels: print(f"- {level}") EOFCapture output to file for further processing:
python3 -c "print('structured content')" > output.txt
Why run_shell works when execute_code_sandbox fails:
- Direct system Python execution bypasses sandbox restrictions
- No additional abstraction layer that could fail
- More reliable during cascading tool failures
- Should be your go-to when sandbox is compromised
Step 3: Create Document with Placeholder Citations
For tasks requiring formal documentation:
- Draft the document using available knowledge
- Mark uncertain citations clearly:
[WEB_ACCESS_LIMITED: URL https://example.com/source could not be accessed] - Use placeholder format for references:
[Reference needed: Topic - URL attempted but inaccessibl
FAQ
What alternative addresses are tried?
The skill suggests archive copies, alternative domains, simpler URLs without query parts and a change between http and https.
What if the sandbox also fails?
The skill says to fall back to the shell run tool when sandbox execution returns errors.
Does the agent say what it could not get?
The skill's goal is to finish the task, so the agent should note any data it could not retrieve.
Details
Original description by the author
Implement fallback strategies when web-reading tools fail simultaneously
repo: HKUDS/AgentPilot
Popularity
- GitHub stars
- 7.8k
- Ranking position
- #13027
- License
- MIT
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
agentpilot
7.8kHelps your agent improve a project step by step by preparing a task and running the AgentPilot loop that proposes, tests and scores changes.
openspace
7.8kHelps your agent set up OpenSpace, a tool that stores and fetches agent skills, and connect it to your AI app through MCP.
rsi-arena
7.8kHelps your agent set up and run standard AI benchmark tests, such as AIME and Terminal-Bench, to compare different improvement methods.
experiment-guide
7.8kHelps your agent plan small experiments, read their results and record findings while it investigates how to improve a program.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.