mcpField
E
exa-search

exa-search

github.com/tdimino生产力4149 次安装1 周前更新
代码仓库

关于 exa-search

为使用 Exa AI 搜索 API 的用户提供的搜索技能,包含网页搜索、内容提取、相似页面查找和研究脚本。支持筛选及结构化结果,适用于检索与资料研究。

主要功能

  1. 01神经网络网页搜索
  2. 02URL 内容提取与摘要
  3. 03查找相似页面
  4. 04带引用的 AI 研究
  5. 05异步专业研究与结构化输出

适用场景

  1. 01按域名和时间筛选网页结果
  2. 02提取指定页面并限制内容长度
  3. 03检索研究论文及相关页面
  4. 04构建带来源的研究或 RAG 上下文

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/tdimino/claude-code-minoan --skill exa-search

安装后在 Claude Code 中输入/exa-search确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

codex-agent-guide.md
README.md
references/
exa-scripts-reference.md
scripts/
exa_contents.py
exa_research_async.py
exa_research.py
exa_search.py
exa_similar.py
test_exa.py

详细介绍

Exa 搜索技能

Exa AI 搜索 API 的 5 个专用脚本——神经搜索、内容提取、相似页面、带引用的研究和异步深度研究。

前置条件:EXA_API_KEY 环境变量。前往 https://dashboard.exa.ai 获取密钥。

节省 Token 的搜索

灵感来自 Anthropic 的动态过滤——推理前务必先过滤。Token 用量减少约 24%,准确率提高约 11%。

原则:低成本搜索 → 过滤 → 有选择地提取 → 推理

应该:

# Step 1: Search with --no-text (titles/URLs only — cheapest)
python3 ~/.claude/skills/exa-search/scripts/exa_search.py "query" -n 20 --no-text

# Step 2: Evaluate titles, pick best 3-5 URLs

# Step 3: Extract only those URLs with bounded content
python3 ~/.claude/skills/exa-search/scripts/exa_contents.py URL1 URL2 --highlights --max-chars 3000

**不应该:**搜索 50 条结果的全文,然后对所有内容进行推理。

优先使用 API 级过滤器(免费过滤)

这些过滤器会在你看到结果之前,在 API 层面减少结果:

  • --must-include "term" — 结果必须包含此字符串
  • --must-exclude "term" — 移除不相关结果
  • --domains site1.com site2.com — 限定为权威来源
  • --category "research paper" — 排除不相关的内容类型
  • --after 2025-01-01 / --before — 按时间过滤
优先使用摘要,而非全文

需要了解大意而非原始内容时:

# AI-distilled summaries — much smaller than full text
python3 ~/.claude/skills/exa-search/scripts/exa_search.py "query" --summary "Key findings" -n 5
使用有界上下文进行 RAG
# Capped context string — prevents unbounded token usage
python3 ~/.claude/skills/exa-search/scripts/exa_search.py "query" --context --context-chars 5000
使用 filter_web_results.py 进行后处理

将 Exa JSON 输出通过 Firecrawl 过滤脚本,以进一步减少内容:

python3 ~/.claude/skills/exa-search/scripts/exa_search.py "query" --json | \
  python3 ~/.claude/skills/firecrawl/scripts/filter_web_results.py \
  --fields "title,url,text" --max-chars 3000
成本档位——根据任务选择
类型延迟每 1k 次成本适用场景
--instant<150ms最低实时查询、自动补全
--fast~500ms低快速检查、确认
auto(默认)--中通用搜索
--deep4-12s$12全面研究
--deep-reasoning12-50s$15最大深度 + 综合分析
结构化深度搜索(Exa Deep)

深度搜索和深度推理搜索支持通过 outputSchema 输出结构化 JSON。API 会在 output.content 中返回解析后的内容,并提供逐字段的依据引用和置信度评分。

快速示例用途
... --deep --text-output "Short answer"简短的文本回答
... --deep-reasoning --schema-preset company结构化公司研究
... --deep --output-schema '{"type":"object","properties":{"answer":{"type":"string"}}}'自定义架构
... --deep --schema-file ~/schemas/analysis.json从文件加载架构

预设:company、paper-survey、competitor-analysis、person、news-digest

输出包含字段级依据:逐字段引用,并标注 [H]高/[M]中/[L]低置信度。


可用脚本

1. exa_search.py — 神经网络网页搜索
python3 ~/.claude/skills/exa-search/scripts/exa_search.py "query" [options]
快速示例用途
... exa_search.py "AI frameworks"基本搜索
... exa_search.py "transformers" --category "research paper" -n 20学术论文
... exa_search.py "query" --deep --additional-queries "alt query"深度搜索
... exa_search.py "query" --domains docs.python.org按域名过滤
... exa_search.py "query" --after 2025-01-01 --category news最新新闻
... exa_search.py "query" --context --context-chars 10000RAG 上下文
... exa_search.py "query" --instant -n 5150ms 以内的查询
... exa_search.py "Top AI startups" --deep-reasoning --schema-preset company结构化公司研究
... exa_search.py "Who is CEO of Stripe?" --deep --text-output "Short answer"快速事实查询

