A Claude Code skill that delegates coding tasks to Google's Gemini CLI via the Agent Client Protocol (ACP) -- structured JSON-RPC communication instead of shell subprocess piping.
SaferSkills independently audited gemini-delegate (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Claude Code skill that delegates coding tasks to Google's Gemini CLI via the Agent Client Protocol (ACP) -- structured JSON-RPC communication instead of shell subprocess piping.
Claude Code sends prompts to Gemini CLI over a typed JSON-RPC channel. Gemini's responses come back as structured data -- tool calls, reasoning, and plans as JSON fields, not raw text to parse. File access is permission-controlled and path-scoped.
gemini --acp. No shell quoting hazards.tool_calls, thoughts, plan, stop_reason as typed JSON fields.--approve-edits flag, scoped to workspace root.--cd directory. Traversal attempts rejected.stop_reason: "crash"), never raw tracebacks.0o700 on cache directories and 0o600 on temporary results.--acp support (install)# Clone
git clone https://github.com/YOUR_USERNAME/gemini-delegate.git
# Install the ACP SDK
pip install --user -r gemini-delegate/requirements.txt
# Copy to Claude Code skills directory
cp -r gemini-delegate ~/.agents/skills/gemini-delegateThe bridge inherits your shell environment. Ensure your Gemini API key is configured:
gemini --version # Should be >= 0.36.0
gemini -p "Hello" # Should get a responseSession state is stored in ~/.cache/gemini-bridge/sessions/ (XDG compliant).
Use --prompt-stdin and --output-file AUTO to avoid temporary file collisions and deadlocks:
echo "Review the architecture of src/" | \
python3 ~/.agents/skills/gemini-delegate/scripts/gemini_bridge.py \
--cd "." --prompt-stdin --output-file AUTONote: AUTO generates a unique, private (0600) JSON file in /tmp.
When running independent agents in the same project, isolate their states:
export GEMINI_BRIDGE_SESSIONS_DIR="/tmp/agent-alpha-cache"
python3 gemini_bridge.py --cd "." --prompt "..."The bridge uses a Heartbeat Watchdog to handle reasoning model latency:
Adjust these via --first-chunk-timeout, --idle-timeout, and --timeout.
| Flag | Description | Default |
|---|---|---|
--prompt | Prompt text | |
--prompt-file | Read prompt from file | |
--prompt-stdin | Read prompt from stdin | |
--session-id | Resume a specific session | |
--new-session | Force fresh session | |
--sessions-dir | Override session storage directory | |
--cd | Workspace root directory (required) | |
--timeout | Total max wall-clock seconds | 600 |
--idle-timeout | Max seconds between message chunks | 120 |
--first-chunk-timeout | Max seconds for the first response chunk | 300 |
--verbose | Print heartbeat markers to stderr | |
--output-file | Write JSON to file (or AUTO for unique temp) | |
--approve-edits | Allow scoped file writes |
{
"success": true,
"SESSION_ID": "abc-123",
"agent_messages": "Gemini's response text",
"tool_calls": [
{"id": "tc-001", "title": "Read file", "type": "read_file", "status": "completed", "path": "src/auth.py"}
],
"thoughts": "Agent reasoning (if emitted)",
"stop_reason": "end_turn",
"AUTO_OUTPUT_FILE": "/tmp/gemini_bridge_res_xyz.json"
}Apache 2.0. See LICENSE.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.