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.
npx agentmods add commands/jerrylalala/compound-engineering/geminigit clone --depth 1 https://github.com/Jerrylalala/compound-engineeringWrote 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.
[](https://agentmods.dev/commands/jerrylalala/compound-engineering/gemini)<a href="https://agentmods.dev/commands/jerrylalala/compound-engineering/gemini"><img src="https://agentmods.dev/badge/commands/jerrylalala/compound-engineering/gemini.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00015 | $0.00743 |
| Opus 5 | $0.00008 | $0.00371 |
| Sonnet 5 | $0.00003 | $0.00149 |
| Haiku 4.5 | $0.00002 | $0.00074 |
Grade A, and why
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 3d 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.
What it actually says
Gemini 上下文感知咨询
向 Gemini 寻求当前问题的更优方案。核心目的:挑战现有方案,寻找最优解。
Step 1: 构建结构化 prompt
分析当前对话上下文,智能构建 prompt。必须附上 Claude 当前方案供 Gemini 评判。
## 项目背景
[技术栈、框架]
## 当前问题
[从对话中提取的问题描述]
## 相关代码
[关键代码片段,标注文件路径和行号]
## 错误信息(如有)
[错误日志/堆栈]
## 当前方案(Claude 的建议)
[Claude 已给出的方案]
## 需要你回答的问题
$ARGUMENTS
## 请特别评估
1. 当前方案是否是最优解?如果不是,更好的方案是什么?
2. 有没有我们忽略的替代方案或开源库?
3. 性价比方面:是否存在更简洁、更高效的实现方式?
4. 有没有潜在的坑或者长期维护风险?
只包含与问题相关的上下文,不要倾倒整个对话。
Step 2: 调用 Gemini CLI
使用 heredoc 避免特殊字符问题,通过非交互模式调用:
# -m gemini-3-pro-preview: 使用 Gemini 3 Pro 最新模型
# -p '': 非交互模式,stdin 内容作为 prompt
# -o json: JSON 格式输出,提取 .response 字段
cat <<'PROMPT_EOF' | gemini -m gemini-3-pro-preview -p '' -o json
<构建好的prompt>
PROMPT_EOF
安全提示:
-p仅控制 prompt 输入方式,不限制执行权限。Gemini 在此模式下仍可能尝试工具调用。当前通过 Claude Code 的 Bash 工具执行,由 Claude Code 控制实际权限边界。
使用 Bash 工具执行,设置 300 秒超时。
解析返回的 JSON,提取 .response 字段。
如果失败:
- 未安装 → 提示:
npm install -g @google/gemini-cli - 网络/认证问题 → 提示检查 Google API 配置
- JSON 解析失败 → 直接展示原始输出
Step 3: 综合回答
## Gemini 的方案
[Gemini 的完整回答]
disable-model-invocation: true
---
## 方案对比与最优解分析
### 是否有更优方案?
[基于 Gemini 反馈判断]
### 性价比评估
[实现复杂度、维护成本、性能]
### 两方一致的观点
- [共识要点,可信度更高]
### 分歧与取舍(如有)
- [各自理由和适用场景]
### 最终建议
[综合两方观点的最优解推荐]
如果 Gemini 提出了更好的方案,诚实承认并推荐采纳。不为面子辩护,只看方案本身的优劣。
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.
- 3d ago First seen · 99 lines · 15 tokens per session scan A 8bed4fa46e20
gemini is a command published in the GitHub repository Jerrylalala/compound-engineering (5 stars, last pushed 3mo ago), licensed MIT. It adds 15 tokens to every session and 743 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-31.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.