search-integration

search-integration is a skill for Claude Code, Codex from kangarooking/system-prompt-skills. It costs 122 tokens per session (1,843 once invoked), scanned A, original, MIT.

A set of rules for deciding when an AI assistant should search online or in other information sources, and how it should use the results.

In plain words
What is it for?
Use it when designing chatbots, research assistants, or enterprise question-answering systems that retrieve current or external information.
Why use it?
It reduces missed information and outdated answers by defining search triggers, query choices, source priorities, and how to handle follow-up questions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing chatbots, research assistants, or enterprise question-answering systems that retrieve current or external information.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kangarooking/system-prompt-skills/search-integration
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.

Any agent
npx skills add kangarooking/system-prompt-skills --skill search-integration
Clone the repo
git clone --depth 1 https://github.com/kangarooking/system-prompt-skills

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 search-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/kangarooking/system-prompt-skills/search-integration/github.svg)](https://agentmods.dev/skills/kangarooking/system-prompt-skills/search-integration)
Your own site
<a href="https://agentmods.dev/skills/kangarooking/system-prompt-skills/search-integration"><img src="https://agentmods.dev/badge/skills/kangarooking/system-prompt-skills/search-integration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for search-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/kangarooking/system-prompt-skills/search-integration"><img src="https://agentmods.dev/badge/skills/kangarooking/system-prompt-skills/search-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,843 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.1 $0.00122 $0.01843
Opus 5 $0.00061 $0.00922
Sonnet 5 $0.00024 $0.00369
Haiku 4.5 $0.00012 $0.00184

Measured 11d ago against content hash dc86fe470d27, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

search-integration 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 11d 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.

search-integration/SKILL.md · 95 lines

How it starts

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

搜索与知识检索集成

R — 原文 (Reading)

跨供应商系统提示词中浮现的搜索策略模式:Claude Web 的"自信不是跳过搜索的理由"、Perplexity 的"追问必须重新搜索"、Gemini 的多查询策略(至少一个问题式+一个关键词式)、Notion AI 的"搜索很便宜,默认每次首次交互都搜"。Le Chat 对所有当代公众人物强制搜索,NotebookLM 则完全不搜索——纯源文档引用。核心分歧点在于搜索的门槛:从"能不搜就不搜"到"默认每次都搜"。

I — 方法论骨架 (Interpretation)

  1. 搜索优先策略 (search_first) — 对时效性信息、事实性声明、当代人物/事件,搜索是默认动作而非可选动作
  2. 多查询组合 — 单次搜索至少发出两种不同形态的查询:自然语言问题式 + 关键词式,覆盖不同索引模式
  3. 源优先级层级 — 企业数据 > 授权语料库 > 公共网页搜索 > 社交媒体,按场景定义层级
  4. 追问重新搜索原则 — 不假设前次结果在追问时仍然有效,每次实质性问题都重新检索
  5. 领域专用搜索规则 — 金融=单实体聚焦、本地=地理编码、旅行=交通+酒店、体育=完整上下文
  6. 搜索成本感知 — "搜索很便宜、安全且快速,用户愿意等待"(Notion AI),降低搜索门槛
  7. 无搜索例外 — 纯源文档场景(NotebookLM)用逐句引用替代搜索,保证忠实度

A1 — 案例分析 (Past Application)

案例: Gemini 多查询强制策略

  • 问题: 单一查询无法覆盖用户意图的不同表述维度,导致搜索结果遗漏关键信息
  • 设计模式的使用: Gemini 3.1 Pro 系统提示词要求每次搜索至少发出两个查询:一个自然语言问题式查询(捕捉语义)加一个关键词式查询(捕捉精确匹配),且所有查询必须使用用户的原始语言
  • 结论: 多查询策略将信息检索从"猜一个最佳查询"升级为"多角度覆盖",显著降低信息遗漏率

案例: Perplexity 追问重新搜索原则

  • 问题: 用户追问时,系统倾向于复用前次搜索结果以节省时间和 token,但信息可能已过时
  • 设计模式的使用: Perplexity 系统提示词明确规定:"追问时始终重新搜索,而非假设前次结果仍然足够"
  • 结论: 该策略牺牲了效率换取了准确性,尤其在新闻、金融等高时效性场景中效果显著

案例: NotebookLM 的反搜索模式

  • 问题: 通用搜索可能引入外部信息污染对源文档的忠实解读
  • 设计模式的使用: NotebookLM 完全不搜索,严格基于用户上传的源文档,配合逐句引用机制确保每个声明都可追溯
  • 结论: 在需要高忠实度的场景(学术分析、法律文档)中,"不搜索"反而是正确策略

A2 — 触发场景 (Future Trigger) ★

用户在什么情境下需要?

  1. 设计需要联网能力的 AI 助手系统提示词,需要定义"何时搜、搜什么、搜几个"
  2. 构建企业知识库问答系统,需要定义内部语料库与外部搜索的优先级关系
  3. 为垂直领域 AI(金融、医疗、法律)设计搜索策略,需要领域专用规则
  4. 优化现有 AI 产品的搜索触发率——用户反馈"信息过时"或"回答缺少最新数据"
  5. 设计研究型 AI 产品(如 Deep Research),需要多轮搜索与结果整合策略

语言信号

  • "AI 回答的信息过时了"
  • "需要引用最新数据/新闻"
  • "先搜索再回答,不要凭记忆"
  • "企业内部知识优先于网络搜索"
  • "每次追问都要重新查一下"

与相邻 skill 的区分

  • context-management 的区别: context-management 管理已有上下文的压缩和加载,本 Skill 管理外部信息的获取时机和策略
  • conversation-flow 的区别: conversation-flow 管理对话路由和澄清策略,本 Skill 专注于搜索决策(搜不搜、搜几个、搜哪里)

E — 可执行步骤 (Execution)

  1. 定义搜索触发规则矩阵 — 完成标准: 建立按内容类型(时效性/事实性/人物/观点)和时效要求(实时/近期/历史)的二维矩阵,明确每种组合下的搜索策略(强制搜索/建议搜索/可选搜索/禁止搜索)

  2. 设计多查询组合模板 — 完成标准: 为每个搜索触发点定义至少两种查询形态(问题式 + 关键词式),包含语言保持规则(使用用户原始语言)和查询扩展策略

Read the full file on GitHub · 95 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. 11d ago First seen · 95 lines · 122 tokens per session scan A dc86fe470d27

Subscribe to this mod's changes

search-integration is a skill published in the GitHub repository kangarooking/system-prompt-skills (183 stars, last pushed 4mo ago), licensed MIT. It adds 122 tokens to every session and 1,843 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.