**类别:**company、research paper、news、pdf、github、personal site、people、financial report

2. exa_contents.py — URL 内容提取
python3 ~/.claude/skills/exa-search/scripts/exa_contents.py URL [URL2...] [options]
快速示例用途
... exa_contents.py "https://arxiv.org/abs/2307.06435"提取论文
... exa_contents.py URL --summary "Key methods" --highlights提取并生成摘要
... exa_contents.py URL --livecrawl always获取最新内容
... exa_contents.py URL --max-chars 5000限长提取
3. exa_similar.py — 查找相似页面
python3 ~/.claude/skills/exa-search/scripts/exa_similar.py URL [options]
快速示例用途
... exa_similar.py "https://stripe.com" --category company --exclude-source查找竞争对手
... exa_similar.py "https://arxiv.org/abs/..." -n 15相关论文
... exa_similar.py URL --summary "How different?"生成对比摘要
4. exa_research.py — AI 驱动的研究
python3 ~/.claude/skills/exa-search/scripts/exa_research.py "question" [options]
快速示例用途
... exa_research.py "React vs Vue differences?" --sources研究并附上引用
... exa_research.py "query" --stream实时流式输出
... exa_research.py "query" --domains docs.python.org权威来源
... exa_research.py "query" --markdownMarkdown 格式并附上引用
... exa_research.py "query" --answer-only适合管道处理的输出
5. exa_research_async.py — 异步专业研究
python3 ~/.claude/skills/exa-search/scripts/exa_research_async.py "question" [options]
快速示例用途
... exa_research_async.py "Compare AI frameworks" --pro --wait专业模型
... exa_research_async.py "Quick overview" --fast快速模型
... exa_research_async.py "query" --schema '{...}'结构化输出
... exa_research_async.py status r_abc123检查任务
... exa_research_async.py list列出任务

脚本选择指南

任务最佳脚本
带筛选条件的网页搜索exa_search.py
研究论文exa_search.py --category "research paper"
公司/初创公司信息exa_search.py --category company
GitHub 仓库/代码exa_search.py --category github
提取已知 URL 的内容exa_contents.py
查找竞争对手exa_similar.py --exclude-source
获取带引用的快速答案exa_research.py --sources
复杂的结构化研究exa_research_async.py --pro
实时搜索exa_search.py --instant
构建 RAG 上下文exa_search.py --context
带依据的结构化研究exa_search.py --deep-reasoning --schema-preset company
快速事实性答案exa_search.py --deep --text-output "Short answer"

Exa、Firecrawl 与 Claude 原生工具对比

需求最佳工具原因
语义/神经搜索Exa exa_search.pyAI 驱动的相关性排序
查找研究论文Exa --category "research paper"学术索引
获取快速研究答案Exa exa_research.py引用 + 综合整理
查找相似页面Exa exa_similar.py语义相似度
单个页面 → MarkdownFirecrawl scrape --only-main-content输出最简洁
抓取整个网站Firecrawl crawl --wait --progress跟踪链接
自主查找数据Firecrawl agent无需 URL
组合搜索与抓取Firecrawl search --scrape一次操作完成
构建 Claude API Agent原生 web_search_20260209内置动态筛选
Twitter/X 内容jina URL唯一可用的工具

常见工作流

研究主题
python3 ~/.claude/skills/exa-search/scripts/exa_research.py "How does RAG work?" --sources --markdown
文献综述
# Find papers, then find similar to best hit
python3 ~/.claude/skills/exa-search/scripts/exa_search.py "transformer optimization" --category "research paper" -n 20 --summary "Key contributions"
python3 ~/.claude/skills/exa-search/scripts/exa_similar.py "https://arxiv.org/abs/1706.03762" --category "research paper" -n 15
文档研究
python3 ~/.claude/skills/exa-search/scripts/exa_search.py "React useEffect cleanup" --domains react.dev developer.mozilla.org --context
构建 RAG 上下文
python3 ~/.claude/skills/exa-search/scripts/exa_search.py "Python async patterns" --context --context-chars 15000 --domains docs.python.org

参考文档

文件内容
references/exa-scripts-reference.md全部 5 个脚本的完整参数参考、费用表、MCP 对比、测试套件

测试套件

python3 ~/.claude/skills/exa-search/scripts/test_exa.py --quick       # Quick validation
python3 ~/.claude/skills/exa-search/scripts/test_exa.py               # Full suite
python3 ~/.claude/skills/exa-search/scripts/test_exa.py --endpoint search  # Specific endpoint

评论

支持 Markdown