343195246/mdgs-tavily-search-skill/SKILL.md
使用 Tavily API 进行网络搜索、网页内容提取、抓取、映射和研究。当用户需要搜索信息、获取网页内容、从网站抓取数据、绘制网站地图或进行深度研究时使用此技能。AI 应根据任务自动选择最合适的模式。
npx skillsauth add openclaw/skills mdgs-tavily-search-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
使用 Tavily API 进行网络搜索和信息提取。
首先安装依赖:
npm install @tavily/core
设置 API Key:
export TAVILY_API_KEY="tvly-your-api-key"
const { tavily } = require("@tavily/core");
const apiKey = process.env.TAVILY_API_KEY;
if (!apiKey) {
throw new Error("请配置 TAVILY_API_KEY 环境变量。访问 https://tavily.com 获取 API Key");
}
const tvly = tavily({ apiKey });
AI 应根据任务类型自动选择合适的模式:
| 任务类型 | 推荐模式 | 说明 | |---------|---------|------| | 快速问答、信息检索 | search | 获取搜索结果和答案 | | 获取特定网页内容 | extract | 提取单个 URL 的主要内容 | | 批量抓取网站内容 | crawl | 抓取整个网站或多个页面 | | 了解网站结构 | map | 获取网站的页面地图 | | 深度研究主题 | research | 综合多个来源的深度研究 |
适用于:快速问答、信息检索、新闻搜索
const response = await tvly.search("Who is Leo Messi?");
console.log(response);
选项:
const response = await tvly.search("Python 教程", {
searchDepth: "basic", // "basic" 或 "advanced"
maxResults: 10,
includeAnswer: true,
includeRawContent: false,
includeImages: false
});
适用于:获取特定网页的详细内容
const response = await tvly.extract("https://en.wikipedia.org/wiki/Artificial_intelligence");
console.log(response);
选项:
const response = await tvly.extract("https://example.com", {
includeImages: true
});
适用于:批量抓取网站内容、深度内容获取
const response = await tvly.crawl("https://docs.tavily.com", {
instructions: "Find all pages on the Python SDK"
});
console.log(response);
选项:
const response = await tvly.crawl("https://example.com", {
instructions: "提取所有产品页面",
maxDepth: 2,
maxPages: 10
});
适用于:了解网站结构、发现相关页面
const response = await tvly.map("https://docs.tavily.com");
console.log(response);
选项:
const response = await tvly.map("https://example.com", {
depth: 2,
maxPages: 20
});
适用于:深度研究、综合多来源分析
const response = await tvly.research("What are the latest developments in AI?");
console.log(response);
选项:
const response = await tvly.research("最新 AI 发展动态", {
depth: "extensive", // "basic" 或 "extensive"
maxSources: 10
});
项目提供了封装好的脚本:
node scripts/tavily.js search "搜索内容" [--depth basic|advanced] [--max-results N]
node scripts/tavily.js extract "https://example.com"
node scripts/tavily.js crawl "https://example.com" --instructions "提取所有页面"
node scripts/tavily.js map "https://example.com" [--depth N]
node scripts/tavily.js research "研究主题" [--depth basic|extensive]
重要: 使用此技能前必须配置 API Key。
export TAVILY_API_KEY="tvly-your-actual-api-key"
或在脚本/代码中直接传入:
const tvly = tavily({ apiKey: "tvly-your-actual-api-key" });
{
"answer": "回答文本",
"results": [{ "title": "", "url": "", "content": "", "score": 0.95 }],
"images": []
}
{
"results": [{ "url": "", "content": "", "raw_content": "" }]
}
{
"results": [{ "url": "", "content": "" }]
}
{
"results": [{ "url": "", "title": "" }]
}
{
"answer": "综合研究报告",
"findings": [{ "content": "", "sources": [] }]
}
tools
Use when the user wants to connect to, test, or use the McDonalds service at mcp.mcd.cn, including checking authentication, probing MCP endpoints, listing tools, or calling McDonalds MCP tools through a reusable local CLI.
development
Web scraping platform — Twitter/X data, Vinted marketplace, and general web scraping API
development
SlowMist AI Agent Security Review — comprehensive security framework for skills, repositories, URLs, on-chain addresses, and products (Claude Code version)
data-ai
去除中文文本中的 AI 写作痕迹,使其读起来自然。基于维基百科 AI 写作特征指南,检测 24 种 AI 模式。触发词:humanizer-cn、去除 AI 痕迹、去除 AI 写作痕迹、中文文本人性化。