From gemini-delegate
Delegates tasks to Gemini CLI for large-context summarization, synthesis, long-form drafting, bilingual English/Chinese writing, and second-opinion reviews on docs or output.
npx claudepluginhub wenyuchiou/ai-research-skills --plugin gemini-delegateThis skill uses the workspace's default tool permissions.
Claude is the supervisor. Claude decides scope, supplies context, and performs final review. Gemini is the specialist for large-context synthesis, long-form drafting, bilingual or CJK writing, and second-opinion analysis.
Delegates tasks to Gemini CLI for large-context analysis like broad codebase reviews or long-document processing. Activates on explicit requests such as 'use gemini' or 'delegate to gemini'.
Delegates tasks like long document analysis, multimodal processing, research, summarization, and large file handling to Google Gemini CLI to preserve Claude context.
Delegates coding tasks to Google Gemini CLI agent in the background via bash. Triggers on Gemini delegation phrases, second opinions from Gemini/Google, or parallel Google agent runs.
Share bugs, ideas, or general feedback.
Claude is the supervisor. Claude decides scope, supplies context, and performs final review. Gemini is the specialist for large-context synthesis, long-form drafting, bilingual or CJK writing, and second-opinion analysis.
This skill emits Gemini CLI invocations. Before producing any task
file, wrapper command, or handoff prompt, verify the binary is on
$PATH:
gemini --version
If that command is not found, stop and tell the user:
This skill needs the Gemini CLI. Install it with:
npm install -g @google/gemini-cli gemini --versionThen re-run your request.
Do not prepare a task prompt, write a wrapper command, or
fabricate a result.json. Without the binary on PATH, every
"successful" wrapper run is a hallucination.
Do not use Gemini as a mirror copy of Codex. Its value is different.
| Route to | Best for | Avoid |
|---|---|---|
Gemini | Large-context summarization, English or zh-TW/CJK writing, bilingual synthesis, reviewer-style second opinion, release-note drafting | Bulk code generation, architecture decisions, security-sensitive coding |
Codex | Mechanical implementation, refactors, test scaffolding, batch edits | Large-context reading and nuanced synthesis |
Claude | Requirements, acceptance judgment, debugging root cause, final publication review | Long repetitive drafting |
If the task is "read a lot, synthesize, compare, or rewrite carefully in English or Chinese," Gemini is a good candidate.
Every wrapper run must leave machine-readable status in:
<log-file>.result.json
Required fields:
{
"status": "success|fallback|error|verify_failed",
"delegate": "gemini",
"model": "gemini/<model>",
"log_file": "<path>",
"summary": "",
"risks": [],
"files_changed": [],
"tests_run": [],
"timestamp_utc": "2026-04-24T00:00:00Z"
}
The wrapper contract is transport status only. Claude still owns factual review, terminology checks, and publication quality.
If the task was queued as part of a multi-agent run by
agent-task-splitter (from the agent-collab-skills marketplace),
its task file lives at .ai/gemini_task_<NNN>_<slug>.md and the
round plan is at .coord/plan.yml. Read the plan for context (which
other agents are running, what each task's success criteria are).
Create .ai/gemini_task_<name>.md:
# Task: <descriptive name>
## Context
- Repo: C:\path\to\repo
- Read these files first:
- docs/spec.md
- docs/changelog.md
- Output file(s):
- docs/output_zh-TW.md
## Goal
<what Gemini should synthesize or draft>
## Language
- Output language: Traditional Chinese
- Tone: formal / concise / executive / technical
- Audience: <who will read it>
## Constraints
- Preserve dates and proper nouns exactly
- Keep terminology consistent with glossary.md
- Do not invent facts missing from the sources
## Acceptance
- Required verification files: <paths>
- Required sentinel string: <string if useful>
- Claude will perform a terminology and factual review before shipping
From Claude Code Bash:
bash .claude/skills/gemini-delegate/scripts/run_gemini.sh \
--prompt "Read .ai/gemini_task_<name>.md and execute all instructions inside." \
--log-file .ai/gemini_log_<name>.txt \
--verify-file docs/output_zh-TW.md
PowerShell direct call is also supported:
& "C:\Users\wenyu\mispricing-engine\.claude\skills\gemini-delegate\scripts\run_gemini.ps1" `
-Prompt "Read .ai/gemini_task_<name>.md and execute all instructions inside." `
-LogFile "C:\Users\wenyu\mispricing-engine\.ai\gemini_log_<name>.txt" `
-VerifyFile "C:\Users\wenyu\mispricing-engine\docs\output_zh-TW.md"
cat .ai/gemini_log_<name>.txt.result.json
If status is verify_failed, the process exited but required files were missing or incomplete. Treat that as failure.
Claude must review:
Gemini can draft or synthesize. Claude decides whether the output is publishable.
These wrappers already enforce the critical Gemini CLI rules:
-C--approval-mode yolo--verify-file is suppliedIf you write your own wrapper, preserve all four behaviors.
Gemini is useful for first drafts and synthesis, but it can still:
Do not ship its output unreviewed.
Before accepting delegate output:
If the answer to the last question is wrong, fix your routing first.