Gemini 助手
- 作者仓库星标 0
- 作者仓库 skills-registry
Gemini CLI Runtime Contract
This skill defines how polycli:polycli-provider-agent (the subagent) interacts with the
polycli companion script for Gemini. Only invoked from within polycli:polycli-provider-agent.
Primary helper
node "${CLAUDE_PLUGIN_ROOT}/scripts/polycli-companion.bundle.mjs" rescue --provider gemini "<prompt>" --json
Commands available to the agent
The provider-agent forwards whatever subcommand the caller supplied. Use rescue for multi-step agent work and ask for one-shot questions; the rest are slash-command-driven user flows.
| Command | Used by agent? | Purpose |
|---|---|---|
rescue |
Yes | Multi-step agent task (600s base, 1200s for deep-reasoning models — see Latency expectations) |
ask |
Yes | One-shot question (120s base, 240s for deep-reasoning models — see Latency expectations) |
setup |
No | User checks installation |
health |
No | User runs end-to-end probe |
review |
No | User triggers code review |
adversarial-review |
No | User triggers adversarial review |
status |
No | User checks job status |
result |
No | User fetches completed output |
cancel |
No | User cancels background job |
timing |
No | User inspects timing history |
Resumable thread state is exposed via the --resume-last flag, not a separate subcommand.
Latency expectations
Only deep-reasoning Gemini variants (Pro / Thinking series) routinely spend 30s–several minutes silently reasoning before emitting visible text. Flash and other non-reasoning variants typically stream within seconds. This is upstream behavior, not a polycli stall.
To absorb the reasoning latency without inflating other models' budgets, the companion applies a model-scoped multiplier:
PROVIDER_TIMEOUT_MULTIPLIERS = {
gemini: { "gemini-3.1-pro-preview": 2 },
opencode: { "kimi-for-coding/k2p6": 2 }, // also a code-reasoning model
}
(The opencode entry was added 2026-05-02 after a HumanEval/130 Tribonacci probe hit the 120s ask ceiling; the same pattern can be extended to any other reasoning model id.)
Resolution rules (per resolveTimeoutMs in polycli-companion.mjs):
--model gemini-3.1-pro-preview→ ×2 budget (the explicit reasoning case)- No
--model, cached upstream-default model isgemini-3.1-pro-preview→ ×2 budget (the common case today) --model <some-flash-or-other>→ ×1 (caller explicitly chose a non-reasoning model)- Unknown / cache empty / non-gemini provider → ×1
Effective ceilings when the multiplier applies:
| kind | base | gemini reasoning |
|---|---|---|
ask |
120s | 240s |
rescue |
600s | 1200s |
review |
300s | 600s |
adversarial-review |
300s | 600s |
health keeps the universal 60s budget regardless of model — gemini's health prompt is sentinel-only and does not exercise reasoning.
If you cannot estimate how long a gemini prompt will take (e.g. open-ended diagnosis on a large diff), prefer --background and poll with /polycli:status / /polycli:result instead of relying on the foreground timeout. The background worker reuses the same execution.timeout (so gemini still gets the model-resolved budget), but the calling shell is freed immediately and the user can decide how long to wait.
When upstream releases a new reasoning-capable Gemini model id, add it to PROVIDER_TIMEOUT_MULTIPLIERS.gemini. Do not blanket-multiply the whole provider — that would over-budget Flash users.
Routing controls
These are CLI flags, not prompt text:
--background— run async, return job ID immediately--write— allow Gemini to modify files (maps to--approval-mode auto_edit)--resume-last— continue previous Gemini thread--fresh— start new thread (ignore previous)--model <model>— override the default model--effort <low|medium|high>— reasoning effort level--prompt-file <path>— read prompt from file instead of positional args--json— always use this for machine-readable output
Safety rules
- Preserve prompt text as-is. Only reshape via
gemini-promptingskill. - Never inspect the repo from the agent. Claude does that.
- Return stdout exactly. No independent analysis.
- Return nothing if invocation fails (let Claude handle the error).
<!-- tomevault:4.0:skill_md:2026-05-23 -->Source: bbingz/polycli — distributed by TomeVault.
- 流狐分类
- 通用
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux · Windows
- 底层运行要求
- Node.js
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Primary helper
The provider-agent forwards whatever subcommand the caller supplied. Use rescue for multi-step agent work and ask for one-shot questions; the rest are slash-command-driven user flows. Command · Used by agent? · Purpose rescue · Yes · Multi-step agent task…
Only deep-reasoning Gemini variants (Pro / Thinking series) routinely spend 30s–several minutes silently reasoning before emitting visible text. Flash and other non-reasoning variants typically stream within seconds. This is upstream behavior, not a polycli…
These are CLI flags, not prompt text: --background — run async, return job ID immediately --write — allow Gemini to modify files (maps to --approval-mode autoedit)
Preserve prompt text as-is. Only reshape via gemini-prompting skill. Never inspect the repo from the agent. Claude does that. Return stdout exactly. No independent analysis.
# Gemini CLI Runtime Contract
This skill defines how `polycli:polycli-provider-agent` (the subagent) interacts with the
polycli companion script for Gemini. Only invoked from within `polycli:polycli-provider-agent`.
## Primary helper
```bash
node "${CLAUDE_PLUGIN_ROOT}/scripts/polycli-companion.bundle.mjs" rescue --provider gemini "<prompt>" --json
```
## Commands available to the agent
The provider-agent forwards whatever subcommand the caller supplied. Use `rescue` for multi-step agent work and `ask` for one-shot questions; the rest are slash-command-driven user flows.
| Command | Used by agent? | Purpose |
|---------|---------------|---------|
| `rescue` | Yes | Multi-step agent task (600s base, 1200s for deep-reasoning models — see Latency expectations) |
| `ask` | Yes | One-shot question (120s base, 240s for deep-reasoning models — see Latency expectations) |
| `setup` | No | User checks installation |
| `health` | No | User runs end-to-end probe |
| `review` | No | User triggers code review |
| `adversarial-review` | No | User triggers adversarial review |
| `status` | No | User checks job status |
| `result` | No | User fetches completed output |
| `cancel` | No | User cancels background job |
| `timing` | No | User inspects timing history |
Resumable thread state is exposed via the `--resume-last` flag, not a separate subcommand.
## Latency expectations
Only **deep-reasoning** Gemini variants (Pro / Thinking series) routinely spend 30s–several minutes silently reasoning before emitting visible text. Flash and other non-reasoning variants typically stream within seconds. This is upstream behavior, not a polycli stall.
To absorb the reasoning latency without inflating other models' budgets, the companion applies a **model-scoped** multiplier:
```js
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Primary helper → Commands available to the agent → Latency expectations → Routing controls → Safety rules
要点 -> deep-reasoning · model-scoped · Preserve prompt text as-is. · Never inspect the repo · Return stdout exactly. · Return nothing
文件/命令 -> polycli:polycli-provider-agent · rescue · ask · setup · health · review · adversarial-review · status
内容 SHA-256 -> 6197fa86710a
原文结构
适用与边界
原文中的明确线索
polycli:polycli-provider-agent、rescue、ask、setup、health、review、adversarial-review、status