跳到正文
cccskills
免费在 GitHub 公开

web-tool-fallback

Continue research when web-reading tools fail together by trying alternative URLs and using established knowledge where appropriate. Record inaccessible sources, mark references that need verification, and explain the limits of the resulting document.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Implement fallback strategies when web-reading tools fail simultaneously

查看安装方法

适用场景

  • Continue research during a web-tool outage
  • Draft documents with references marked for verification
  • Record access failures and confidence levels
  • Switch methods when code execution also fails

包含的文件(2)

  • SKILL.md7.5 KB
  • .skill_id31 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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:

  1. Alternative URLs:

    • Archive.org / Wayback Machine versions
    • Alternative domains (e.g., .org instead of .com)
    • Different subdomains or paths
  2. 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')"
  1. 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}")
    EOF
    
  2. Capture 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:

  1. Draft the document using available knowledge
  2. Mark uncertain citations clearly:
    [WEB_ACCESS_LIMITED: URL https://example.com/source could not be accessed]
    
  3. Use placeholder format for references:
    [Reference needed: Topic - URL attempted but inaccessible]
    

Step 4: Document the Limitation for Stakeholders

Always create a transparent "Research Access Notes" section:

## Research Access Notes

**Access Limitation**: All web-reading tools failed simultaneously during research.

**Fallback Actions Taken**:
- [ ] Attempted alternative URLs: [Yes/No]
- [ ] Used embedded knowledge generation: [Yes/No]
- [ ] Created placeholders for citations: [Yes/No]

**Confidence Level**: [High/Medium/Low] - based on reliance on embedded knowledge vs. current web sources

**Recommendation**: Verify critical claims with current web sources when access is restored.

Decision Tree

All web tools failed?
├─ Yes → Try alternative URLs
│   ├─ Success → Complete task normally
│   └─ Failed → Can content be generated from embedded knowledge?
│       ├─ Yes → Try execute_code_sandbox (expect potential failure)
│       │   ├─ Success → Use output + document limitation
│       │   └─ Failed/Errors → **IMMEDIATELY** use run_shell + document limitation
│       └─ No → Create document with placeholders + notify Executive Director
│       └─ No → Create document with placeholders + notify Executive Director
└─ No → Handle individual failures normally

Task-Type Adaptations

Task TypePrimary FallbackDocumentation Required
Research/Analysisexecute_code_sandboxAccess notes section
Document CreationPlaceholder citationsLimitation notice to Executive Director
Time-SensitiveProceed with available methodsBrief limitation note
Compliance/LegalEscalate immediatelyFull access failure report

Example Application

# When gathering reference materials fails
try:
    # Primary: read_webpage attempts (all failed)
    pass
except:
    # Fallback 1: Try alternative sources
    alternative_content = execute_code_sandbox(generate_from_knowledge())
    
    # Fallback 2: Create document with transparency
    document = create_with_placeholders(
        content=alternative_content,
        citation_markers="[WEB_ACCESS_LIMITED]",
        stakeholder_note="Executive Director: Web access unavailable, content from embedded knowledge"
    )

Best Practices

  1. Be transparent: Always document when web access failed
  2. Preserve attempt records: Note which URLs/tools failed for future reference
  3. Distinguish knowledge types: Clearly separate embedded knowledge from current web-sourced information
  4. Prioritize critical info: If certain information is essential and cannot be generated, escalate rather than guess
  5. Enable verification: Make it easy for stakeholders to verify claims when access is restored
  6. Never stack failures: If execute_code_sandbox fails once, switch to run_shell immediately—do not retry the sandbox multiple times
  7. Complete all steps: Step 4 (Document Limitation) is mandatory, not optional—even if fallback succeeds

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Prepare audio stems, the separate parts of a track, for mixing by matching their durations with silence, loops, or crossfades. Verify each generated and processed file before moving to the next production step.

中文简介正在准备中。当前显示英语简介。

  • Match audio parts with different durations
  • Extend drums and melodic parts using suitable methods
  • Check audio specifications before mixing
HKUDS/OpenSpace77562026年8月13日 更新

Produce audio in separate stems, meaning individual instrument tracks, and verify each output as you go. Align track lengths with silence, loops, or crossfades, then apply effects, mix a master, and package the files.

中文简介正在准备中。当前显示英语简介。

  • Align instrument tracks to a reference audio file
  • Choose how to extend tracks that are too short
  • Verify audio properties after generation and effects
HKUDS/OpenSpace77562026年8月13日 更新

Build serverless endpoints that relay external API requests for a dashboard while keeping API keys on the server. Includes Vercel examples for input checks, caching, cross-origin access, and consistent JSON responses.

中文简介正在准备中。当前显示英语简介。

  • Connect a dashboard to external APIs without exposing API keys
  • Create endpoints for stock quotes and news
  • Standardize API responses and error handling
HKUDS/OpenSpace77562026年8月13日 更新

Produce a master track and separate audio parts through a structured Python workflow. Apply filters and reverb, export WAV files with consistent settings, package them in a ZIP archive, and check that the deliverables meet the requested specifications.

中文简介正在准备中。当前显示英语简介。

  • Export a master track with separate audio parts
  • Apply filters and reverb to audio
  • Check duration and format across deliverables
HKUDS/OpenSpace77562026年8月13日 更新

Keep document creation moving when web searches and page retrieval repeatedly fail. The skill preserves the original task, uses the model’s existing knowledge, and clearly identifies information that could not be checked against external sources.

中文简介正在准备中。当前显示英语简介。

  • Continue drafting after repeated web retrieval failures
  • Preserve task requirements during network errors
  • Mark information that could not be externally verified
HKUDS/OpenSpace77562026年8月13日 更新

When Python execution repeatedly fails in execute_code_sandbox, use a file-based alternative: save the script, run it through the shell, and capture results or errors. The guidance covers paths, imports, timeouts, structured output, and optional cleanup.

中文简介正在准备中。当前显示英语简介。

  • Retry Python work through the shell after repeated sandbox failures
  • Run longer tasks with an adjusted timeout
  • Execute Python work that needs multiple files or system utilities
HKUDS/OpenSpace77562026年8月13日 更新

查看 HKUDS 的全部技能

报告此技能的问题