| name | web-research |
| description | Use when the user asks to research a topic on the web, gather information from multiple sources, do a literature scan, summarize recent developments on a subject, or look up articles. Triggers on requests like "่ฐ็ X", "ๆพๅ ็ฏๅ
ณไบ Y ็ๆ็ซ ", "research Z", "ๆฑๆป Q ็่ตๆ", "look up the latest on W". Do NOT use for single-URL fetches with no research framing (use the defuddle skill directly), local file operations, code edits, or tasks that do not need web data. |
| license | Apache-2.0 |
| compatibility | Requires Python 3.8+. Defuddle CLI is optional but strongly recommended. Network access to https://api.tavily.com required. |
| metadata | {"author":"stevenjj33","version":"0.1.0"} |
web-research
End-to-end web research pipeline: search โ fetch with a free-first cascade โ summarise.
Tool routing policy
Search (find candidate URLs): Tavily /search (keyless by default). Defuddle is not a search engine and is not used here.
Fetch (one URL โ clean markdown): cascade in this order, stop at first success.
- defuddle (CLI, fully free, no rate limit) โ preferred when installed. Skip entirely if
command -v defuddle returns non-zero. Do not install defuddle automatically; tell the user once if it is missing.
- Tavily
/extract (keyless, free but rate-limited) โ fallback when defuddle is missing or fails on a URL. Header X-Tavily-Access-Mode: keyless is sent by scripts/tavily_extract.py.
- mcode in-app browser (MiniMax Code's built-in browser, "Browser Use") โ last resort for login-walled, JS-rendered, or Cloudflare-protected pages that the two layers above cannot parse. The pipeline writes a
<!-- needs mcode browser: <url> --> marker; the model sees the marker and re-fetches that URL with the browser tool.
Each output file is named NN-<slug>.md and prefixed by a tag noting which layer produced it ([defuddle], [tavily extract], or [browser required]).
Default flow
If the user did not specify constraints, run the full pipeline in one shot:
python3 scripts/research.py "<query>" 5 ./research-output
The script returns non-zero if Tavily search itself failed; partial URL failures are surfaced as [browser required] markers inside the output directory, not as script errors.
Step-by-step (when the user wants control)
-
Search for URLs only:
python3 scripts/tavily_search.py --query "<query>" --max-results 5 --format brave
Output is JSON {query, answer, results:[{title,url,snippet}]}.
-
Fetch one URL with the cascade (the script picks the layer based on availability):
defuddle parse "<url>" --md -o "<out>.md"
python3 scripts/tavily_extract.py --url "<url>" --output "<out>.md"
-
Combine the resulting markdown files into a short summary at the end.
Failure handling
- Tavily keyless rate limit hit (HTTP 429 or quota message): surface the message to the user, suggest setting
TAVILY_API_KEY for higher limits, and continue. The script does not auto-retry.
- defuddle missing: print a one-time notice at the start of
research.py output (to stderr), then continue to Tavily extract for every URL. Do not install defuddle.
- defuddle fails on a single URL (SPA, login, paywall): fall through to Tavily extract for that URL.
- Tavily extract fails: write a
<!-- needs mcode browser: <url> --> marker file and continue. The model re-fetches with the browser tool only if the user cares about that URL.
- All three layers fail: leave the marker in place; do not loop.
Examples
- "่ฐ็ ไธไธๅ้ๆฐๆฎๅบ็ๆๆฐ่ฟๅฑ" โ
python3 scripts/research.py "ๅ้ๆฐๆฎๅบ ๆๆฐ่ฟๅฑ" 5 ./research-output
- "Find three articles on Rust async runtimes" โ
python3 scripts/research.py "Rust async runtime comparison" 3 ./research-output
- "Look up the population of Tokyo" โ no need for this Skill; the model should answer directly from training data or use a single Tavily search.
Files
scripts/research.py โ the one-shot pipeline (search โ cascade fetch โ tag outputs). Python, no bash dependency.
scripts/tavily_search.py โ Tavily /search in keyless mode. Single Python file, stdlib only.
scripts/tavily_extract.py โ Tavily /extract in keyless mode. Single Python file, stdlib only.
No native binaries. No symlinks. No secrets in tree. TAVILY_API_KEY is read from the environment only and never logged.