collaborating-with-gemini

Delegates coding tasks to Gemini CLI for prototyping, debugging, and code review. Use when needing algorithm implementation, bug analysis, or code quality feedback. Supports multi-turn sessions via SESSION_ID.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026⬇️2downloads

When & Why to Use This Skill

The Collaborating with Gemini skill is a high-performance developer tool that bridges Claude with the Gemini CLI to automate complex programming workflows. It enables seamless delegation of tasks such as rapid prototyping, deep bug analysis, and comprehensive code reviews. By supporting multi-turn sessions and workspace-aware execution, this skill allows developers to leverage Gemini's reasoning capabilities directly within their project environment to improve code quality and accelerate development cycles.

Use Cases

  • Rapid Prototyping: Generate unified diffs and boilerplate code for new features or logging systems by providing high-level natural language instructions.
  • Automated Debugging: Analyze complex error traces and project-specific files to identify root causes and receive actionable fix suggestions.
  • Iterative Code Review: Conduct multi-turn AI sessions to refine code quality, ensuring adherence to architectural standards and best practices.
  • Algorithm Implementation: Delegate the creation of complex logic or mathematical algorithms to Gemini while maintaining the context of the existing codebase.
  • Unit Test Generation: Automatically produce comprehensive test suites for existing modules by referencing the project's workspace root.
namecollaborating-with-gemini
descriptionDelegates coding tasks to Gemini CLI for prototyping, debugging, and code review. Use when needing algorithm implementation, bug analysis, or code quality feedback. Supports multi-turn sessions via SESSION_ID.

Quick Start

python scripts/gemini_bridge.py --cd "/path/to/project" --PROMPT "Your task"

Output: JSON with success, SESSION_ID, agent_messages, and optional error.

Parameters

usage: gemini_bridge.py [-h] --PROMPT PROMPT --cd CD [--sandbox] [--SESSION_ID SESSION_ID] [--return-all-messages] [--model MODEL]

Gemini Bridge

options:
  -h, --help            show this help message and exit
  --PROMPT PROMPT       Instruction for the task to send to gemini.
  --cd CD               Set the workspace root for gemini before executing the task.
  --sandbox             Run in sandbox mode. Defaults to `False`.
  --SESSION_ID SESSION_ID
                        Resume the specified session of the gemini. Defaults to empty string, start a new session.
  --return-all-messages
                        Return all messages (e.g. reasoning, tool calls, etc.) from the gemini session. Set to `False` by default, only the agent's final reply message is
                        returned.
  --model MODEL         The model to use for the gemini session. This parameter is strictly prohibited unless explicitly specified by the user.

Multi-turn Sessions

Always capture SESSION_ID from the first response for follow-up:

# Initial task
python scripts/gemini_bridge.py --cd "/project" --PROMPT "Analyze auth in login.py"

# Continue with SESSION_ID
python scripts/gemini_bridge.py --cd "/project" --SESSION_ID "uuid-from-response" --PROMPT "Write unit tests for that"

Common Patterns

Prototyping (request diffs):

python scripts/gemini_bridge.py --cd "/project" --PROMPT "Generate unified diff to add logging"

Debug with full trace:

python scripts/gemini_bridge.py --cd "/project" --PROMPT "Debug this error" --return-all-messages