S

search

by @tavily-aiv
4.5(476)

该技能用于网络搜索,获取与大型语言模型(LLM)消费优化的相关结果,无需手动设置,首次运行时通过OAuth进行认证。

Search EnginesInformation RetrievalElasticsearchAlgoliaVector SearchGitHub
安装方式
npx skills add tavily-ai/skills --skill search
compare_arrows

Before / After 效果对比

1
使用前

为大型语言模型(LLM)提供相关的网络搜索结果,通常需要开发者手动配置复杂的搜索API,处理认证流程,并对结果进行筛选和格式化,过程繁琐且耗时,难以快速集成到LLM应用中。

使用后

search技能简化了LLM的网络搜索集成。它无需手动设置,首次运行时通过OAuth认证,即可自动获取与LLM消费优化的相关结果。这极大地加速了LLM应用开发,提升了信息获取效率。

description SKILL.md

search

Search Skill

Search the web and get relevant results optimized for LLM consumption.

Authentication

The script uses OAuth via the Tavily MCP server. No manual setup required - on first run, it will:

  • Check for existing tokens in ~/.mcp-auth/

  • If none found, automatically open your browser for OAuth authentication

Note: You must have an existing Tavily account. The OAuth flow only supports login — account creation is not available through this flow. Sign up at tavily.com first if you don't have an account.

Alternative: API Key

If you prefer using an API key, get one at https://tavily.com and add to ~/.claude/settings.json:

{
  "env": {
    "TAVILY_API_KEY": "tvly-your-api-key-here"
  }
}

Quick Start

Using the Script

./scripts/search.sh '<json>'

Examples:

# Basic search
./scripts/search.sh '{"query": "python async patterns"}'

# With options
./scripts/search.sh '{"query": "React hooks tutorial", "max_results": 10}'

# Advanced search with filters
./scripts/search.sh '{"query": "AI news", "time_range": "week", "max_results": 10}'

# Domain-filtered search
./scripts/search.sh '{"query": "machine learning", "include_domains": ["arxiv.org", "github.com"], "search_depth": "advanced"}'

Basic Search

curl --request POST \
  --url https://api.tavily.com/search \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "query": "latest developments in quantum computing",
    "max_results": 5
  }'

Advanced Search

curl --request POST \
  --url https://api.tavily.com/search \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "query": "machine learning best practices",
    "max_results": 10,
    "search_depth": "advanced",
    "include_domains": ["arxiv.org", "github.com"]
  }'

API Reference

Endpoint

POST https://api.tavily.com/search

Headers

Header Value

Authorization Bearer <TAVILY_API_KEY>

Content-Type application/json

Request Body

Field Type Default Description

query string Required Search query (keep under 400 chars)

max_results integer 10 Maximum results (0-20)

search_depth string "basic" ultra-fast, fast, basic, advanced

topic string "general" Search topic (general only)

time_range string null day, week, month, year

start_date string null Return results after this date (YYYY-MM-DD)

end_date string null Return results before this date (YYYY-MM-DD)

include_domains array [] Domains to include (max 300)

exclude_domains array [] Domains to exclude (max 150)

country string null Boost results from a specific country (general topic only)

include_raw_content boolean false Include full page content

include_images boolean false Include image results

include_image_descriptions boolean false Include descriptions for images

include_favicon boolean false Include favicon URL for each result

Response Format

{
  "query": "latest developments in quantum computing",
  "results": [
    {
      "title": "Page Title",
      "url": "https://example.com/page",
      "content": "Extracted text snippet...",
      "score": 0.85
    }
  ],
  "response_time": 1.2
}

Search Depth

Depth Latency Relevance Content Type

ultra-fast Lowest Lower NLP summary

fast Low Good Chunks

basic Medium High NLP summary

advanced Higher Highest Chunks

When to use each:

  • ultra-fast: Real-time chat, autocomplete

  • fast: Need chunks but latency matters

  • basic: General-purpose, balanced

  • advanced: Precision matters (default recommendation)

Examples

Domain-Filtered Search

curl --request POST \
  --url https://api.tavily.com/search \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "query": "Python async best practices",
    "include_domains": ["docs.python.org", "realpython.com", "github.com"],
    "search_depth": "advanced"
  }'

Search with Full Content

curl --request POST \
  --url https://api.tavily.com/search \
  --header "Authorization: Bearer $TAVILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "query": "React hooks tutorial",
    "max_results": 3,
    "include_raw_content": true
  }'

Tips

  • Keep queries under 400 characters - Think search query, not prompt

  • Break complex queries into sub-queries - Better results than one massive query

  • Use include_domains to focus on trusted sources

  • Use time_range for recent information

  • Filter by score (0-1) to get highest relevance results

Weekly Installs11.8KRepositorytavily-ai/skillsGitHub Stars95First SeenJan 25, 2026Security AuditsGen Agent Trust HubWarnSocketPassSnykWarnInstalled onopencode11.1Kgemini-cli10.9Kcodex10.9Kgithub-copilot10.8Kkimi-cli10.6Kamp10.6K

forum用户评价 (0)

发表评价

效果
易用性
文档
兼容性

暂无评价

统计数据

安装量11.9K
评分4.5 / 5.0
版本
更新日期2026年4月27日
对比案例1 组

用户评分

4.5(476)
5
36%
4
49%
3
14%
2
1%
1
0%

为此 Skill 评分

0.0

兼容平台

🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI

时间线

创建2026年3月17日
最后更新2026年4月27日
🎁 Agent 知识卡片