๐ŸŽ Get the FREE AI Skills Starter Guide โ€” Subscribe โ†’
BytesAgainBytesAgain
๐Ÿฆ€ ClawHub

Deep Research ๐Ÿ”ฌ

by @wyatt88

Deep web research with multi-round search, cross-verification, and structured reports with citations. Enhances web_search and web_fetch into a full research...

Versionv2.0.0
Downloads383
TERMINAL
clawhub install research-dive

๐Ÿ“– About This Skill


name: deep-research description: >- Deep web research with multi-round search, cross-verification, and structured reports with citations. Enhances web_search and web_fetch into a full research workflow. Use when: user asks to research a topic in depth, investigate something thoroughly, compare options with evidence, write a research report, or needs more than a simple search answer. Trigger phrases: "research", "deep dive", "investigate", "่ฐƒ็ ”", "ๆทฑๅบฆๆœ็ดข", "ๅธฎๆˆ‘็ ”็ฉถ", "่ฏฆ็ป†ไบ†่งฃไธ€ไธ‹", "ๅฏนๆฏ”ๅˆ†ๆž", "compare X vs Y", "what are the pros and cons of", "็ปผๅˆๅˆ†ๆž". NOT for: simple factual lookups ("what's the capital of France"), real-time data (stock prices, live scores), or browsing/interacting with a specific website (use browser). metadata: openclaw: emoji: "๐Ÿ”ฌ"

Deep Research ๐Ÿ”ฌ

Multi-round web research with question decomposition, cross-verification, and structured reports with numbered citations.

Architecture

Three-step agent-assisted pipeline. No external API keys needed โ€” uses OpenClaw built-in web_search and web_fetch tools.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  plan    โ”‚ โ”€โ”€โ–ถ โ”‚ analyze  โ”‚ โ”€โ”€โ–ถ โ”‚ report   โ”‚
โ”‚ (่„šๆœฌ)   โ”‚     โ”‚ (่„šๆœฌ)    โ”‚     โ”‚ (่„šๆœฌ)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚ search_        โ”‚ fetch_         โ”‚
     โ”‚ commands       โ”‚ commands       โ”‚ report
     โ–ผ                โ–ผ                โ–ผ skeleton
  Agent ๆ‰ง่กŒ       Agent ๆ‰ง่กŒ       Agent ๅกซๅ……
  web_search      web_fetch        ๅˆ†ๆžๅ†…ๅฎน

Script path: scripts/research.py (relative to this skill directory)

Workflow

Step 1: Plan โ€” ็”Ÿๆˆๆœ็ดขๆŒ‡ไปค

python3 scripts/research.py plan "topic" --depth standard

Output JSON contains search_commands โ€” a list of web_search tool calls. Agent executes each one and collects results into a JSON array:

[
  {"query": "...", "results": [{"title": "...", "url": "...", "snippet": "..."}, ...]},
  ...
]

Save to a temp file (e.g., /tmp/search-results.json).

Step 2: Analyze โ€” ๅŽป้‡ๆŽ’ๅบ + ็”Ÿๆˆ fetch ๆŒ‡ไปค

python3 scripts/research.py analyze /tmp/search-results.json --top 8

Output JSON contains:

  • selected_sources: Deduplicated, tier-sorted source list
  • fetch_commands: web_fetch tool calls for top URLs
  • summary: Human-readable source overview
  • Agent executes each web_fetch and collects results into a JSON array:

    [
      {"url": "...", "text": "extracted content...", "length": 12345},
      ...
    ]
    

    Save to /tmp/fetch-results.json.

    Step 3: Report โ€” ็”ŸๆˆๆŠฅๅ‘Š้ชจๆžถ

    python3 scripts/research.py report \
      --topic "topic" \
      --search /tmp/search-analysis.json \
      --fetch /tmp/fetch-results.json \
      --depth standard --save
    

    Output: Markdown report with {FILL: ...} placeholders. Agent reads the Source Content section and fills in analysis.

    Depth Levels

    Auto-detect from query complexity, or user specifies.

    Quick โšก (โ‰ค30s)

  • --depth quick โ†’ 1 sub-question, 2 fetches
  • Agent may skip the script entirely for trivial queries
  • Output: IM message only (โ‰ค2000 chars)
  • Standard ๐Ÿ” (2-3 min)

  • --depth standard โ†’ 4-5 sub-questions, 8 fetches
  • Full 3-step pipeline
  • Output: IM summary + full report saved to research/
  • Deep ๐Ÿ”ฌ (5-10 min)

  • --depth deep โ†’ 7 sub-questions (includes contrarian), 15 fetches
  • Spawn sub-agents for parallel search:
  •   sessions_spawn:
        mode: run
        task: |
          Execute these web_search calls: {subset of search_commands}
          Return results as JSON array.
      
  • Main agent runs analyze + report after collecting all results
  • Output: IM summary + comprehensive report (2000-5000 words)
  • User overrides: "ๅฟซ้€Ÿๆœไธ€ไธ‹" โ†’ Quick, "่ฏฆ็ป†็ ”็ฉถ" โ†’ Standard, "ๆทฑๅบฆ่ฐƒ็ ”" โ†’ Deep

    Source Authority Tiers

    Script auto-classifies:

  • Tier 1 ๐ŸŸข Official docs, .gov/.edu, arxiv, RFCs
  • Tier 2 ๐ŸŸก Major tech blogs, Stack Overflow, vendor blogs
  • Tier 3 ๐ŸŸ  Personal blogs, Medium, forum posts
  • Tier 4 ๐Ÿ”ด AI-generated, marketing landing pages
  • Cross-Verification (Standard & Deep)

    After report skeleton is generated, agent verifies:

  • Source diversity: โ‰ฅ3 independent sources?
  • Recency: Prefer last 12 months; flag outdated
  • Conflicts: When sources disagree, present both with tier labels
  • If gaps found โ†’ run additional web_search + web_fetch โ†’ append
  • Report Output

    IM Summary

    ๐Ÿ”ฌ Research: {topic}

    {2-4 paragraph summary}

    Key takeaways:

  • Finding 1 [1][2]
  • Finding 2 [3]
  • ๐Ÿ“Š Confidence: {๐ŸŸข/๐ŸŸก/๐Ÿ”ด} ๐Ÿ“„ Full report: research/{slug}-{date}.md

    Full Report

    Saved to research/{topic-slug}-{YYYYMMDD}.md with:

  • Executive Summary
  • Key Findings (per sub-topic)
  • Conflicting Information
  • Confidence Assessment table
  • Numbered Sources with tier labels
  • Research Log
  • Progress Feedback

  • Quick: No progress messages
  • Standard: One mid-point: "๐Ÿ” ๅทฒๆœ็ดข N ่ฝฎ๏ผŒๆ‰พๅˆฐ M ๆฅๆบ๏ผŒๆญฃๅœจๆŠ“ๅ–..."
  • Deep: Per sub-agent updates
  • Edge Cases

  • Too broad: Ask user to narrow; suggest 3-4 angles
  • No results: Try ENโ†”CN keywords, then report honestly
  • Rate limits (429): Wait 5s + retry; fallback to web_fetch on known URLs
  • Large topics: Summarize each round to โ‰ค500 chars before next
  • Language

  • Match user's language for report
  • Auto-add cross-language search (EN topic โ†’ add 1 CN query; CN โ†’ add 1 EN)
  • Chinese: ใ€Œใ€็›ด่ง’ๅผ•ๅทใ€โ€”โ€”ๅ…จ็ ดๆŠ˜ๅทใ€๏ผšๅ…จ่ง’ๅ†’ๅท