smart-search
jackwener/opencli
Intelligent search router for opencli—route queries to optimal sources across AI, social media, news, shopping, and specialized databases.
What is smart-search?
Smart-search is a routing skill for opencli that intelligently directs user queries to the best available search sources based on topic and context. Use it when you need to search, query, find, or research information—especially across specified websites, social media, technical resources, news, shopping, travel, job listings, finance, or Chinese-language content.
- Routes queries to optimal opencli sources (AI, social media, news, shopping, travel, job boards, finance) based on user intent and language
- Enforces pre-flight checks: validates available sources via `opencli list`, confirms site existence and strategy before executing searches
- Implements single-question budget and frequency limits: AI sources max 1 call per question, non-AI sources max 2 calls with clear justification
- Selects one primary AI source (grok, doubao, or gemini) by language/context, supplementing with 1–2 specialized sources only when needed
- Constructs effective queries using topic + objective + constraints pattern to maximize result relevance
- Generates search summaries documenting which sites were queried, search terms used, call counts, and any skipped sources due to limits
How to install smart-search
npx skills add https://github.com/jackwener/opencli --skill smart-search- opencli installed and configured
- Access to live opencli registry (via `opencli list -f yaml`)
- Network access to target search sources (AI platforms, social media, news sites, shopping platforms, etc.)
How to use smart-search
- 1.Run `opencli list -f yaml` to confirm available sources and their strategies
- 2.Identify the primary data source: if user specifies a website/platform, use it directly; otherwise select one AI source (grok, doubao, gemini) based on language and context
- 3.Run `opencli <site> -h` to list available subcommands for the chosen source
- 4.Run `opencli <site> <command> -h` to review parameters, output columns, and execution strategy
- 5.Construct query using topic + objective + constraints pattern (e.g., 'product name + price range + region')
- 6.Execute the search command and log results: site, query, call count, status
- 7.If first result is insufficient, supplement with 1–2 specialized sources (non-AI max 2 calls total per question)
- 8.Append search summary to response: list sites used, query terms, call counts, and any skipped sources
Use cases
- Find real-time information on trending topics, news, or social media discussions by routing to appropriate AI or platform-specific sources
- Search for products across multiple shopping platforms with geographic or price constraints
- Locate job postings, travel deals, or financial information with domain-specific sources and filters
- Research technical documentation, academic papers, or specialized knowledge bases via tech-focused sources
- Gather Chinese-language content or region-specific information by selecting doubao or other localized sources
- Agents and developers using opencli for multi-source information retrieval
- Users needing intelligent query routing across heterogeneous search backends
- Teams researching topics spanning social media, news, shopping, travel, or specialized vertical domains
- Anyone querying in English or Chinese who wants to avoid manual source selection
smart-search FAQ
Select based on language and context: grok for real-time English/Twitter discussions, doubao for Chinese content and ByteDance ecosystem, gemini for global web resources and general information. If user specifies a language or platform, choose accordingly; otherwise default to one source only.
A single question is one user intent or problem-solving chain. Clarifications, follow-ups, and condition refinements within the same core problem still count as one question. AI sources max 1 call per question; non-AI sources max 2 calls with justification.
Do not stop the entire search. Record the skip (e.g., 'Skipped: <site> unavailable'), fall back to an alternative source in the same category, and continue. Always rely on live `opencli list` and `-h` output, not assumptions about availability.
Supplement when AI results lack original data, need authority/verification, miss vertical-specific information, or user explicitly requests a specific platform. Keep total queries low: typically 1 AI source + 1–2 specialized sources per question.
Use the pattern: topic + objective + constraints. Example: 'Python async library comparison 2024' or 'iPhone 15 Pro price USD under $1000 in stock'. Avoid single keywords or queries without time/region/platform limits.
Full instructions (SKILL.md)
Source of truth, from jackwener/opencli.
name: smart-search description: 基于 opencli 命令的智能搜索路由器。当用户想要使用 OpenCLI、CLI 或 API 搜索、查询、查找或研究信息时,尤其是涉及指定网站、社交媒体、技术资料、新闻、购物、旅游、求职、金融或中文内容时,务必使用此 skill
智能搜索路由器
根据话题和场景,将查询路由到最佳的 opencli 搜索源。此 skill 的核心目标不是记忆命令,而是先定位数据源,再让 Agent 通过 opencli 自己读取实时帮助,避免文档漂移。
强制预检
每次使用前,必须先做下面两步:
- 运行
opencli list -f yaml - 用 live registry 确认候选站点是否存在,并检查
strategy、browser、domain
选定站点后,必须再做下面两步:
- 运行
opencli <site> -h查看该站点有哪些子命令 - 若已锁定某个子命令,再运行
opencli <site> <command> -h查看参数、输出列、策略
不要在 skill 文档里硬编码参数或假设命令签名;以 opencli ... -h 的实时输出为准。
主路由规则
只使用这一条规则,不再维护多套优先级:
- 当用户明确指定网站、平台或数据源时,直接使用对应网站。
- 当用户没有指定网站时,优先只选择一个 AI 源:
grok、doubao、gemini三选一。 - 当 AI 返回内容不足、缺少原始数据、需要权威佐证或需要垂直结果时,再补充 1-2 个专用源。
单题预算与频率限制
把“单个用户问题”理解为同一意图链路下的一次问题求解;同一轮追问、澄清、补充条件,若核心问题未变,仍算同一题。
先建立一份站点调用台账。每次真正执行搜索命令后,立刻更新:
sitequerycountstatus
计数规则:
opencli list -f yaml、opencli <site> -h、opencli <site> <command> -h属于预检与帮助,不计入搜索次数- 一次真正的
opencli <site> ...搜索/查询执行,计为该站点 1 次调用 - 同站点因为报错、超时、验证码、反爬、登录态异常而失败,也算 1 次调用,不要无限重试
频率上限:
- AI 站点硬限制:同一题内,每个 AI 站点最多调用 1 次
- 默认策略仍然是只选 1 个 AI 站点,不要把多个 AI 站点串成常规流程
- 只有当用户明确要求比较多个 AI 站点时,才可以额外调用其他 AI 站点;但每个被点名的 AI 站点仍然最多 1 次
- 非 AI 站点默认最多调用 2 次
- 非 AI 站点第 2 次调用必须有明确理由,例如第一次结果过宽,需要加时间、地区、类别、排序或关键词限定
- 非 AI 站点不要进行第 3 次调用;若信息仍不足,停止扩搜并明确说明缺口
触发限频后的处理:
- 记录:「已跳过:<site> 达到频率上限」
- 优先改用其他同类站点
- 若没有合适替代源,则直接基于已收集信息回答,并说明覆盖范围与缺口
查询结束汇报
每次查询结束后,回答末尾必须追加一段简短的“搜索摘要”,至少包含下面三项:
- 使用了什么网站搜索
- 每个网站搜了什么词
- 每个网站搜了几次
如果有被限频跳过的站点,也要明确写出。
建议使用下面的固定格式:
搜索摘要
- 网站:<site1> | 查询词:<term1> | 次数:<n>
- 网站:<site2> | 查询词:<term2>;<term3> | 次数:<n>
- 已跳过:<site3>,原因:达到频率上限
AI 源选择
grok适合实时讨论、英文互联网舆论、Twitter/X 语境、热点追踪。doubao适合中文语境、字节抖音生态、生活方式内容、中文热点与泛中文问答。gemini适合全球网页、英文资料、通用信息检索、背景综述。
如果用户没有指定网站,默认先判断语言和语境,再从这三个里只选一个。
一旦某个 AI 站点已经执行过一次真实查询,就不要在同一题里改写关键词后再次调用该 AI 站点。若答案不足,优先补专用源,不要反复追打同一个 AI 站点。
AI 查询词建议
当使用 AI 源时,不要只丢一个过短关键词。优先构造成“主题 + 目标 + 限定条件”的查询。
- 主题 用户真正要查的对象、事件、产品、人物、公司、技术名词。
- 目标 想要什么结果,例如总结、对比、原因、趋势、推荐、原始线索。
- 限定条件 语言、地区、时间范围、平台范围、受众、价格带、岗位地点、是否要引用原始来源。
优先使用下面这种表达方式:
<主题> + <你要回答的问题><主题> + <时间范围/地区/语言><主题> + <平台或来源范围><主题> + <输出要求>
避免只输入:
- 单个名词
- 没有时间范围的热点问题
- 没有地区限制的购物、求职、旅游问题
- 没有平台限制的社交媒体问题
专用源补充时机
当出现以下任一情况时,再补充专用源:
- AI 给出的是摘要,但你需要原始帖子、原始视频、原始商品或原始职位结果
- AI 覆盖面不足,漏掉垂直站点信息
- 需要更高权威性或更强领域相关性
- 用户明确要求“从某个平台找”
单次查询通常控制在 1 个 AI 源 + 1 到 2 个专用源,避免结果过载。
处理不可用的源
当站点不可用时:
- 不要因为单个源失败而中止整个搜索
- 记录:「已跳过:<site> 不可用」
- 回退到同类其他站点,或回退到一个 AI 源
- 始终以
opencli list -f yaml与opencli <site> -h的实际结果为准
不要假设任何站点“绝对可用”。即使是公开站点,也以当前环境中的 live help 和执行结果为准。
参考文件
根据需要读取对应文件:
references/sources-ai.md— AI 默认源references/sources-tech.md— 技术 / 学术references/sources-social.md— 社交媒体references/sources-media.md— 媒体 / 娱乐references/sources-info.md— 资讯 / 知识references/sources-shopping.md— 购物references/sources-travel.md— 旅游references/sources-other.md— 其他垂直源
只读与当前查询相关的文件,无需全部加载。
Related skills
More from jackwener/opencli and the wider catalog.
opencli-usage
Orientation layer for OpenCLI — discover adapters, learn universal flags, and route to specialized skills.
opencli-browser
Drive a real Chrome browser via CLI to inspect pages, fill forms, click flows, and extract data—agent-native structured output.
opencli-autofix
Automatically diagnose and fix broken OpenCLI adapters when commands fail.
opencli-adapter-author
Write OpenCLI adapters end-to-end: from site reconnaissance through field decoding, adapter coding, and verification.
opencli-explorer
Use when creating a new OpenCLI adapter from scratch, adding support for a new website or platform, exploring a site's API endpoints via browser DevTools, or when a user asks to automatically generate a CLI for a website (e.g. "帮我生成 xxx.com 的 cli"). Covers automated generation, API discovery workflow, authentication strategy selection, TS adapter writing, and testing.
opencli-oneshot
Use when quickly generating a single OpenCLI command from a specific URL and goal description. 4-step process — open page, capture API, write TS adapter, test. For full site exploration, use opencli-explorer instead.