jackwener avatar

Smart Search

This is a routing layer over opencli that picks the right search source based on what you're looking for. Instead of hardcoding commands, it checks live help output every time to avoid drift. The core logic is simple: if you name a site, it uses that site. Otherwise it picks one AI source (grok, doubao, or gemini) and only adds specialized sources if the AI result lacks raw data or authority. It enforces hard limits: one call per AI source per question, max two for other sites. Every response ends with a search summary showing which sites were queried, what terms were used, and how many times. It's designed for Chinese users who want smarter search without memorizing opencli syntax.

skills.sh installs
17K
GitHub stars
31K
last updated
Aug 21, 2026

Install

$ npx -y skills add jackwener/opencli --skill smart-search --agent claude-code

Installs into .claude/skills of the current project.

Files

智能搜索路由器

根据话题和场景,将查询路由到最佳的 opencli 搜索源。此 skill 的核心目标不是记忆命令,而是先定位数据源,再让 Agent 通过 opencli 自己读取实时帮助,避免文档漂移。

强制预检

每次使用前,必须先做下面两步:

  • 运行 opencli list -f yaml
  • 用 live registry 确认候选站点是否存在,并检查 strategy、browser、domain

选定站点后,必须再做下面两步:

  • 运行 opencli <site> -h 查看该站点有哪些子命令
  • 若已锁定某个子命令,再运行 opencli <site> <command> -h 查看参数、输出列、策略

不要在 skill 文档里硬编码参数或假设命令签名;以 opencli ... -h 的实时输出为准。

主路由规则

只使用这一条规则,不再维护多套优先级:

  1. 当用户明确指定网站、平台或数据源时,直接使用对应网站。
  2. 当用户没有指定网站时,优先只选择一个 AI 源:grok、doubao、gemini 三选一。
  3. 当 AI 返回内容不足、缺少原始数据、需要权威佐证或需要垂直结果时,再补充 1-2 个专用源。

单题预算与频率限制

把“单个用户问题”理解为同一意图链路下的一次问题求解;同一轮追问、澄清、补充条件,若核心问题未变,仍算同一题。

先建立一份站点调用台账。每次真正执行搜索命令后,立刻更新:

  • site
  • query
  • count
  • status

计数规则:

  • 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 次调用;若信息仍不足,停止扩搜并明确说明缺口

触发限频后的处理:

Sponsors

Details

Repository
github.com/jackwener/opencli
Categories
Backend & APIs, CLI & Terminal
First seen
Apr 16, 2026

More from jackwener/opencli

All 11
1wshobson avatarreact-state-managementwshobson/agentsMaster modern React state management with Redux Toolkit, Zustand, Jotai, and React Query. Use when setting up global state, managing server state, or choosing b15.9Kskills.sh installs
2wshobson avatarpython-project-structurewshobson/agentsPython project organization, module architecture, and public API design. Use when setting up new projects, organizing modules, defining public interfaces with _15.4Kskills.sh installs
3fastapi avatarfastapifastapi/fastapiFastAPI best practices and conventions. Use when working with FastAPI APIs, Pydantic models, dependencies, streaming responses including Server-Sent Events (SSE14.9Kskills.sh installs
4clerk avatarclerk-vue-patternsclerk/skillsVue 3 patterns with Clerk — composables (useAuth, useUser, useClerk, useOrganization), Vue Router guards, Pinia auth store integration. Triggers on: vue clerk, 14.5Kskills.sh installs
5github avatarmicrosoft-code-referencegithub/awesome-copilotLook up Microsoft API references, find working code samples, and verify SDK code is correct. Use when working with Azure SDKs, .NET libraries, or Microsoft APIs14.4Kskills.sh installs
6resend avataremail-best-practicesresend/resend-skillsUse when building email features, emails going to spam, high bounce rates, setting up SPF/DKIM/DMARC authentication, implementing email capture, ensuring compli14.2Kskills.sh installs