gemini-claude-loop
Dual-AI engineering loop orchestrating Claude Code (planning/implementation) and Gemini (validation/review). Use when (1) complex feature development requiring validation, (2) high-quality code with security/performance concerns, (3) large-scale refactoring, (4) user requests gemini-claude loop or dual-AI review. Do NOT use for simple one-off fixes or prototypes.
Best use case
gemini-claude-loop is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Dual-AI engineering loop orchestrating Claude Code (planning/implementation) and Gemini (validation/review). Use when (1) complex feature development requiring validation, (2) high-quality code with security/performance concerns, (3) large-scale refactoring, (4) user requests gemini-claude loop or dual-AI review. Do NOT use for simple one-off fixes or prototypes.
Teams using gemini-claude-loop should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/gemini-claude-loop/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How gemini-claude-loop Compares
| Feature / Agent | gemini-claude-loop | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Dual-AI engineering loop orchestrating Claude Code (planning/implementation) and Gemini (validation/review). Use when (1) complex feature development requiring validation, (2) high-quality code with security/performance concerns, (3) large-scale refactoring, (4) user requests gemini-claude loop or dual-AI review. Do NOT use for simple one-off fixes or prototypes.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Gemini-Claude Engineering Loop ## Workflow Overview ``` Plan (Claude) → Validate (Gemini) → Implement (Claude) → Review (Gemini) → Fix → Re-validate → Done ``` | Role | Responsibility | |------|----------------| | **Claude** | Architecture, planning, code implementation (Edit/Write/Read) | | **Gemini** | Validation, code review, quality assurance | ## Environment Notice > **Non-TTY environment**: See [gemini-cli SKILL](../gemini-cli/SKILL.md#-environment-notice) for CLI fundamentals. > **Key rule**: Always use `gemini -p "prompt"` (headless mode required) ## Phase 0: Pre-flight Check 1. **Create context directory**: ```bash mkdir -p .gemini-loop ``` Add `.gemini-loop/` to your project's `.gitignore` to avoid committing session artifacts. 2. **Ask user via `AskUserQuestion`**: - Model preference (gemini-3-flash-preview (default), gemini-3.1-pro-preview (complex only)) - Role mode preference (Review-Only OR Review+Suggest) ## Phase 1: Planning (Claude) 1. Create detailed implementation plan 2. Break down into clear steps 3. Document assumptions and risks 4. Save to `.gemini-loop/plan.md` ## Phase 2: Plan Validation (Gemini) Ask user for role mode, then execute with `timeout: 600000`: ```bash gemini -m gemini-3-flash-preview -p "Review this plan: $(cat .gemini-loop/plan.md) ..." ``` > **Full prompts by role mode**: See [commands.md](references/commands.md#phase-2-plan-validation-prompts) Save result: `> .gemini-loop/phase2_validation.md` ## Phase 3: Feedback Loop If issues found: 1. Summarize Gemini feedback to user 2. Ask via `AskUserQuestion`: "Revise and re-validate, or proceed?" 3. If revise → Update plan → Repeat Phase 2 ## Phase 4: Implementation (Claude) 1. Implement using Edit/Write/Read tools 2. Execute step-by-step with error handling 3. Save summary to `.gemini-loop/implementation.md` ## Phase 5: Code Review (Gemini) Execute with `timeout: 600000`: ```bash gemini -m gemini-3-flash-preview --include-directories ./src -p "Review: $(cat .gemini-loop/plan.md) $(cat .gemini-loop/implementation.md) ..." ``` > **Full prompts by role mode**: See [commands.md](references/commands.md#phase-5-code-review-prompts) Save result: `> .gemini-loop/phase5_review.md` Claude response by severity: - Critical → Fix immediately - Architectural → Discuss with user - Minor → Document and proceed ## Phase 6: Iteration 1. Apply fixes from `.gemini-loop/phase5_review.md` 2. Significant changes → Re-validate with Gemini 3. Loop until quality standards met ## Session Management - Each loop run uses the `.gemini-loop/` directory for all context files - Overwrite context files on each new run (plan.md, phase2_validation.md, etc.) - Append iteration history to `.gemini-loop/iterations.md` for traceability - If resuming a previous session, read existing context files before proceeding ## Context Files ``` .gemini-loop/ ├── plan.md # Implementation plan ├── phase2_validation.md # Plan validation result ├── implementation.md # Implementation summary ├── phase5_review.md # Code review result └── iterations.md # Iteration history ``` ## Error Handling > **Full error reference**: See [gemini-cli SKILL](../gemini-cli/SKILL.md) for Gemini CLI error details. **Error Recovery Flow**: 1. Non-zero exit or empty output → Stop and report error message 2. Summarize error via `AskUserQuestion` 3. Common issues: - Empty output → Ensure `-p` flag is used (headless mode) - Authentication failure → Check `gemini auth status` - Model unavailable → Fall back to `gemini-3-flash-preview` ## Quick Reference **Always use `timeout: 600000` (10 min)** for all Gemini commands. ## Best Practices - **Always use `gemini -p`** in Claude Code environment (non-TTY, headless mode) - **Always create `.gemini-loop/`** directory at start - **Always save outputs** to context files for traceability - **Always validate plans** before implementation - **Never skip review** after changes - **Default to Review-Only** role mode unless user requests suggestions - **Check model availability** before first Gemini command - **Set 10-minute timeout** for all Gemini commands (`timeout: 600000`) ## References - **Command patterns & prompts**: See [references/commands.md](references/commands.md) - **Gemini CLI fundamentals**: See [gemini-cli SKILL](../gemini-cli/SKILL.md) (models, options, error handling, timeout, JSON output)
Related Skills
gemini-cli
Google Gemini CLI fundamentals for code analysis, review, and validation. Use when (1) executing gemini commands for code review/analysis, (2) configuring models (gemini-3-flash-preview (default)/gemini-3.1-pro-preview (complex only)), output formats (text/json/stream-json), or sandbox modes, (3) managing Gemini sessions with /chat save/resume, (4) integrating Gemini into automation scripts and CI/CD pipelines. Do NOT use for orchestration patterns (use gemini-claude-loop instead).
codex-claude-loop
Dual-AI engineering loop orchestrating Claude Code (planning/implementation) and Codex (validation/review). Use when (1) complex feature development requiring validation, (2) high-quality code with security/performance concerns, (3) large-scale refactoring, (4) user requests codex-claude loop or dual-AI review. Do NOT use for simple one-off fixes or prototypes.
ai-orchestration-feedback-loop
Multi-AI engineering loop orchestrating Claude, Codex, and Gemini for comprehensive validation. USE WHEN (1) mission-critical features requiring multi-perspective validation, (2) complex architectural decisions needing diverse AI viewpoints, (3) security-sensitive code requiring deep analysis, (4) user explicitly requests multi-AI review or triple-AI loop. DO NOT USE for simple features or single-file changes. MODES - Triple-AI (full coverage), Dual-AI Codex-Claude (security/logic), Dual-AI Gemini-Claude (UX/creativity).
unity-vcontainer
VContainer dependency injection expert specializing in IoC container configuration, lifecycle management, and Unity-optimized DI patterns. Masters dependency resolution, scoped containers, and testable architecture design. Use PROACTIVELY for VContainer setup, service registration, or SOLID principle implementation.
unity-unitask
UniTask library expert specializing in allocation-free async/await patterns, coroutine migration, and Unity-optimized asynchronous programming. Masters UniTask performance optimizations, cancellation handling, and memory-efficient async operations. Use PROACTIVELY for UniTask implementation, async optimization, or coroutine replacement.
unity-unirx
UniRx (Reactive Extensions) library expert for legacy Unity projects. Specializes in UniRx-specific patterns, Observable streams, and ReactiveProperty. Use for maintaining existing UniRx codebases. For new projects, use unity-r3 skill instead.
unity-ui
Build and optimize Unity UI with UI Toolkit and UGUI. Masters responsive layouts, event systems, and performance optimization. Use for UI implementation, Canvas optimization, or cross-platform UI challenges.
unity-textmeshpro
TextMeshPro (TMPro) expert for Unity text rendering with advanced typography, performance optimization, and professional text effects. Masters font asset creation, dynamic fonts, rich text formatting, material presets, and text mesh optimization. Use PROACTIVELY for text rendering, font management, localization text, UI text performance, or text effects implementation.
unity-testrunner
Unity Test Framework CLI automation and test writing patterns. Masters batchmode execution, NUnit assertions, EditMode/PlayMode testing, and TDD workflows. Use PROACTIVELY for test automation, CI/CD pipelines, or test-driven development in Unity.
unity-r3
R3 (Reactive Extensions) library expert specializing in modern reactive programming patterns, event-driven architectures, and Observable streams. Masters R3-specific features, async enumerable integration, and Unity-optimized reactive patterns. Use PROACTIVELY for R3 implementation, reactive programming, or MVVM/MVP architecture.
unity-performance
Optimize Unity game performance through profiling, draw call reduction, and resource management. Masters batching, LOD, occlusion culling, and mobile optimization. Use for performance bottlenecks, frame rate issues, or optimization strategies.
unity-networking
Implement multiplayer games with Unity Netcode, Mirror, or Photon. Masters client-server architecture, state synchronization, and lag compensation. Use for multiplayer features, networking issues, or real-time synchronization.