web-tool-fallback
できること
このスキルは、AIエージェントのウェブの読み取りツールと検索ツールが同時に失敗したときの代替手順を示します。タスクを終えるために、ウェブの情報がまだ必要な人向けです。
使う場面
- ✓ページの読み取りツールと検索ツールの両方が、原因不明のエラーで失敗したとき。
- ✓タスクを終えるために、その情報がまだ必要なとき。
- ✓ページのアドレスが、アーカイブ版や別の版などの別の形なら使える可能性があるとき。
スキルのリンク
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/web-tool-fallback/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このサイトでは、ページの読み取りも検索も失敗します。アーカイブなど、アドレスの別の版を試して、見つかったことを教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、まずアーカイブのコピー、別のドメイン、クエリ部分を省いた簡単なURLなどの代替ソースを試します。それでも失敗する場合は、バックアップのシェル方法に切り替えてデータを取得します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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
よくある質問
どの代替アドレスを試しますか?
アーカイブのコピー、別のドメイン、クエリを省いたURL、httpとhttpsの切り替えを提案しています。
サンドボックスも失敗したらどうしますか?
サンドボックスの実行がエラーを返したら、シェル実行ツールに切り替えるよう述べています。
取得できなかった情報はエージェントが伝えますか?
スキルの目的はタスクを終えることです。エージェントは、取得できなかったデータを記録すべきです。
詳細
作者による元の説明
Implement fallback strategies when web-reading tools fail simultaneously
repo: HKUDS/AgentPilot
人気
- GitHubのスター
- 7.8k
- ランキング
- #13027
- ライセンス
- MIT
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
agentpilot
7.8kエージェントが、作業を準備し、変更案を提案してテストし、評価するAgentPilotのループを実行することで、プロジェクトを段階的に改善できるよう支援します。
openspace
7.8kエージェントが、スキルを保存し取り出すツールであるOpenSpaceをセットアップし、MCPを通じてAIアプリに接続できるよう支援します。
rsi-arena
7.8kエージェントが、AIMEやTerminal-Benchなどの標準的なAIベンチマークテストをセットアップして実行し、異なる改善方法を比較できるよう支援します。
experiment-guide
7.8kエージェントが、プログラムを改善する方法を調べる間に、小さな実験を計画し、その結果を読み、発見を記録できるよう支援します。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。