双子座
- 作者仓库星标 0
- 作者仓库 skills-registry
- 领域
- 工程开发
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @tomevault-io · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
Question: "Should I mark this task type as a poor fit for Gemini and handle it with Claude going forward?"
Options:
- "Yes, log it" — description: "Record this as an [AVOID] pattern"
- "No, just this once" — description: "Don't log anything"
第 1 步:阅读体验日志
在做任何其他事情之前,请阅读体验日志:日志包含: `[AUTO_APPROVE]` 条目 — 始终发送给 Gemini 的任务类型,不需要提示 `[AVOID]` 条目 — Gemini 表现不佳的任务类型,由 Claude 处理
第 6 步:结果后不满意检测
呈现 Gemini 输出后,观察用户的下一条消息是否有不满意信号: 信号:“错误”、“不好”、“不行”、“重做此操作”、用户更正输出、用户要求 Claude 重做相同的任务 检测到时:使用 AskUserQuestion:如果用户选择“是,记录它”→ 将 `[AVOID]` 条目附加到 experience.md
# Gemini Smart Delegation Skill
Route tasks to Google's Gemini CLI (1M token context window) intelligently. The key behavior:
**always evaluate FIRST, then decide — never start a big task without checking**.
---
## Step 1: Read the Experience Log
Before doing anything else, read the experience log:
```bash
cat ~/.claude/skills/gemini/experience.md
```
The log contains:
- `[AUTO_APPROVE]` entries — task types to always send to Gemini, no prompt needed
- `[AVOID]` entries — task types where Gemini underperformed, handle with Claude instead
---
## Step 2: Score the Task
### Strong Gemini signals (+2 each)
- Files involved are likely >50KB total (codebase scan, large logs, big documents)
- Task is purely read/analysis — no file editing needed
- Task matches an `[AUTO_APPROVE]` pattern in experience.md
- User explicitly says "use gemini", "ask gemini", "let gemini handle"
### Mild Gemini signals (+1 each)
- Multiple files need to be read and cross-referenced
- Task involves summarization or extraction from long content
- Token conservation would meaningfully benefit the conversation
### Disqualifiers (skip Gemini entirely)
- Task matches an `[AVOID]` pattern in experience.md → handle with Claude, mention why
- Task requires writing or editing files
- Task requires iterative tool-use loops
- Task is short and simple
---
## Step 3: Decision Branch
### Score >= 2 AND matches an [AUTO_APPROVE] pattern:
→ **Go straight to Gemini** — skip the question
→ Briefly note: "Routing to Gemini (auto-approved: [pattern name])"
### Score >= 2 but NO prior auto-approve for this pattern:
→ **Use AskUserQuestion** with this exact structure:
```
Question: "This task looks like a good fit for Gemini (large context / token savings). How should I handle it?"
Header: "Route to Gemini?"
Options:
1. label: "Use Gemini & remember this task type"
description: "Delegate to Gemini now, and auto-route similar tasks in the future without asking"
2. label: "Use Gemini, just this once"
description: "Delegate to Gemini now, but ask again next time"
3. label: "Claude handles it"
description: "Skip Gemini for this task"
```
### Score < 2:
→ Handle with Claude normally, no question needed
---
## Step 4: After the User Chooses
### Option 1 — "Use Gemini & remember this task type":
1. Append an `[AUTO_APPROVE]` entry to experience.md (format below)
2. Run Gemini
3. Present output labeled `[Gemini Response]`
### Option 2 — "Use Gemini, just this once":
1. Run Gemini
2. Present output labeled `[Gemini Response]`
3. Do NOT write to experience.md
### Option 3 — "Claude handles it":
1. Handle with Claude normally
2. Do NOT write to experience.md
---
## Step 5: Running Gemini
### Standard headless call
```bash
gemini -p "COMPLETE SELF-CONTAINED PROMPT" --output-format text --yolo 2>&1
```
### Pipe large file content
```bash
cat /path/to/large/file | gemini -p "YOUR INSTRUCTION" --output-format text --yolo 2>&1
```
### Multi-file analysis
```bash
gemini -p "$(printf 'Analyze these files:\n\n=== file1 ===\n'; cat file1; printf '\n\n=== file2 ===\n'; cat file2; printf '\n\nTask: YOUR INSTRUCTION')" --output-format text --yolo 2>&1
```
**Important**: Gemini headless is **single-shot** — craft a complete, self-contained prompt with all needed context included.
---
## Step 6: Post-Result Dissatisfaction Detection
After presenting Gemini output, watch the user's next message for dissatisfaction signals:
**Signals**: "wrong", "not good", "that's off", "redo this", user corrects the output, user asks Claude to redo the same task
**When detected**:
1. Use AskUserQuestion:
```
Question: "Should I mark this task type as a poor fit for Gemini and handle it with Claude going forward?"
Options:
- "Yes, log it" — description: "Record this as an [AVOID] pattern"
- "No, just this once" — description: "Don't log anything"
```
2. If user picks "Yes, log it" → append an `[AVOID]` entry to experience.md
3. If this task type had an existing `[AUTO_APPROVE]` entry, update it to `[AVOID]`
4. Confirm: "Noted. I'll handle this type of task myself from now on."
---
## Experience Log Entry Formats
### AUTO_APPROVE entry
```markdown
---
### [AUTO_APPROVE] YYYY-MM-DD
**Pattern**: one-line description of the task type (e.g., "Full Go codebase read-only analysis")
**Trigger keywords**: keywords that identify this pattern
**Reason**: why Gemini is well-suited for this
```
### AVOID entry
```markdown
---
### [AVOID] YYYY-MM-DD
**Pattern**: one-line description of the task type
**What went wrong**: brief failure description from user feedback
**Lesson**: what to do instead next time
```
---
## Decision Table
| Condition | Action |
|-----------|--------|
| Matches [AUTO_APPROVE] | Go straight to Gemini, no question |
| Matches [AVOID] | Use Claude, explain why |
| Large/complex, no prior record | AskUserQuestion (3 options) |
| Small/simple task | Claude handles, no question |
| User picks "remember this type" | Write AUTO_APPROVE + run Gemini |
| User flags poor result | AskUserQuestion → write AVOID |
---
> Source: [audi0417/claude-gemini-router](https://github.com/audi0417/claude-gemini-router) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-23 -->
章节与文件索引
按说明文件中的顺序排列。
第 1 步:阅读体验日志
强烈的双子座信号(每个+2)
温和的双子座信号(每个+1)
取消资格(完全跳过双子座)
分数 >= 2 并且匹配 [AUTOAPPROVE] 模式:
文件/命令 -> [AUTO_APPROVE] · [AVOID] · [Gemini Response] · .claude/skills/gemini/experience.md · read/analysis · experience.md · path/to/large/file · Large/complex
内容校验值 -> 0832dd8ddd04
当前原文的自动摘译,尚未人工审校。
强烈的双子座信号(每个+2)
涉及的文件总数可能超过 50KB(代码库扫描、大型日志、大文档) 任务纯粹是读取/分析 - 不需要文件编辑 任务与 experience.md 中的
[AUTO_APPROVE]模式匹配 用户明确地说“使用 Gemini”、“询问 Gemini”、“让 Gemini 处理”温和的双子座信号(每个+1)
需要读取和交叉引用多个文件 任务涉及从长内容中进行总结或提取 令牌保护将对对话有意义
取消资格(完全跳过双子座)
任务与 experience.md 中的
[AVOID]模式匹配 → 使用 Claude 处理,提及为什么任务需要编写或编辑文件 任务需要迭代工具使用循环 任务简短而简单分数 >= 2 并且匹配 [AUTOAPPROVE] 模式:
→ 直接前往 Gemini — 跳过问题 → 简要说明:“路由至 Gemini(自动批准:[模式名称])”