web-search-tavily by jwynia/agent-skills
npx skills add https://github.com/jwynia/agent-skills --skill web-search-tavily使用 Tavily 的 AI 优化搜索 API 搜索网络。返回高质量、结构化的结果,包含相关性分数和可选的 AI 生成摘要。
注意: 此技能需要 Tavily API 密钥。如需使用代理内置功能进行基本网络搜索,请参阅 web-search。
在以下情况使用此技能:
在以下情况请不要使用此技能:
使用此技能前,请确保:
在以下网址获取 Tavily API 密钥:https://tavily.com
运行一个简单的搜索:
deno run --allow-env --allow-net=api.tavily.com scripts/search.ts "your search query"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
包含 AI 生成答案的示例:
deno run --allow-env --allow-net=api.tavily.com scripts/search.ts "React 19 new features" --answer
deno run --allow-env --allow-net=api.tavily.com scripts/search.ts [options] "query"
| 选项 | 描述 | 默认值 |
|---|---|---|
--answer | 包含 AI 生成的答案摘要 | false |
--depth <level> | 搜索深度:basic 或 advanced | basic |
--results <n> | 要返回的结果数量 | 5 |
--topic <type> | 主题类型:general、news 或 finance | general |
--time <range> | 时间过滤器:day、week、month 或 year | none |
--include <domains> | 仅包含这些域名(逗号分隔) | none |
--exclude <domains> | 排除这些域名(逗号分隔) | none |
--raw | 在结果中包含原始页面内容 | false |
--json | 以 JSON 格式输出(供编程使用) | false |
--help | 显示帮助信息 | - |
按新近度筛选结果:
控制结果中显示哪些网站:
# 仅搜索文档网站
scripts/search.ts "React hooks" --include docs.react.dev,developer.mozilla.org
# 排除社交媒体
scripts/search.ts "AI news" --exclude twitter.com,reddit.com
🔍 搜索:"React 19 new features"
在 234ms 内找到 5 个结果
📝 AI 答案:
────────────────────────────────────────────────────────────
React 19 引入了多项新功能,包括...
────────────────────────────────────────────────────────────
1. React 19 发布说明
https://react.dev/blog/2024/04/25/react-19
React 19 现已可在 npm 上获取!此版本包含...
分数:0.987
2. React 19 的新功能
https://example.com/react-19-features
全面概述了 React 19 的新功能...
分数:0.945
{
"query": "React 19 new features",
"results": [
{
"title": "React 19 Release Notes",
"url": "https://react.dev/blog/2024/04/25/react-19",
"content": "React 19 is now available on npm...",
"score": 0.987,
"published_date": "2024-04-25"
}
],
"answer": "React 19 introduces several new features...",
"response_time": 234
}
| 字段 | 类型 | 描述 |
|---|---|---|
title | string | 页面标题 |
url | string | 来源 URL |
content | string | 页面相关摘录 |
score | number | 相关性分数(0-1,越高越好) |
published_date | string | 发布日期(如果可用) |
raw_content | string | 完整页面内容(仅在使用 --raw 时) |
场景:查找关于某个技术主题的最新新闻
scripts/search.ts "OpenAI GPT-5 announcement" --topic news --time week --answer
预期输出:关于 GPT-5 的最新新闻文章,以及 AI 生成的摘要
场景:查找特定的技术文档
scripts/search.ts "Deno deploy edge functions tutorial" --depth advanced --results 10
预期输出:来自文档和教程网站的全面结果
场景:验证特定的声明或统计数据
scripts/search.ts "world population 2024" --include un.org,worldbank.org,census.gov --json
预期输出:来自权威来源的 JSON 结果,用于编程验证
场景:研究市场信息
scripts/search.ts "NVIDIA stock analysis 2024" --topic finance --answer
预期输出:金融分析和市场数据,附带 AI 摘要
症状:脚本立即退出并显示 API 密钥错误
解决方案:
从 https://tavily.com 获取 API 密钥
设置环境变量:
export TAVILY_API_KEY="your-api-key-here"
或者以内联方式运行:
TAVILY_API_KEY="your-key" deno run --allow-env --allow-net=api.tavily.com scripts/search.ts "query"
症状:401 身份验证错误
解决方案:
症状:429 错误响应
解决方案:
症状:结果数组为空
解决方案:
--depth advanced此技能具有以下限制:
每周安装次数
742
代码仓库
GitHub 星标数
37
首次出现
Jan 20, 2026
安全审计
安装于
opencode680
codex664
gemini-cli662
cursor656
github-copilot651
amp631
Search the web using Tavily's AI-optimized search API. Returns high-quality, structured results with relevance scores and optional AI-generated summaries.
Note: This skill requires a Tavily API key. For basic web search using the agent's built-in capability, see web-search.
Use this skill when:
Do NOT use this skill when:
Before using this skill, ensure:
Get a Tavily API key at: https://tavily.com
Run a simple search:
deno run --allow-env --allow-net=api.tavily.com scripts/search.ts "your search query"
Example with AI-generated answer:
deno run --allow-env --allow-net=api.tavily.com scripts/search.ts "React 19 new features" --answer
deno run --allow-env --allow-net=api.tavily.com scripts/search.ts [options] "query"
| Option | Description | Default |
|---|---|---|
--answer | Include AI-generated answer summary | false |
--depth <level> | Search depth: basic or advanced | basic |
--results <n> | Number of results to return | 5 |
--topic <type> | Topic type: general, , or |
Filter results by recency:
Control which sites appear in results:
# Only search documentation sites
scripts/search.ts "React hooks" --include docs.react.dev,developer.mozilla.org
# Exclude social media
scripts/search.ts "AI news" --exclude twitter.com,reddit.com
🔍 Search: "React 19 new features"
Found 5 results in 234ms
📝 AI Answer:
────────────────────────────────────────────────────────────
React 19 introduces several new features including...
────────────────────────────────────────────────────────────
1. React 19 Release Notes
https://react.dev/blog/2024/04/25/react-19
React 19 is now available on npm! This release includes...
Score: 0.987
2. What's New in React 19
https://example.com/react-19-features
A comprehensive overview of React 19's new features...
Score: 0.945
{
"query": "React 19 new features",
"results": [
{
"title": "React 19 Release Notes",
"url": "https://react.dev/blog/2024/04/25/react-19",
"content": "React 19 is now available on npm...",
"score": 0.987,
"published_date": "2024-04-25"
}
],
"answer": "React 19 introduces several new features...",
"response_time": 234
}
| Field | Type | Description |
|---|---|---|
title | string | Page title |
url | string | Source URL |
content | string | Relevant excerpt from the page |
score | number | Relevance score (0-1, higher is better) |
published_date | string | Publication date (if available) |
Scenario : Find recent news about a technology topic
scripts/search.ts "OpenAI GPT-5 announcement" --topic news --time week --answer
Expected output : Recent news articles about GPT-5, with an AI-generated summary
Scenario : Find specific technical documentation
scripts/search.ts "Deno deploy edge functions tutorial" --depth advanced --results 10
Expected output : Comprehensive results from documentation and tutorial sites
Scenario : Verify a specific claim or statistic
scripts/search.ts "world population 2024" --include un.org,worldbank.org,census.gov --json
Expected output : JSON results from authoritative sources for programmatic verification
Scenario : Research market information
scripts/search.ts "NVIDIA stock analysis 2024" --topic finance --answer
Expected output : Financial analysis and market data with AI summary
Symptoms : Script exits immediately with API key error
Solution :
Get an API key from https://tavily.com
Set the environment variable:
export TAVILY_API_KEY="your-api-key-here"
Or run with the variable inline:
TAVILY_API_KEY="your-key" deno run --allow-env --allow-net=api.tavily.com scripts/search.ts "query"
Symptoms : 401 authentication error
Solution :
Symptoms : 429 error response
Solution :
Symptoms : Empty results array
Solution :
--depth advanced for harder queriesThis skill has the following limitations:
Weekly Installs
742
Repository
GitHub Stars
37
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode680
codex664
gemini-cli662
cursor656
github-copilot651
amp631
AI 代码实施计划编写技能 | 自动化开发任务分解与 TDD 流程规划工具
40,200 周安装
Dev Browser:JavaScript沙盒化浏览器控制CLI工具 - 自动化测试与爬虫开发利器
689 周安装
CTF Pwn 二进制漏洞利用技术大全 - 栈溢出、ROP、格式化字符串、内核利用实战指南
690 周安装
Supabase技能创建器指南:构建高效AI技能模块,扩展Claude能力
691 周安装
React 测试命令:运行 Facebook React 代码库测试的完整指南
692 周安装
Apollo Server 5.x 指南:开源GraphQL服务器安装、集成与快速入门教程
693 周安装
产品调查问卷设计指南:9位专家框架,NPS替代方案与MaxDiff优先级排序
693 周安装
newsfinance| general |
--time <range> | Time filter: day, week, month, or year | none |
--include <domains> | Only include these domains (comma-separated) | none |
--exclude <domains> | Exclude these domains (comma-separated) | none |
--raw | Include raw page content in results | false |
--json | Output as JSON (for programmatic use) | false |
--help | Show help message | - |
raw_content | string | Full page content (only with --raw) |