collaborating-with-geminilisted
Install: claude install-skill appautomaton/agent-designer
# Collaborating with Gemini
Use Gemini CLI as a collaborator while Codex remains the primary implementer.
The bridge script (`scripts/gemini_bridge.py`) wraps `gemini -p` (headless mode), returns structured JSON, and manages session continuity via `SESSION_ID`.
## Safety
Gemini can read and write files in the workspace by default. The bridge does **not** restrict this.
To limit what Gemini can do:
- `--sandbox` — blocks shell commands and file writes. **Recommended for review/consultation tasks.**
- Include `OUTPUT: Unified Diff Patch ONLY. Do not modify any files.` in your prompt when requesting code changes. This is a convention, not enforced.
⚠️ `--approval-mode plan` does NOT reliably prevent writes — Gemini may self-approve plans and use shell commands to bypass file-write restrictions. Do not rely on it for safety.
## When to use
- Second opinion on design tradeoffs, edge cases, or test gaps.
- Web search and research (Gemini has built-in grounding).
- Reviewing a diff or proposing changes as unified diff.
- Screenshot / image analysis.
## When not to use
- Trivial one-shot tasks — do them in Codex directly.
- Tasks requiring file edits — Codex edits, Gemini advises.
- Anything involving secrets, private keys, or prod data.
## Quick start
⚠️ Backticks in prompts trigger shell command substitution — use a heredoc. See `references/shell-quoting.md`.
```bash
PROMPT="$(cat <<'EOF'
Review src/auth.py around login() and propose fixes.
OUTPUT: Unified Diff Patch ONL