联网搜索 logo

联网搜索

Community
lyxhnu
联网搜索

使用 Tavily 联网搜索最新信息、官方文档、新闻动态、实时行情和外部事实来源。适用于用户明确要求搜索、联网、查官网、给链接、核验事实,或任务明显依赖实时外部信息的场景。优先调用本技能目录下的 Tavily 脚本,不要退回抓搜索结果页。

Overview

Publisherlyxhnu
RepositorySkill-First-Hybrid-RAG
Skill name联网搜索
Stars
95
Forks
15
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by lyxhnu on GitHub. Read the source before you install it.

Installation

Install the 联网搜索 AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/lyxhnu/Skill-First-Hybrid-RAG/tree/main/backend/skills/web-search
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lyxhnu/Skill-First-Hybrid-RAG.git /tmp/Skill-First-Hybrid-RAG
mkdir -p .claude/skills
cp -r /tmp/Skill-First-Hybrid-RAG/backend/skills/web-search .claude/skills/lyxhnu-3
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable 联网搜索 in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads 联网搜索 on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so 联网搜索 is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

目标

用 Tavily Search API 返回可追溯的联网结果,并给出带来源链接和时间说明的中文结论。

必备前提

  • 环境变量 TAVILY_API_KEY 必须存在。
  • 默认使用这个脚本发起搜索:
powershell
python skills/web-search/scripts/tavily_search.py --query "查询词"
  • 如果 TAVILY_API_KEY 缺失、鉴权失败、限流或 API 报错,要明确说明失败原因。
  • 不要假装联网成功,也不要偷偷切换到其他搜索引擎。

查询策略

  1. 先把用户问题压缩成 1 个主查询,尽量控制在 400 个字符以内。
  2. 复杂问题拆成多个子查询,不要把多个主题塞进一个长 prompt。
  3. 按场景选择 topic:
    • general:官网、文档、常规事实、产品信息
    • news:最新消息、今日动态、近期事件
    • finance:黄金价格、股票、汇率、财务或市场数据
  4. 默认用 search_depth=basic;只有在需要更高相关性或更细碎证据时才改 advanced。
  5. 对明显有时间性的查询,加 --time-range day|week|month|year。
  6. 对金融查询,优先把中文需求改写成英文 ticker、市场和计价单位。
    • 好于:今天黄金价格
    • 更推荐:XAU USD price today
    • 或:spot gold price USD per ounce
  7. 如果金融查询第一次结果为空,先把查询词改成英文 ticker 形式再重试一次。
  8. 对官方信息,优先加域名过滤:
    • --include-domain docs.langchain.com
    • --include-domain openai.com
  9. 如果用户要求来源可核验,优先选高分且权威的结果;必要时再用 fetch_url 直接抓取 Tavily 返回的 1 到 2 个链接正文。

推荐命令

官方文档

powershell
python skills/web-search/scripts/tavily_search.py --query "LangChain create_agent" --topic general --include-domain docs.langchain.com --max-results 3

最新动态

powershell
python skills/web-search/scripts/tavily_search.py --query "OpenAI API 最新更新" --topic news --time-range month --max-results 5

金融行情

powershell
python skills/web-search/scripts/tavily_search.py --query "XAU USD price today" --topic finance --time-range day --max-results 5

执行步骤

  1. 判断问题是否真的需要联网,以及是否属于 general / news / finance。
  2. 运行 Tavily 脚本,读取返回的 JSON。
  3. 优先关注:
    • results[].title
    • results[].url
    • results[].score
    • results[].published_date
    • results[].content
  4. 如果结果足够明确,直接整理答案并给出来源。
  5. 如果问题高风险、细节敏感,或多个结果冲突:
    • 先换更具体的查询词重试一次
    • 再用 fetch_url 抓取 Tavily 返回的候选 URL 正文核验
  6. 对“今天 / 最新 / 当前”这类查询,回答里必须写明本次查询日期或来源发布日期。

结果筛选规则

  • 不要只用第一条结果下结论。
  • 优先使用官方文档、官方公告、政府/学校/标准组织、主流一手媒体。
  • 如果多个来源冲突,优先最新且更权威的来源,并显式说明冲突。
  • 如果 Tavily 返回的是聚合页、SEO 页或低质量转载,换查询词或加域名过滤重试。

失败处理

  1. 如果脚本报 TAVILY_API_KEY is not set,明确说明是本地配置缺失。
  2. 如果返回 401/403,明确说明是 Tavily 鉴权失败。
  3. 如果返回 429,明确说明是 Tavily 限流或额度问题。
  4. 如果返回 5xx 或网络异常,明确说明是 Tavily 服务或链路问题。
  5. 如果结果不足以支持结论,只能说“本次 Tavily 搜索证据不足”,不要编造答案。

输出格式

推荐输出:

md
结论:...

依据:
1. ...
2. ...

来源:
- 标题 1: URL
- 标题 2: URL

时间说明:
- 查询时间:2026-03-10
- 或来源发布日期:2026-03-10

特别约束

  • 对明显会变化的信息,不要省略时间说明。
  • 对高风险信息,不要只引用二手总结页。
  • 对实时行情,优先使用 topic=finance 并给出市场或计价单位。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the 联网搜索 AI skill do?

使用 Tavily 联网搜索最新信息、官方文档、新闻动态、实时行情和外部事实来源。适用于用户明确要求搜索、联网、查官网、给链接、核验事实,或任务明显依赖实时外部信息的场景。优先调用本技能目录下的 Tavily 脚本,不要退回抓搜索结果页。

Why use 联网搜索 on TypingMind?

Because you install it once and use it with any model. 联网搜索 is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install 联网搜索 in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/lyxhnu/Skill-First-Hybrid-RAG/tree/main/backend/skills/web-search. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use 联网搜索?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with 联网搜索?

As many as you like. As long as a model supports skills, you can use 联网搜索 with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the 联网搜索 AI skill free?

It is published on GitHub by lyxhnu. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