运行时依赖
安装命令
点击复制技能文档
Unified 网页 搜索 技能
Intelligently select the best 搜索 source, 聚合 结果s, and return ranked answers with provenance.
Security
All 搜索 queries are 验证d and sanitized:
Maximum 查询 length: 500 characters Shell metacharacters are blocked to 预防 command injection Local file 搜索es are restricted to workspace directories only 工具 API unified_网页_搜索
Perform a unified 搜索 across multiple sources.
Parameters: 查询 (string, required): The 搜索 查询 (alphanumeric, spaces, basic punctuation only) sources (array of strings, optional): Array of sources to 搜索. Defaults to ['tavily', '网页-搜索-plus', 'local']. Options: tavily, 网页-搜索-plus, browser, local. max_结果s (integer, optional): Maximum number of 结果s to return. Defaults to 5.
Usage:
# 搜索 all sources node 技能s/unified-网页-搜索/索引.js --查询 "my 搜索 term" --max_结果s 10
# 搜索 specific sources node 技能s/unified-网页-搜索/索引.js --查询 "AI developments" --sources '["tavily", "local"]' --max_结果s 10
# 搜索 local files only node 技能s/unified-网页-搜索/索引.js --查询 "meeting notes" --sources '["local"]'
Implementation
The 技能 聚合s 结果s from multiple sources:
Tavily: AI-优化d 网页 搜索 with relevance scoring (requires TAVILY_API_KEY) 网页 搜索 Plus: Broader 网页 搜索 coverage (placeholder for future integration) Browser: Tar获取ed site scrAPIng (placeholder for future integration) Local Files: 搜索es workspace directories for matching filenames
结果s are scored and ranked by relevance, then returned with source attribution in JSON 格式化.
输出 格式化 [ { "source": "tavily", "title": "Article Title", "url": "https://example.com/article", "score": 0.95, "content": "Brief excerpt from the article..." }, { "source": "local", "title": "/path/to/file.txt", "snippet": "Found 查询 in filename: file.txt", "score": 0.5 } ]
环境 Variables TAVILY_API_KEY: Required for Tavily 搜索 functionality. 获取 your key at https://应用.tavily.com Error Handling Returns error if 查询 is missing or empty Returns error if 查询 contAIns disallowed characters Gracefully handles API 失败s (continues with other sources) Warns if TAVILY_API_KEY is not 设置 Example $ node 技能s/unified-网页-搜索/索引.js --查询 "命令行工具mate change" --max_结果s 3 [ { "source": "tavily", "title": "IPCC 命令行工具mate 报告 2024", "url": "https://ipcc.ch/报告", "score": 0.92, "content": "The latest IPCC 报告 shows..." }, { "source": "tavily", "title": "命令行工具mate Action 追踪er", "url": "https://命令行工具mateaction追踪er.org", "score": 0.87, "content": "追踪ing government 命令行工具mate commitments..." }, { "source": "local", "title": "/home/user/.OpenClaw/workspace/memory/命令行工具mate-notes.md", "snippet": "Found 查询 in filename: 命令行工具mate-notes.md", "score": 0.5 } ]