smart-search

smart-search is a skill for Claude Code, Codex from zxfccmm4/Obsidian-OpenCode-Knowledge. It costs 64 tokens per session (1,638 once invoked), scanned A, a copy of smart-search, MIT.

A search router that chooses an OpenCLI data source for a question. OpenCLI is a command-line tool that provides access to different websites and services.

In plain words
What is it for?
Use it to research news, technical information, social platforms, shopping, travel, jobs, finance, or Chinese-language content through suitable sources.
Why use it?
It helps avoid guessing which search source or command to use, while checking the currently available commands before searching.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/zxfccmm4/obsidian-opencode-knowledge/smart-search
Any agent
npx skills add zxfccmm4/Obsidian-OpenCode-Knowledge --skill smart-search
Clone the repo
git clone --depth 1 https://github.com/zxfccmm4/Obsidian-OpenCode-Knowledge

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for smart-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/zxfccmm4/obsidian-opencode-knowledge/smart-search.svg)](https://agentmods.dev/skills/zxfccmm4/obsidian-opencode-knowledge/smart-search)
Your own site
<a href="https://agentmods.dev/skills/zxfccmm4/obsidian-opencode-knowledge/smart-search"><img src="https://agentmods.dev/badge/skills/zxfccmm4/obsidian-opencode-knowledge/smart-search.svg" alt="Measured on agentmods" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,638 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 88% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00064 $0.01638
Opus 5 $0.00032 $0.00819
Sonnet 5 $0.00013 $0.00328
Haiku 4.5 $0.00006 $0.00164

Measured 5d ago against content hash e26245b31a52, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

smart-search scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

88% identical to smart-search — 27 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

vault-template/.opencode/skill/smart-search/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

智能搜索路由器

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

强制预检

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

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

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

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

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

主路由规则

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

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

单题预算与频率限制

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

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

  • site
  • query
  • count
  • status

计数规则:

  • opencli list -f yamlopencli <site> -hopencli <site> <command> -h 属于预检与帮助,不计入搜索次数
  • 一次真正的 opencli <site> ... 搜索/查询执行,计为该站点 1 次调用
  • 同站点因为报错、超时、验证码、反爬、登录态异常而失败,也算 1 次调用,不要无限重试

频率上限:

  • AI 站点硬限制:同一题内,每个 AI 站点最多调用 1 次
  • 默认策略仍然是只选 1 个 AI 站点,不要把多个 AI 站点串成常规流程
  • 只有当用户明确要求比较多个 AI 站点时,才可以额外调用其他 AI 站点;但每个被点名的 AI 站点仍然最多 1 次
  • 非 AI 站点默认最多调用 2 次
  • 非 AI 站点第 2 次调用必须有明确理由,例如第一次结果过宽,需要加时间、地区、类别、排序或关键词限定
  • 非 AI 站点不要进行第 3 次调用;若信息仍不足,停止扩搜并明确说明缺口

触发限频后的处理:

  • 记录:「已跳过: 达到频率上限」
  • 优先改用其他同类站点
  • 若没有合适替代源,则直接基于已收集信息回答,并说明覆盖范围与缺口

查询结束汇报

每次查询结束后,回答末尾必须追加一段简短的"搜索摘要",至少包含下面三项:

  • 使用了什么网站搜索
  • 每个网站搜了什么词
  • 每个网站搜了几次

如果有被限频跳过的站点,也要明确写出。

建议使用下面的固定格式:

搜索摘要
- 网站:<site1> | 查询词:<term1> | 次数:<n>
- 网站:<site2> | 查询词:<term2>;<term3> | 次数:<n>
- 已跳过:<site3>,原因:达到频率上限

AI 源选择

  • grok 适合实时讨论、英文互联网舆论、Twitter/X 语境、热点追踪。
  • doubao 适合中文语境、字节抖音生态、生活方式内容、中文热点与泛中文问答。
  • gemini 适合全球网页、英文资料、通用信息检索、背景综述。

如果用户没有指定网站,默认先判断语言和语境,再从这三个里只选一个。

一旦某个 AI 站点已经执行过一次真实查询,就不要在同一题里改写关键词后再次调用该 AI 站点。若答案不足,优先补专用源,不要反复追打同一个 AI 站点。

AI 查询词建议

当使用 AI 源时,不要只丢一个过短关键词。优先构造成"主题 + 目标 + 限定条件"的查询。

  • 主题 用户真正要查的对象、事件、产品、人物、公司、技术名词。
  • 目标 想要什么结果,例如总结、对比、原因、趋势、推荐、原始线索。
  • 限定条件 语言、地区、时间范围、平台范围、受众、价格带、岗位地点、是否要引用原始来源。

优先使用下面这种表达方式:

  • <主题> + <你要回答的问题>
  • <主题> + <时间范围/地区/语言>
  • <主题> + <平台或来源范围>
  • <主题> + <输出要求>

Read the full file on GitHub · 142 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 142 lines · 64 tokens per session scan A e26245b31a52

Subscribe to this mod's changes

smart-search is a skill published in the GitHub repository zxfccmm4/Obsidian-OpenCode-Knowledge (292 stars, last pushed 2mo ago), licensed MIT. It adds 64 tokens to every session and 1,638 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 88% identical to smart-search, differing in 27 lines, and is treated as a copy.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens