collaborating-with-gemini

Reviews repository code via Gemini CLI returning structured JSON with unified diffs and session IDs.

425|37|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/cnfjlhj/ai-collab-playbook --skill collaborating-with-gemini-cnfjlhj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: collaborating-with-gemini
Source: https://github.com/cnfjlhj/ai-collab-playbook/tree/main/skills/full/collaborating-with-gemini
Command: npx skills add https://github.com/cnfjlhj/ai-collab-playbook --skill collaborating-with-gemini-cnfjlhj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Provides a safe, structured way to use the Gemini CLI as a second opinion for coding tasks while keeping Codex as the primary implementer, avoiding ad-hoc shell calls and inconsistent outputs.

Core Features & Use Cases

  • Structured JSON output: Returns success flag, session identifier, assistant messages, and optional raw message streams for reproducible automation.
  • Multi-turn sessions: Preserve and resume conversations by reusing a session identifier across follow-ups.
  • Unified-diff enforcement: Request code changes as Unified Diff patches only, preventing direct file modifications.
  • Workspace-aware execution: Runs Gemini from a specified workspace root, with sandbox and model override options.
  • Use Cases: prototyping code fixes, debugging complex issues, reviewing diffs, and gathering alternative solution proposals from Gemini.

Quick Start

Run the gemini bridge script to ask Gemini to analyze specified files and return a unified diff patch while capturing the session identifier for follow-ups.

Frequently Asked Questions about collaborating-with-gemini

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get a second opinion code review from Gemini CLI without it directly modifying my files?

To get a second opinion code review from Gemini CLI without file modifications, enforce unified-diff-only outputs. This structured approach returns alternative solutions as minimal patches, preventing direct file edits while keeping your primary coding assistant as the main implementer.

How do I automate Gemini CLI code reviews and get structured output for my pipeline?

Automate Gemini CLI code reviews by running the bridge script to return structured JSON. This output includes a success flag, session identifier, assistant messages, and optional raw message streams, ensuring reproducible automation for prototyping and debugging scenarios.

Can I use Gemini CLI for code review alongside Codex as my primary code implementer?

Yes, you can use Gemini CLI for code review alongside Codex as your primary implementer. This Skill provides a safe, structured way to gather alternative solution proposals from Gemini, avoiding ad-hoc shell calls and inconsistent outputs while maintaining your primary workflow.

What are the limitations of using Gemini CLI as a collaborative code reviewer?

A key limitation is that unified-diff enforcement restricts outputs to patches only, preventing direct file modifications. Users must manually apply the suggested minimal unified-diff patches returned in the structured JSON to their repository files.