search-gemini

A command for searching the web through the Gemini command-line tool, which is a terminal program for interacting with Google’s Gemini service. It is intended for finding current information, researching documentation, investigating errors, and comparing technologies.

In plain words
What is it for?
Looking up recent software changes, finding documentation, investigating error messages, comparing technologies, collecting multiple sources, and checking security information such as CVEs.
Why use it?
It provides a defined way to obtain information that may have changed since the codebase was written. The instructions also require using Gemini for searches instead of Claude’s built-in search.

Command

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 commands/ysicing/code-pilot/search-gemini
Clone the repo
git clone --depth 1 https://github.com/ysicing/code-pilot
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 518 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00011 $0.00518
Opus 5 $0.00005 $0.00259
Sonnet 5 $0.00002 $0.00104
Haiku 4.5 $0.00001 $0.00052

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

Security

Grade A, and why

search-gemini 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 2d 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.

commands/search-gemini.md · 72 lines

What it actually says

Gemini 网络搜索

使用 Gemini CLI 执行网络搜索以获取最新信息。

使用方法

# 通过 Gemini CLI 进行网络搜索(必须)
gemini --prompt "WebSearch: <搜索查询>"

基本示例

# 使用 Gemini CLI
gemini --prompt "WebSearch: Debian13 新特性"
gemini --prompt "WebSearch: ysicing的博客地址是多少"

与 Claude 配合

# 文档搜索和摘要
gemini --prompt "WebSearch: Debian13 新特性"
「请总结搜索结果并说明主要功能」

# 错误调查
cat error.log
gemini --prompt "WebSearch: [错误消息] 解决方法"
「请从搜索结果中提出最合适的解决方法」

# 技术比较
gemini --prompt "WebSearch: Rust vs Go performance benchmark 2025"
「请从搜索结果总结性能差异」

详细示例

# 从多个来源收集信息
gemini --prompt "WebSearch: GraphQL best practices 2024 multiple sources"
「请从搜索结果整理多个可靠来源的信息」

# 调查时间序列变化
gemini --prompt "WebSearch: JavaScript ES2015 ES2016 ES2017 ES2018 ES2019 ES2020 ES2021 ES2022 ES2023 ES2024 features"
「请按时间顺序整理各版本的主要变更」

# 限定特定域名搜索
gemini --prompt "WebSearch: site:github.com Rust WebAssembly projects stars:>1000"
「请按星标数量从高到低列出 10 个项目」

# 最新的安全信息
gemini --prompt "WebSearch: CVE-2024 Node.js vulnerabilities"
「请总结发现的漏洞影响和对策」

禁止事项

  • 禁止使用 Claude 的内置 WebSearch 工具
  • 需要网络搜索时,必须使用 gemini --prompt "WebSearch: ..."

注意事项

  • 如果 Gemini CLI 可用,必须使用 gemini --prompt "WebSearch: ..."
  • 网络搜索结果不一定总是最新的
  • 重要信息建议通过官方文档或可靠来源确认
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. 2d ago First seen · 72 lines · 11 tokens per session scan A 1eb58a66bb05

Subscribe to this mod's changes

search-gemini is a command published in the GitHub repository ysicing/code-pilot (38 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 11 tokens to every session and 518 once invoked, about $0.0001 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.