Skills for Claude Code CLI such as full stack dev Cloudflare, React, Tailwind v4, and AI integrations.
Python aianthropicautomationclaude-codeclaude-skillscloudflaredevtoolsproductivityreactskillstailwindvite
refactor: Simplify Gemini CLI skills and add to marketplace
Jeremy Dawesf683b34e4464
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonindex 74030f04..b12867a7 100644--- a/.claude-plugin/marketplace.json+++ b/.claude-plugin/marketplace.json@@ -516,6 +516,34 @@"license": "MIT","repository": "https://github.com/jezweb/claude-skills"},+ {+ "name": "google-gemini-file-search",+ "source": "./skills/google-gemini-file-search",+ "description": "Fully managed RAG system using Google Gemini File Search API. No vector database needed - automatic chunking, embedding generation, and semantic search with citations.",+ "version": "1.0.0-beta",+ "category": "ai",+ "keywords": ["google", "gemini", "file-search", "RAG", "semantic-search", "documents"],+ "author": {+ "name": "Jeremy Dawes",+ "email": "[email protected]"+ },+ "license": "MIT",+ "repository": "https://github.com/jezweb/claude-skills"+ },+ {+ "name": "gemini-cli",+ "source": "./skills/gemini-cli",+ "description": "Use Google Gemini CLI directly from Claude Code for second opinions, architectural advice, debugging help, code reviews, and security audits.",+ "version": "2.0.0",+ "category": "tooling",+ "keywords": ["gemini-cli", "google", "gemini", "second-opinion", "code-review", "security-audit"],+ "author": {+ "name": "Jeremy Dawes",+ "email": "[email protected]"+ },+ "license": "MIT",+ "repository": "https://github.com/jezweb/claude-skills"+ },{"name": "claude-api","source": "./skills/claude-api",diff --git a/MARKETPLACE.md b/MARKETPLACE.mdindex 1776c592..ce7e9b51 100644--- a/MARKETPLACE.md+++ b/MARKETPLACE.md@@ -1,6 +1,6 @@# Claude Skills Marketplace-Welcome to the **claude-skills** marketplace - a curated collection of 60 production-ready skills for Claude Code CLI.+Welcome to the **claude-skills** marketplace - a curated collection of 62 production-ready skills for Claude Code CLI.## Quick Start@@ -33,7 +33,7 @@ Claude: [Automatically uses cloudflare-worker-base skill]----## Available Skills (60)+## Available Skills (62)### Cloudflare Platform (22 skills)@@ -64,7 +64,7 @@ Core infrastructure and services for edge computing:| `cloudflare-full-stack-integration` | Integrate multiple CF services || `cloudflare-sandbox` | Testing and development environment |-### AI & Machine Learning (13 skills)+### AI & Machine Learning (14 skills)LLM integrations, agents, and AI frameworks:@@ -78,6 +78,7 @@ LLM integrations, agents, and AI frameworks:| `openai-responses` | Conversational AI applications || `google-gemini-api` | Google Gemini multimodal models || `google-gemini-embeddings` | Gemini embeddings for search |+| `google-gemini-file-search` | Managed RAG with File Search API || `claude-api` | Anthropic Claude API integration || `claude-agent-sdk` | Claude autonomous agents || `thesys-generative-ui` | LLM-powered dynamic UI |@@ -129,7 +130,7 @@ ORMs and serverless databases:| `vercel-kv` | Vercel KV Redis storage || `vercel-blob` | Vercel Blob file storage |-### Tooling & Planning (9 skills)+### Tooling & Planning (10 skills)Development tools and workflow automation:@@ -138,6 +139,7 @@ Development tools and workflow automation:| `project-workflow` | Complete project lifecycle with 7 slash commands || `project-planning` | Generate planning docs || `project-session-management` | Session handoff protocol |+| `gemini-cli` | Use Gemini CLI for second opinions and code review || `typescript-mcp` | Build MCP servers with TypeScript || `fastmcp` | FastMCP Python framework || `firecrawl-scraper` | Web scraping API integration |@@ -256,7 +258,7 @@ MIT License - see [LICENSE](LICENSE) for details.----**Last Updated**: 2025-11-07+**Last Updated**: 2025-11-13**Marketplace Version**: 1.0.0-**Skills**: 60+**Skills**: 62**Maintainer**: Jeremy Dawes | Jezwebdiff --git a/README.md b/README.mdindex fc00a39e..74b4640a 100644--- a/README.md+++ b/README.md@@ -50,9 +50,9 @@ Skills will be available in Claude Code and automatically suggested when relevan----## π¦ Available Skills (60 Production-Ready)+## π¦ Available Skills (62 Production-Ready)-**π Full Catalog**: See [MARKETPLACE.md](MARKETPLACE.md) for the complete organized list of all 60 skills by category.+**π Full Catalog**: See [MARKETPLACE.md](MARKETPLACE.md) for the complete organized list of all 62 skills by category.**Below**: Featured skills with detailed descriptions and trigger keywords.@@ -648,15 +648,15 @@ See [tools/statusline/README.md](tools/statusline/README.md) for full documentat## π Skill Categories-All 60 skills are production-ready and organized by domain:+All 62 skills are production-ready and organized by domain:- **Cloudflare Platform** (22 skills) - Workers, D1, R2, KV, AI, Queues, Workflows, Durable Objects, MCP, etc.-- **AI & Machine Learning** (13 skills) - OpenAI, Claude, Gemini, ElevenLabs, Vercel AI SDK, Thesys+- **AI & Machine Learning** (14 skills) - OpenAI, Claude, Gemini, ElevenLabs, Vercel AI SDK, Thesys- **Frontend & UI** (7 skills) - React, Tailwind v4, Forms, State Management, Next.js, Hono- **Auth & Security** (3 skills) - Clerk, Auth.js, Better Auth- **Content Management** (3 skills) - TinaCMS, Sveltia CMS, WordPress- **Database & ORM** (4 skills) - Drizzle, Neon Postgres, Vercel KV/Blob-- **Tooling & Planning** (8 skills) - MCP servers, FastMCP, Hugo, Project Planning, GitHub, Open Source, Firecrawl+- **Tooling & Planning** (10 skills) - MCP servers, FastMCP, Hugo, Project Planning, Workflow, Gemini CLI, GitHub, Open Source, Firecrawl---diff --git a/skills/gemini-cli-integration/.claude-plugin/plugin.json b/skills/gemini-cli-integration/.claude-plugin/plugin.jsondeleted file mode 100644index eb76269c..00000000--- a/skills/gemini-cli-integration/.claude-plugin/plugin.json+++ /dev/null@@ -1,12 +0,0 @@-{- "name": "gemini-cli-integration",- "description": "Production-tested guide for using Google Gemini CLI as a coding assistant within Claude Code workflows. Provides `gemini-coach` command-line wrapper and `/ask-gemini` slash command for getting second opinions, architectural advice, debugging help, code reviews, and security audits from Geminis 1M+ context window. Use when: Need second opinion on architectural decisions, stuck debugging after 2+ attempts, writing security-sensitive code (auth, payments, data handling), planning large refactors (5",- "version": "1.0.0",- "author": {- "name": "Jeremy Dawes",- "email": "[email protected]"- },- "license": "MIT",- "repository": "https://github.com/jezweb/claude-skills",- "keywords": ["gemini-cli","gemini-coach","/ask-gemini","google gemini","second opinion","model comparison","gemini-2.5-flash","gemini-2.5-pro","architectural decisions","debugging assistant","code review gemini","security audit gemini","1M context window","AI pair programming","gemini consultation"]-}diff --git a/skills/gemini-cli-integration/README.md b/skills/gemini-cli-integration/README.mddeleted file mode 100644index 1696f88e..00000000--- a/skills/gemini-cli-integration/README.md+++ /dev/null@@ -1,515 +0,0 @@-# Gemini CLI Integration--**Status**: β Production-Ready | v1.0.0 | Last Updated: 2025-11-09--Use Google Gemini CLI as an AI pair programmer within Claude Code workflows. Get second opinions, architectural advice, debugging help, and comprehensive code reviews using Gemini's 1M+ context window.-------## Auto-Trigger Keywords--This skill should activate when Claude Code encounters these scenarios:--### Commands-- `gemini-coach` (bash wrapper for Gemini CLI)-- `/ask-gemini` (slash command)-- `gemini` (CLI tool)-- `gemini-2.5-flash`, `gemini-2.5-pro` (model names)--### Use Cases-- "second opinion"-- "consult Gemini"-- "peer review"-- "architectural decision"-- "stuck debugging" (after 2+ attempts)-- "security audit"-- "compare implementations"-- "model comparison"-- "Flash vs Pro"-- "1M context window"-- "large codebase analysis"--### Technologies-- Google Gemini-- Gemini CLI-- @google/gemini-cli-- AI pair programming-- AI-to-AI prompting--### Scenarios (Proactive)-- Major architectural decisions (D1 vs KV, Durable Objects vs Workflows, etc.)-- Security-sensitive code (auth, payments, data handling)-- Large refactors (5+ files, core architecture changes)-- Context approaching 70%+ full-- Unfamiliar technology stack-- Debugging failures (2+ attempts on same bug)-------## When to Use--### β Use This Skill When:--- [ ] User asks major architectural question ("Should I use D1 or KV for sessions?")-- [ ] Writing security-sensitive code (auth, payments, PII)-- [ ] Planning large refactor (5+ files or core architecture)-- [ ] Stuck debugging after 2+ failed attempts-- [ ] Context approaching 70%+ capacity, need full codebase analysis-- [ ] Unfamiliar with technology stack or library-- [ ] Need to compare two implementations (old vs new, alternative approaches)-- [ ] User explicitly requests Gemini consultation-- [ ] Want complementary perspective on critical decision-- [ ] Need 1M+ context window for comprehensive analysis--### β Don't Use This Skill When:--- [ ] Simple questions answerable with Claude's knowledge-- [ ] Trivial code reviews (small, non-critical changes)-- [ ] Every single decision (reserve for critical scenarios)-- [ ] API rate limits exceeded-- [ ] No internet connection available-------## Quick Example--**Scenario**: User asks "Should I use D1 or KV for session storage?"--**Claude's Workflow**:-```bash-# 1. Detect architectural decision-# 2. Inform user: "Consulting Gemini for second opinion..."--# 3. Get Gemini's perspective (Pro model)-gemini-coach architect "Should I use Cloudflare D1 or KV for session storage?-App has 1000-5000 DAU, sessions expire after 30 days, need remember me and-multi-device tracking." .--# 4. Synthesize both perspectives-# Claude: "Both viable, depends on priorities"-# Gemini Pro: "D1 recommended for strong consistency"--# 5. Present options with trade-offs-```--**User sees**:-```-Based on consultation with Gemini:--**Gemini's Recommendation (Pro)**: D1-- Strong consistency is critical for sessions-- SQL queries for multi-device tracking easier-- Avoid eventual consistency issues (KV 60s propagation)--**My Analysis**: Both are viable-- D1: Better for consistency, complex queries, multi-device-- KV: Better for edge caching, simple TTL expiry, performance--**Trade-offs**:-- D1: Slightly higher latency but consistent-- KV: Faster at edge but eventual consistency risk--**Recommendation**: For your requirements (multi-device tracking),-D1 is the safer choice due to consistency needs.--Would you like me to implement D1-based sessions?-```-------## What You Get--### Installation Scripts-- `scripts/install-gemini-coach.sh` - Installs gemini-coach binary to ~/.local/bin/-- `scripts/setup-slash-command.sh` - Symlinks /ask-gemini to ~/.claude/commands/-- `scripts/test-connection.sh` - Verifies Gemini CLI is working--### Assets-- `assets/gemini-coach` - Bash wrapper script (v2.3.0) with preset prompts-- `assets/ask-gemini.md` - Slash command template for Claude Code--### Reference Documentation-- `references/gemini-experiments.md` - Complete test results and findings-- `references/models-guide.md` - Flash vs Pro comparison (performance, quality, use cases)-- `references/prompting-strategies.md` - AI-to-AI prompting best practices-- `references/helper-functions.md` - Complete command reference--### Commands & Functions-- `gemini-coach review` - Code review (bugs, security, performance)-- `gemini-coach debug` - Root cause analysis-- `gemini-coach architect` - Architecture advice (Pro model)-- `gemini-coach security` - Security audit-- `gemini-coach quick` - Fast question (no file context)-- `gemini-coach review-dir` - Review directory with context-- `gemini-coach project-review` - Whole codebase analysis-- `gemini-coach compare` - Compare two implementations-- `gemini-coach security-scan` - Comprehensive security audit (Pro model)-------## Known Issues Prevented--Based on systematic testing and production use:--| Issue | Without Skill | With Skill | Severity |-|-------|---------------|------------|----------|-| gemini-2.5-flash-lite 404 error | Try flash-lite, get 404, debug why | Know it's not accessible via CLI, use flash instead | Medium |-| Pro model tool confusion | Pro tries to scan unintended directories | Use Flash for directory scanning, Pro for questions | Medium |-| Opposite recommendations | Get one perspective, might miss trade-offs | Get both Flash and Pro perspectives, understand priorities | High |-| Missing root cause | Fix symptoms, not underlying issue | Gemini identifies root cause vs symptoms | High |-| Security vulnerabilities | Miss vulnerabilities in auth code | Gemini Pro finds SQL injection, XSS, auth flaws with file:line | Critical |-| Architectural blind spots | Single perspective on critical decisions | Complementary perspectives (Claude + Gemini) | High |-| Context limit hit | Can't analyze entire codebase | Use Gemini's 1M context for full analysis | Medium |-| Outdated patterns | Use deprecated approaches | Gemini may have more recent training data | Medium |--**Total Errors Prevented**: 8+-------## Token Efficiency--**Estimated Savings**: ~60-70%--### Without Skill-1. Try approach A β doesn't work (5k tokens)-2. Try approach B β partial success (5k tokens)-3. Research documentation (3k tokens)-4. Try approach C β finally works (5k tokens)-5. Discover security issue later (2k tokens)--**Total**: ~20k tokens, 30-60 minutes--### With Skill-1. Ask Gemini for architectural advice (2k tokens)-2. Get comprehensive comparison with trade-offs-3. Implement correct approach first try (5k tokens)-4. Run security scan before deployment (1k tokens)--**Total**: ~8k tokens, 10-15 minutes--**Savings**: ~12k tokens (60%), 20-45 minutes-------## Installation--### Prerequisites--```bash-# 1. Install Gemini CLI-npm install -g @google/gemini-cli--# 2. Verify version (must be 0.13.0+)-gemini --version--# 3. Authenticate-gemini-# Follow authentication prompts-```--### Automatic Installation (Recommended)--```bash-cd /path/to/claude-skills/skills/gemini-cli-integration/--# Install gemini-coach binary-./scripts/install-gemini-coach.sh--# Setup /ask-gemini slash command-./scripts/setup-slash-command.sh--# Test installation-./scripts/test-connection.sh-```--### Manual Installation--```bash-# Copy gemini-coach to PATH-cp assets/gemini-coach ~/.local/bin/-chmod +x ~/.local/bin/gemini-coach--# Copy /ask-gemini command-cp assets/ask-gemini.md ~/.claude/commands/--# Test-gemini-coach quick "Test question"-```-------## Quick Reference--### Basic Commands--```bash-# Quick question (no file context)-gemini-coach quick "Should I use D1 or KV?"--# Code review-gemini-coach review src/auth.ts--# Debug analysis-cat error.log | gemini-coach debug--# Architecture advice (Pro model)-gemini-coach architect "Best way to handle WebSockets?" .--# Security audit-gemini-coach security src/api/--# Compare implementations-gemini-coach compare ./old-auth.ts ./new-auth.ts--# Comprehensive security scan (Pro model)-gemini-coach security-scan ./src--# Whole project review-gemini-coach project-review "Review for bugs and security"-```--### From Claude Code Session--```-User: "/ask-gemini Should I use D1 or KV for sessions?"-User: "/ask-gemini architect: Best approach for WebSockets in Workers?"-User: "/ask-gemini review src/auth.ts for security vulnerabilities"-```--### Environment Variables--```bash-# Override default model (Flash)-GEMINI_MODEL=gemini-2.5-pro gemini-coach review src/auth.ts--# Use Pro for all commands-export GEMINI_MODEL=gemini-2.5-pro-```-------## Model Selection Guide--### gemini-2.5-flash (Default)--**Use For**: Code reviews, debugging, directory scanning, general questions-**Speed**: ~5-25 seconds-**Quality**: ββββ (very good)-**Prioritizes**: Performance, simplicity, speed--### gemini-2.5-pro--**Use For**: Architecture decisions, security audits, complex reasoning-**Speed**: ~15-30 seconds (often similar to Flash!)-**Quality**: βββββ (excellent)-**Prioritizes**: Correctness, consistency, thoroughness--### When They Disagree--Flash and Pro can give **opposite recommendations** for the same question (both can be valid!).--**Example**: D1 vs KV for sessions-- Flash: Recommends KV (performance-focused)-- Pro: Recommends D1 (consistency-focused)--**Solution**: Get both perspectives for critical decisions, understand trade-offs, choose based on your priorities.-------## Proactive Consultation Patterns--Claude Code should **automatically** invoke Gemini in these scenarios (built into skill):--1. **Architectural Decision Detected**- - Trigger: User asks "Should I use X or Y?"- - Action: Auto-invoke `gemini-coach architect`- - Result: Present both Claude's and Gemini's perspectives--2. **Stuck Debugging (2+ Attempts)**- - Trigger: Same bug after 2 failed fixes- - Action: Auto-invoke `gemini-coach debug`- - Result: Fresh perspective on root cause--3. **Security-Sensitive Code**- - Trigger: Implementing auth, payments, data handling- - Action: Auto-invoke `gemini-coach security-scan` after implementation- - Result: Catch vulnerabilities before deployment--4. **Context >70% Full**- - Trigger: Context usage high, need full codebase analysis- - Action: Auto-invoke `gemini-coach project-review`- - Result: Use Gemini's 1M context for comprehensive analysis--5. **Large Refactor**- - Trigger: Changes affecting 5+ files or core architecture- - Action: Auto-invoke `gemini-coach architect` before starting- - Result: Architectural review prevents issues-------## Production Best Practices--### β Do:--- Synthesize both Claude's and Gemini's perspectives (don't just return Gemini's response)-- Use Pro model for critical architectural decisions-- Mention which model was consulted (Pro vs Flash)-- Automatically invoke Gemini for critical scenarios (proactive)-- Compare models (Flash + Pro) for major decisions-- Use specific prompts ("Check for SQL injection in login" vs "Check this code")-- Run security scans before deploying auth/payments/data handling-- Store important Gemini analyses in docs/ for future reference-- Verify Gemini's recommendations against official docs--### β Don't:--- Return Gemini's response directly without synthesis-- Use Gemini for trivial questions/reviews-- Overuse Gemini (reserve for critical scenarios)-- Trust Gemini blindly (verify recommendations)-- Use flash-lite model (not accessible via CLI)-- Use Pro for directory scanning (gets confused, use Flash instead)-------## Example Workflow--**User**: "I need to implement JWT authentication"--**Claude (internal process)**:-```typescript-// 1. Detect security-sensitive code-const isSecuritySensitive = detect(["auth", "JWT"])--// 2. Implement feature-await implementJWTAuth()--// 3. Auto-invoke security scan-await sendMessage("Running security audit with Gemini...")-const findings = await geminiCoach.securityScan("./src/auth")--// 4. Review findings-/*- - SQL injection (line 15)- - Weak JWT secret (line 23)- - No token expiration (line 28)- - Password leaked in response (line 35)- - Missing rate limiting-*/--// 5. Fix issues before user sees vulnerable code-await fixSecurityIssues(findings)--// 6. Inform user-await sendMessage(`-JWT auth implemented. Security audit identified and fixed 5 issues:-β SQL injection β Parameterized queries-β Weak secret β Strong random secret in env-β Token expiration β 1 hour expiry-β Password leak β Excluded from response-β Rate limiting β Implemented with KV--Ready to test!-`)-```--**User sees**: Secure implementation from the start, no vulnerabilities.-------## Troubleshooting--### gemini-coach: command not found--```bash-# Check if file exists-ls -la ~/.local/bin/gemini-coach--# If missing, reinstall-./scripts/install-gemini-coach.sh--# Verify ~/.local/bin is in PATH-echo $PATH | grep ".local/bin"--# If not, add to ~/.bashrc-export PATH="$HOME/.local/bin:$PATH"-source ~/.bashrc-```--### 404 Error--**Cause**: Trying to use `gemini-2.5-flash-lite` (not accessible via CLI)--**Fix**: Use `gemini-2.5-flash` or `gemini-2.5-pro` instead--### Not Authenticated--```bash-gemini-# Follow authentication prompts-```--### Outdated Gemini CLI--```bash-npm install -g @google/gemini-cli@latest-gemini --version # Should be 0.13.0+-```-------## File Structure--```-gemini-cli-integration/-βββ SKILL.md # Main skill documentation (~2,000 lines)-βββ README.md # This file-βββ scripts/-β βββ install-gemini-coach.sh # Install binary-β βββ setup-slash-command.sh # Setup slash command-β βββ test-connection.sh # Test installation-βββ references/-β βββ gemini-experiments.md # Test results-β βββ models-guide.md # Flash vs Pro comparison-β βββ prompting-strategies.md # AI-to-AI prompting-β βββ helper-functions.md # Command reference-βββ assets/- βββ gemini-coach # Bash wrapper (v2.3.0)- βββ ask-gemini.md # Slash command template-```-------## References--- **Gemini CLI**: https://www.npmjs.com/package/@google/gemini-cli-- **Gemini API**: https://ai.google.dev/gemini-api/docs-- **Official Skill Spec**: https://github.com/anthropics/skills-- **Claude Code Docs**: https://docs.claude.com/en/docs/claude-code/skills-------## Version History--**v1.0.0 (2025-11-09)**:-- Initial release-- gemini-coach v2.3.0 included-- Flash vs Pro comparison documented-- AI-to-AI prompting best practices-- 8+ known issues prevented-- Installation automation-- Comprehensive reference docs-------## License--MIT License-------**Maintained by**: Jeremy Dawes | Jezweb-**Last Updated**: 2025-11-09-**Production Tested**: Yes-**Gemini CLI Version**: 0.13.0+-**gemini-coach Version**: 2.3.0diff --git a/skills/gemini-cli-integration/SKILL.md b/skills/gemini-cli-integration/SKILL.mddeleted file mode 100644index 027381f3..00000000--- a/skills/gemini-cli-integration/SKILL.md+++ /dev/null@@ -1,1607 +0,0 @@-----name: Gemini CLI Integration-description: |- Production-tested guide for using Google Gemini CLI as a coding assistant within Claude Code workflows. Provides `gemini-coach` command-line wrapper and `/ask-gemini` slash command for getting second opinions, architectural advice, debugging help, code reviews, and security audits from Gemini's 1M+ context window.-- Use when: Need second opinion on architectural decisions, stuck debugging after 2+ attempts, writing security-sensitive code (auth, payments, data handling), planning large refactors (5+ files), approaching 70%+ context capacity, unfamiliar with technology stack, want to compare Flash vs Pro model recommendations, need comprehensive codebase analysis, or consulting Gemini for peer review on critical code changes.-- Keywords: gemini-cli, gemini-coach, /ask-gemini, google gemini, second opinion, model comparison, gemini-2.5-flash, gemini-2.5-pro, architectural decisions, debugging assistant, code review gemini, security audit gemini, 1M context window, AI pair programming, gemini consultation, flash vs pro, proactive gemini, gemini helper functions, AI-to-AI prompting, peer review, codebase analysis, gemini CLI wrapper, bash gemini integration, shell scripts gemini, command line AI assistant, gemini architecture advice, gemini debug help, gemini security scan, gemini code compare-license: MIT-metadata:- version: 1.0.0- production_tested: true- gemini_coach_version: 2.3.0- gemini_cli_version: 0.13.0+- last_verified: 2025-11-08- token_savings: ~60-70%- errors_prevented: 8+------# Gemini CLI Integration--**Leverage Gemini's 1M+ context window as your AI pair programmer within Claude Code workflows.**--This skill teaches Claude Code how to use Google Gemini CLI via the `gemini-coach` bash wrapper and `/ask-gemini` slash command to get second opinions, architectural advice, debugging help, and comprehensive code reviews. Based on production testing and systematic experimentation.-------## Table of Contents--1. [Quick Start](#quick-start)-2. [When to Use Gemini Consultation](#when-to-use-gemini-consultation)-3. [Installation](#installation)-4. [gemini-coach Command Reference](#gemini-coach-command-reference)-5. [/ask-gemini Slash Command](#ask-gemini-slash-command)-6. [Model Selection Guide: Flash vs Pro](#model-selection-guide-flash-vs-pro)-7. [Proactive Consultation Patterns](#proactive-consultation-patterns)-8. [AI-to-AI Prompting Best Practices](#ai-to-ai-prompting-best-practices)-9. [Common Use Cases](#common-use-cases)-10. [Helper Functions Deep Dive](#helper-functions-deep-dive)-11. [Integration Examples](#integration-examples)-12. [Troubleshooting & Known Issues](#troubleshooting--known-issues)-13. [Production Best Practices](#production-best-practices)-------## Quick Start--**Prerequisites**:-- Gemini CLI installed (`npm install -g @google/gemini-cli`)-- Authenticated with Google account (`gemini` command)-- `gemini-coach` script in `~/.local/bin/` (provided in this skill)-- `/ask-gemini` command in `~/.claude/commands/` (provided in this skill)--**Fastest Way to Use**:-```bash-# Quick question (no file context)-gemini-coach quick "Should I use D1 or KV for session storage?"--# Code review with file context-gemini-coach review src/auth.ts--# Architecture advice (uses Pro model)-gemini-coach architect "Best way to handle WebSockets in Workers?" .--# Security audit (uses Pro model, thorough)-gemini-coach security-scan ./src/api/--# Compare two implementations-gemini-coach compare ./old-auth.ts ./new-auth.ts-```--**From within Claude Code session**:-```-User: "/ask-gemini Should I use D1 or KV for sessions?"-Claude: [Consults Gemini, synthesizes both perspectives, presents options]-```-------## When to Use Gemini Consultation--### ALWAYS Consult (Critical Scenarios)--Claude Code should **automatically invoke Gemini** in these situations:--1. **Major Architectural Decisions**- - Example: "Should I use D1 or KV for session storage?"- - Example: "Durable Objects vs Workflows for long-running tasks?"- - Why: Gemini provides complementary perspective, may prioritize different concerns--2. **Security-Sensitive Code Changes**- - Authentication systems- - Payment processing- - Data handling (PII, sensitive data)- - API key/secret management- - Why: Gemini 2.5 Pro excels at security audits with file:line references--3. **Large Refactors**- - Affecting 5+ files- - Core architecture changes- - Database schema migrations- - Why: Gemini's 1M context can analyze entire codebase--4. **Unfamiliar Technologies**- - First time using a library/framework- - New API integration- - Cloudflare service you haven't used- - Why: Gemini may have more recent training data--### CONSIDER Consulting (Judgment Call)--1. **Stuck Debugging**- - Same bug after 2+ failed attempts- - Intermittent errors- - Root cause unclear- - Why: Fresh perspective, different reasoning approach--2. **Large Features**- - Estimated implementation time >4 hours- - Complex state management- - Multi-component interactions- - Why: Architectural review before implementation--3. **Context Approaching Limits**- - Context >70% full- - Need to analyze entire repository- - Multiple related changes- - Why: Gemini's 1M context handles larger codebases--4. **Tech Stack Gaps**- - API/library not recently used- - Deprecated patterns in knowledge- - Breaking changes in framework- - Why: Context7 + Gemini = most current patterns-------## Installation--### Automatic Installation (Recommended)--Run the installation script from this skill:--```bash-cd /path/to/claude-skills/skills/gemini-cli-integration/-./scripts/install-gemini-coach.sh-./scripts/setup-slash-command.sh-./scripts/test-connection.sh-```--### Manual Installation--**Step 1: Install Gemini CLI**-```bash-npm install -g @google/gemini-cli-gemini --version # Should be 0.13.0 or higher-```--**Step 2: Authenticate**-```bash-gemini-# Follow authentication prompts-```--**Step 3: Install gemini-coach Script**-```bash-cp assets/gemini-coach ~/.local/bin/-chmod +x ~/.local/bin/gemini-coach-```--**Step 4: Install /ask-gemini Slash Command**-```bash-cp assets/ask-gemini.md ~/.claude/commands/-```--**Step 5: Test Installation**-```bash-gemini-coach quick "Test question"-# Should return response from Gemini-```-------## gemini-coach Command Reference--`gemini-coach` is a bash wrapper that simplifies Gemini CLI usage with preset prompts and helper functions.--### Basic Commands--#### `gemini-coach review [files...]`-**Purpose**: General code review for bugs, security, performance, best practices--**Prompt Used**:-```-[Claude Code consulting Gemini for peer review]--Task: Code review - check for bugs, logic errors, security vulnerabilities-(SQL injection, XSS, etc.), performance issues, best practice violations,-type safety problems, and missing error handling--Provide direct analysis with file:line references. I will synthesize your-findings with mine before presenting to the developer.-```--**Example**:-```bash-gemini-coach review src/auth.ts src/api/users.ts-```--**Model**: gemini-2.5-flash (default)-**Time**: ~5-25 seconds-**Output**: File:line references with specific issues-------#### `gemini-coach debug [error-message]`-**Purpose**: Root cause analysis for debugging--**Prompt Used**:-```-[Claude Code consulting Gemini for peer review]--Task: Debug analysis - identify root cause (not just symptoms), explain why-it's happening, suggest specific fix with code example, and how to prevent-in future--Provide direct analysis with file:line references. I will synthesize your-findings with mine before presenting to the developer.-```--**Example**:-```bash-cat error.log | gemini-coach debug-# or-gemini-coach debug "TypeError: Cannot read properties of undefined"-```--**Model**: gemini-2.5-flash (sufficient for debugging)-**Time**: ~5-25 seconds-**Strength**: Identifies root cause vs symptoms-------#### `gemini-coach architect [question] [path]`-**Purpose**: Architecture advice with Pro model--**Prompt Used**:-```-[Claude Code consulting Gemini for peer review]--Task: Architecture advice - analyze for architectural anti-patterns,-scalability concerns, maintainability issues, better alternatives, and-potential technical debt--Provide direct analysis with specific, actionable recommendations and-rationale. I will synthesize your findings with mine before presenting-to the developer.-```--**Example**:-```bash-gemini-coach architect "Should I use D1 or KV for sessions?" .-gemini-coach architect "Best way to handle WebSockets in Workers?" ./src-```--**Model**: gemini-2.5-pro (better reasoning)-**Time**: ~15-30 seconds-**Strength**: Thorough trade-off analysis-------#### `gemini-coach security [files...]`-**Purpose**: Security audit--**Prompt Used**:-```-[Claude Code consulting Gemini for peer review]--Task: Security audit - identify SQL injection vulnerabilities, XSS/CSRF risks,-authentication/authorization flaws, insecure data handling, exposed secrets or-credentials, insufficient input validation, and missing rate limiting--Provide direct analysis with file:line references, how to exploit, and how-to fix. I will synthesize your findings with mine before presenting to the-developer.-```--**Example**:-```bash-gemini-coach security src/auth/ src/api/-```--**Model**: gemini-2.5-flash (comprehensive)-**Time**: ~5-25 seconds-------#### `gemini-coach quick "[question]"`-**Purpose**: Fast question with no file context--**Example**:-```bash-gemini-coach quick "Difference between D1 and KV?"-gemini-coach quick "Best way to handle file uploads in Workers?"-```--**Model**: gemini-2.5-flash-**Time**: ~5-15 seconds-**Use When**: No file context needed, just quick answer-------### Helper Functions--#### `gemini-coach review-dir "[prompt]" /path`-**Purpose**: Review directory with full context--**Example**:-```bash-gemini-coach review-dir "Check for security issues" ./src/api-gemini-coach review-dir "Analyze architecture" .-```--**Model**: gemini-2.5-flash (default), or specify with 3rd argument-**Context**: Includes all files in directory (uses `--include-directories`)-------#### `gemini-coach project-review "[prompt]" [/path]`-**Purpose**: Review entire project (current dir by default)--**Example**:-```bash-gemini-coach project-review "Review for bugs and security issues"-gemini-coach project-review "Analyze architecture and suggest improvements" ~/my-project-```--**Model**: gemini-2.5-flash-**Context**: Entire codebase-**Time**: Varies by project size (~15-60s)-------#### `gemini-coach compare /path1 /path2`-**Purpose**: Compare two implementations--**Prompt Used**:-```-[Claude Code consulting Gemini for peer review]--Task: Compare two implementations - analyze key differences in approach,-pros and cons of each, which is better for different use cases, and any-missing features in either--Provide direct analysis with specific comparisons. I will synthesize your-findings with mine before presenting to the developer.-```--**Example**:-```bash-gemini-coach compare ./auth-jwt.ts ./auth-d1-sessions.ts-gemini-coach compare ./old-api/ ./new-api/-```--**Model**: gemini-2.5-flash-**Output**: Side-by-side comparison with trade-offs-------#### `gemini-coach security-scan [/path]`-**Purpose**: Comprehensive security audit (uses Pro model)--**Example**:-```bash-gemini-coach security-scan ./src/api-gemini-coach security-scan . # Entire project-```--**Model**: gemini-2.5-pro (thorough analysis)-**Time**: ~15-30 seconds-**Output**: Vulnerabilities with exploit details and fixes-------### Environment Variables--```bash-# Override default model-GEMINI_MODEL=gemini-2.5-pro gemini-coach review src/auth.ts--# Use Pro for all commands-export GEMINI_MODEL=gemini-2.5-pro-gemini-coach review src/auth.ts-```-------## /ask-gemini Slash Command--The `/ask-gemini` slash command allows manual Gemini consultation from within Claude Code sessions.--### Usage--```-User: "/ask-gemini [question or task]"-Claude: [Executes gemini-coach command, returns result]-```--### Examples--**Quick Question**:-```-User: "/ask-gemini Should I use D1 or KV for session storage?"-```--**Code Review**:-```-User: "/ask-gemini review src/auth.ts for security vulnerabilities"-```--**Architecture Advice**:-```-User: "/ask-gemini architect: Best way to handle WebSockets in Cloudflare Workers?"-```--**Custom Prompt**:-```-User: "/ask-gemini What are the trade-offs between Durable Objects and Workflows for long-running tasks?"-```--### How It Works--1. User invokes `/ask-gemini [prompt]`-2. Claude Code executes appropriate `gemini-coach` command-3. Gemini analyzes and responds-4. Claude synthesizes both perspectives (Claude's + Gemini's)-5. Claude presents options to user with both viewpoints-------## Model Selection Guide: Flash vs Pro--Based on systematic testing (see `references/gemini-experiments.md`), here's when to use each model:--### gemini-2.5-flash (Default)--**Use For**:-- Code reviews-- Debugging (root cause analysis is strong)-- Directory scanning (safer, less likely to use tools aggressively)-- General questions-- When speed matters--**Characteristics**:-- Fast (~5-25 seconds, varies by complexity)-- Good quality for most tasks-- Prioritizes: Performance, simplicity, speed-- Works well with directory context-- Less likely to get confused with file scanning--**Performance**:-- Response time: ~5-25 seconds (tested average: ~20s)-- Quality: ββββ (very good)-- Cost: Lower-------### gemini-2.5-pro--**Use For**:-- Architecture decisions (critical)-- Security audits (thorough)-- Complex reasoning tasks-- When accuracy > speed-- Major refactoring plans--**Characteristics**:-- More thorough (~15-30 seconds)-- Better trade-off analysis-- Prioritizes: Correctness, consistency, thoroughness-- May try to use tools when given directory context (can cause issues)-- Provides comparison tables and structured analysis--**Performance**:-- Response time: ~15-30 seconds (tested average: ~23s, often similar to Flash!)-- Quality: βββββ (excellent)-- Cost: Higher-------### gemini-2.5-flash-lite--**Status**: β **Not accessible via Gemini CLI**--The model exists in the Gemini API but returns 404 error when accessed via Gemini CLI tool. Do not attempt to use this model.-------### When Flash vs Pro Give Different Advice--**Critical Finding from Testing**: Flash and Pro can give **opposite recommendations** for the same question, and **both can be valid**.--**Example** (D1 vs KV for sessions):-- **Flash**: Recommends KV (performance-focused, emphasizes edge caching, TTL)-- **Pro**: Recommends D1 (consistency-focused, emphasizes strong consistency, SQL queries)--**Why This Happens**:-- Flash prioritizes: Performance, simplicity, "usually acceptable" trade-offs-- Pro prioritizes: Correctness, consistency, "critical" requirements--**How to Handle**:-1. For critical/security decisions β Prefer Pro's perspective-2. For performance-sensitive apps β Consider Flash's perspective-3. For major architectural choices β Get both viewpoints:- ```bash- # Get Flash perspective- gemini-coach quick "Should I use D1 or KV for sessions?"-- # Get Pro perspective- GEMINI_MODEL=gemini-2.5-pro gemini-coach architect "Should I use D1 or KV for sessions?" .- ```-4. Present both options to user with clear trade-offs--**Recommendation**: Use Pro for architecture decisions, but understand that Flash's alternative may be valid for different priorities.-------## Proactive Consultation Patterns--Claude Code should **automatically** invoke Gemini in these scenarios (don't wait for user to ask):--### Pattern 1: Architectural Decision Detected--**Trigger**: User asks architecture question or mentions technology choice--**Example**:-```-User: "Should I use D1 or KV for session storage?"--Claude (internal):- 1. Detect architectural decision- 2. Automatically invoke: gemini-coach architect "..."- 3. Synthesize both perspectives- 4. Present options with trade-offs--Claude: "I'm consulting Gemini for a second opinion on this architectural decision..."--[Shows both Claude's and Gemini's perspectives with clear trade-offs]-```-------### Pattern 2: Stuck on Same Bug (2+ Attempts)--**Trigger**: Same error after 2 failed debugging attempts--**Example**:-```-User: "Still getting TypeError after your fix..."--Claude (internal):- 1. Detect repeated debugging failure- 2. Invoke: gemini-coach debug "..."- 3. Get fresh perspective--Claude: "This bug is persistent. Let me consult Gemini for a different perspective on the root cause..."--[Presents Gemini's root cause analysis]-```-------### Pattern 3: Security-Sensitive Code--**Trigger**: Working on auth, payments, data handling, API keys--**Example**:-```-User: "Implement JWT authentication"--Claude (internal):- 1. Detect security-sensitive code- 2. After implementation, invoke: gemini-coach security-scan ./src/auth- 3. Review security findings--Claude: "I've implemented JWT auth. Let me run a security audit with Gemini to check for vulnerabilities..."--[Shows security findings, addresses issues]-```-------### Pattern 4: Context >70% Full--**Trigger**: Context usage high, need entire codebase analysis--**Example**:-```-User: "Review the entire application for bugs"--Claude (internal):- 1. Detect context limit approaching- 2. Invoke: gemini-coach project-review "..."- 3. Use Gemini's 1M context--Claude: "My context is getting full. I'm using Gemini's 1M context window to analyze the entire codebase..."--[Returns comprehensive analysis]-```-------### Pattern 5: Large Refactor--**Trigger**: Changes affecting 5+ files or core architecture--**Example**:-```-User: "Refactor to use Hono instead of Itty Router"--Claude (internal):- 1. Detect large refactor- 2. Invoke: gemini-coach architect "Review refactor plan" .- 3. Get architectural review before starting--Claude: "This is a significant refactor. Let me consult Gemini on the architectural approach before we start..."--[Shows architectural review, potential issues]-```-------### Proactive Workflow Template--```typescript-// Pseudo-code for Claude's internal logic--if (isArchitecturalDecision(userMessage)) {- informUser("Consulting Gemini for second opinion...")- geminiPerspective = await geminiCoach.architect(question, context)- claudePerspective = await analyzeArchitecture(question, context)- presentBothPerspectives(claudePerspective, geminiPerspective)- askUserToDecide()-}--if (stuckOnBugForNAttempts(2)) {- informUser("Getting fresh debugging perspective from Gemini...")- geminiAnalysis = await geminiCoach.debug(errorMessage, context)- revisitDebuggingWithNewPerspective(geminiAnalysis)-}--if (isSecuritySensitiveCode(codeType)) {- informUser("Running security audit with Gemini...")- securityFindings = await geminiCoach.securityScan(codePath)- addressSecurityIssues(securityFindings)-}--if (contextUsage > 0.7) {- informUser("Using Gemini's 1M context for full codebase analysis...")- fullAnalysis = await geminiCoach.projectReview(prompt, projectPath)- return fullAnalysis-}--if (isLargeRefactor(changes)) {- informUser("Consulting Gemini on refactor architecture...")- refactorReview = await geminiCoach.architect(refactorPlan, context)- reviewRefactorPlanWithGemini(refactorReview)-}-```-------## AI-to-AI Prompting Best Practices--All `gemini-coach` commands use **AI-to-AI prompting format** (Option B from testing):--### Format Structure--```-[Claude Code consulting Gemini for peer review]--Task: [Specific task description]--Provide direct analysis with file:line references. I will synthesize your-findings with mine before presenting to the developer.-```--### Why This Format Works--**Benefits** (from systematic testing):-1. **Prevents Role Confusion**: Gemini knows it's advising Claude, not the human developer-2. **Reduces Chattiness**: More direct, less "helpful assistant" framing-3. **Better Output**: File:line references, concrete suggestions-4. **Peer Review Dynamic**: Two AI systems collaborating, not AI β human--**Comparison to Old Format**:--β **Old Format** (less effective):-```-You're an expert security researcher. Review this code for vulnerabilities...-```-- More verbose framing-- "Helpful assistant" tone-- Slightly chattier responses--β **New Format** (recommended):-```-[Claude Code consulting Gemini for peer review]--Task: Security review - identify vulnerabilities...--Provide direct analysis. I will synthesize findings before presenting to developer.-```-- Clear AI-to-AI context-- Direct task description-- Concise, actionable output-------### Custom Prompt Template--When creating custom prompts, follow this template:--```bash-gemini "[Claude Code consulting Gemini for peer review]--Task: [Your specific task here - be concrete and specific]--Provide direct analysis with [file:line references / code examples / specific recommendations]. I will synthesize your findings with mine before presenting to the developer." --yolo -m gemini-2.5-flash-```--**Key Elements**:-1. `[Claude Code consulting Gemini for peer review]` - Establishes AI-to-AI context-2. `Task:` - Clear, specific task description-3. `Provide direct analysis with...` - What format you want-4. `I will synthesize...` - Explains workflow (Gemini β Claude β User)-------## Common Use Cases--### Use Case 1: Architectural Decision--**Scenario**: Choosing between D1 and KV for session storage--**Workflow**:-```bash-# Get both perspectives-gemini-coach quick "D1 vs KV for sessions with 1000-5000 DAU, 30-day expiry, remember me, multi-device tracking?"--GEMINI_MODEL=gemini-2.5-pro gemini-coach architect "Same question" .--# Compare recommendations-# Flash: May recommend KV (performance)-# Pro: May recommend D1 (consistency)--# Present both to user with trade-offs-```--**Output**: Both perspectives, clear trade-offs, user decides based on priorities-------### Use Case 2: Debugging Root Cause--**Scenario**: `TypeError: Cannot read properties of undefined (reading 'name')`--**Workflow**:-```bash-cat buggy-code.ts | gemini-coach debug "TypeError: Cannot read properties of undefined (reading 'name'). Happens randomly on /api/products/:id endpoint."-```--**Expected Analysis** (from testing):-1. Identifies root cause: `result.category` is string or null, not object-2. Explains why: Database schema stores category name directly-3. Provides specific fix with code example-4. Prevention strategies (type safety, optional chaining, tests)-------### Use Case 3: Security Audit--**Scenario**: Review authentication code before deployment--**Workflow**:-```bash-# Comprehensive security scan with Pro model-gemini-coach security-scan ./src/auth--# Or specific files with Flash-gemini-coach security src/auth.ts src/api/users.ts-```--**Expected Findings** (from testing):-- SQL injection vulnerabilities with file:line-- XSS/CSRF risks-- Authentication flaws-- Insecure data handling-- Exposed secrets-- Missing input validation-- Missing rate limiting--**Output Format**:-```-File: `src/auth.ts`--1. **SQL Injection Vulnerability**- - Line 15-17: `db.prepare(\`SELECT * FROM users WHERE email = '${email}'\`)`- - Vulnerability: User input directly interpolated into SQL query- - Exploit: `email = "'; DROP TABLE users; --"`- - Fix: Use parameterized queries: `.prepare('SELECT * FROM users WHERE email = ?').bind(email)`-```-------### Use Case 4: Comparing Implementations--**Scenario**: Compare JWT-based auth vs D1 session-based auth--**Workflow**:-```bash-gemini-coach compare ./auth-jwt.ts ./auth-d1-sessions.ts-```--**Expected Output**:-- Key differences in approach-- Pros/cons of each-- Which is better for different use cases-- Missing features in either implementation-------### Use Case 5: Whole Project Review--**Scenario**: Context approaching limit, need full codebase analysis--**Workflow**:-```bash-cd ~/my-project-gemini-coach project-review "Review for bugs, security issues, and performance problems"-```--**Benefits**:-- Gemini's 1M context handles entire codebase-- Comprehensive analysis across files-- Identifies patterns and architectural issues-- Saves Claude's context for synthesis and fixes-------## Helper Functions Deep Dive--### gemini-quick()--**Source** (`gemini-coach` line 53-57):-```bash-gemini-quick() {- local prompt="$1"- show_model_info "$DEFAULT_MODEL"- gemini "$prompt" --yolo -m "$DEFAULT_MODEL" 2>&1 | grep -v "^Loaded\|^YOLO\|^Data collection"-}-```--**Purpose**: Fast answers without file context--**When to Use**:-- Quick questions-- No file analysis needed-- Comparing technologies-- Best practices--**Example**:-```bash-gemini-coach quick "Best way to handle file uploads in Cloudflare Workers?"-```-------### gemini-review()--**Source** (`gemini-coach` line 61-81):-```bash-gemini-review() {- local prompt="$1"- local dir="${2:-.}"- local model="${3:-$DEFAULT_MODEL}"-- # Resolve to absolute path- dir=$(cd "$dir" 2>/dev/null && pwd || echo "$dir")-- if [ ! -d "$dir" ] && [ ! -f "$dir" ]; then- echo "Error: Path not found: $dir" >&2- return 1- fi-- show_model_info "$model"-- # Run from /tmp to avoid including CWD in context- (cd /tmp && gemini "$prompt" \- --include-directories "$dir" \- --yolo \- -m "$model" 2>&1 | grep -v "^Loaded\|^YOLO\|^Data collection")-}-```--**Purpose**: Review with directory/file context--**Key Feature**: Runs from `/tmp` to avoid polluting context with CWD files--**When to Use**:-- Directory-based reviews-- Need file context-- Analyzing related files--**Example**:-```bash-gemini-coach review-dir "Check for security issues" ./src/api-```-------### gemini-architect()--**Source** (`gemini-coach` line 84-88):-```bash-gemini-architect() {- local prompt="$1"- local dir="${2:-.}"- gemini-review "$prompt" "$dir" "$DEFAULT_PRO_MODEL"-}-```--**Purpose**: Architecture advice with Pro model--**Key Feature**: Always uses Pro model for better reasoning--**When to Use**:-- Architectural decisions-- Technology choices-- Refactoring plans-- Scalability concerns--**Example**:-```bash-gemini-coach architect "Should I use Durable Objects or Workflows?" .-```-------### gemini-compare()--**Source** (`gemini-coach` line 103-153):-```bash-gemini-compare() {- local path1="$1"- local path2="$2"-- # Validation and path resolution...-- show_model_info "$DEFAULT_MODEL"-- echo "Comparing:" >&2- echo " 1) $path1" >&2- echo " 2) $path2" >&2-- (cd /tmp && gemini "[Claude Code consulting Gemini for peer review]--Task: Compare two implementations - analyze key differences in approach,-pros and cons of each, which is better for different use cases, and any-missing features in either--Provide direct analysis with specific comparisons. I will synthesize your-findings with mine before presenting to the developer." \- --include-directories "$path1" \- --include-directories "$path2" \- --yolo \- -m "$DEFAULT_MODEL" 2>&1 | grep -v "^Loaded\|^YOLO\|^Data collection")-}-```--**Purpose**: Compare two implementations side-by-side--**Key Feature**: Includes both paths in context for direct comparison--**When to Use**:-- Comparing old vs new implementation-- Evaluating refactors-- Choosing between approaches--**Example**:-```bash-gemini-coach compare ./auth-v1 ./auth-v2-```--**Expected Output**:-- Approach differences-- Pros/cons of each-- Use case recommendations-- Missing features-------### gemini-security-scan()--**Source** (`gemini-coach` line 156-171):-```bash-gemini-security-scan() {- local target="${1:-.}"-- echo "π Security Scan: $target" >&2- echo "Using gemini-2.5-pro for thorough analysis" >&2-- gemini-review \- "[Claude Code consulting Gemini for comprehensive security audit]--Task: Security audit - identify SQL injection vulnerabilities, XSS/CSRF risks,-authentication/authorization flaws, insecure data handling, exposed secrets or-credentials, insufficient input validation, missing rate limiting, insecure-dependencies, and improper error handling--Provide direct analysis with file:line references, how to exploit, and how to-fix. I will synthesize your findings with mine before presenting to the developer." \- "$target" \- "$DEFAULT_PRO_MODEL"-}-```--**Purpose**: Comprehensive security audit with Pro model--**Key Feature**: Uses Pro model for thorough analysis, includes exploit details--**When to Use**:-- Before deployment-- After implementing auth/payments-- Security-sensitive code changes-- Compliance reviews--**Example**:-```bash-gemini-coach security-scan ./src/api-```-------## Integration Examples--### Example 1: Claude Detects Architectural Decision--**User Message**:-```-"I need to store user sessions. Should I use D1 or KV?"-```--**Claude's Internal Process**:-```typescript-// 1. Detect architectural decision-const isArchitecturalDecision = detectPattern(userMessage)--// 2. Inform user-await sendMessage("π€ This is an important architectural decision. Let me consult Gemini for a second opinion...")--// 3. Get Gemini's perspective (Pro model for architecture)-const geminiPerspective = await executeCommand(`- gemini-coach architect "Should I use Cloudflare D1 or KV for session storage?- The app will have moderate traffic (1000-5000 DAU), sessions need to expire- after 30 days of inactivity, and I need to support 'remember me' and- multi-device login tracking." .-`)--// 4. Analyze with Claude's perspective-const claudePerspective = analyzeSessionStorage({- traffic: "1000-5000 DAU",- expiry: "30 days inactivity",- features: ["remember me", "multi-device tracking"]-})--// 5. Synthesize both perspectives-const synthesis = {- gemini: {- recommendation: "D1",- reasoning: "Strong consistency critical for sessions, SQL queries for multi-device tracking",- tradeoffs: "Slightly higher latency than KV"- },- claude: {- recommendation: "D1 or KV depending on priorities",- reasoning: "Both valid, depends on consistency vs performance priorities",- tradeoffs: "D1: consistency. KV: edge caching, TTL"- }-}--// 6. Present options-await sendMessage(`-Based on consultation with Gemini, here are the perspectives:--**Gemini's Recommendation (Pro)**: D1-- Strong consistency is critical for session management-- SQL queries make multi-device tracking easier-- Avoid eventual consistency issues (KV has 60s propagation)--**My Analysis**: Both are viable-- D1: Better for consistency, multi-device queries, complex session data-- KV: Better for edge caching, simple TTL-based expiry, performance--**Trade-offs**:-- D1: Slightly higher latency but consistent-- KV: Faster at edge but eventual consistency risk--**Recommendation**: For your requirements (multi-device tracking, remember me),-**D1 is the safer choice** due to consistency needs.--Would you like me to:-1. Implement D1-based sessions-2. Implement KV-based sessions (if performance > consistency)-3. Show comparison code for both approaches-`)-```-------### Example 2: Stuck on Bug After 2 Attempts--**Scenario**:-```-User: "Still getting TypeError after your fix..."-```--**Claude's Internal Process**:-```typescript-// 1. Detect repeated debugging failure-const attemptCount = getDebugAttempts(currentIssue)-if (attemptCount >= 2) {-- // 2. Inform user- await sendMessage("This bug is persistent. Let me consult Gemini for a different perspective on the root cause...")-- // 3. Get Gemini's debug analysis- const errorContext = gatherErrorContext({- errorMessage: "TypeError: Cannot read properties of undefined (reading 'name')",- code: readFile("src/api/products.ts"),- previousAttempts: [attempt1, attempt2]- })-- const geminiAnalysis = await executeCommand(`- cat src/api/products.ts | gemini-coach debug "${errorContext.errorMessage}"- `)-- // 4. Analyze Gemini's findings- /*- Gemini identified:- - Root cause: result.category is string, not object- - Why: Database schema stores category name directly- - Fix: result.category (not result.category.name)- - Prevention: Type safety, optional chaining- */-- // 5. Implement fix based on fresh perspective- await sendMessage(`-Gemini identified a different root cause:--**The Issue**: \`result.category\` is a string (category name), not an object.--**Why**: The D1 query selects all columns from the \`products\` table, where-\`category\` is stored as a string (the category name), not a reference to a-category object.--**Fix**:-\`\`\`typescript-return c.json({- id: result.id,- name: result.name,- price: result.price,- description: result.description,- category: result.category // Already a string, not an object-})-\`\`\`--**Prevention**:-1. Add TypeScript interface for query results-2. Use optional chaining: \`result.category?.name ?? result.category\`-3. Check database schema vs. code expectations--Let me implement this fix...- `)-}-```-------### Example 3: Security-Sensitive Code--**User Message**:-```-"Implement JWT authentication for the API"-```--**Claude's Internal Process**:-```typescript-// 1. Detect security-sensitive code-const isSecuritySensitive = detectPattern(userMessage, ["auth", "JWT", "authentication"])--// 2. Implement feature-await implementJWTAuth()--// 3. Run security audit automatically-await sendMessage("I've implemented JWT authentication. Let me run a security audit with Gemini to check for vulnerabilities...")--const securityFindings = await executeCommand(`- gemini-coach security-scan ./src/auth-`)--// 4. Review findings-/*- Gemini found:- - Weak JWT secret- - No token expiration- - Missing rate limiting- - Password leaked in response-*/--// 5. Address security issues-await sendMessage(`-Security audit complete. Gemini identified 4 issues:--1. β **Weak JWT Secret** (src/auth.ts:15)- - Current: \`"secret"\` (hardcoded)- - Fix: Use \`crypto.randomBytes(32).toString('hex')\` stored in env--2. β **No Token Expiration** (src/auth.ts:23)- - Tokens never expire (security risk)- - Fix: Add \`exp: Date.now() + 3600000\` (1 hour)--3. β **Missing Rate Limiting** (src/auth.ts:10)- - Allows brute force attacks- - Fix: Implement rate limiting with KV--4. β **Password in Response** (src/auth.ts:28)- - Returns full user object including password hash- - Fix: Exclude password from response--Let me fix these issues before we proceed...-`)--await fixSecurityIssues(securityFindings)-```-------## Troubleshooting & Known Issues--### Issue 1: 404 Error with flash-lite Model--**Error**:-```-Error when talking to Gemini API-[API Error: {- "error": {- "code": 404,- "message": "Requested entity was not found."- }-}]-```--**Cause**: `gemini-2.5-flash-lite` exists in Gemini API but not accessible via Gemini CLI--**Fix**: Do not use flash-lite. Use `gemini-2.5-flash` or `gemini-2.5-pro` instead--**Status**: Documented in gemini-coach v2.3.0, removed from available models-------### Issue 2: Pro Model Gets Confused with Directory Scanning--**Symptom**: When using `gemini-coach security-scan` with Pro model, Gemini tries to use `codebase_investigator` tool and scans unintended directories--**Example**:-```bash-gemini-coach security-scan /tmp/test-auth-code.ts-# Pro model tries to scan entire /tmp directory-# Returns: [WARN] Skipping unreadable directory...-# GrepLogic: ripgrep failed: Permission denied-```--**Cause**: Pro model is more aggressive about using tools when given directory/file context--**Workaround**:-- Use Flash model for directory scanning tasks-- Use Pro for specific questions or architecture advice (not directory scanning)--**Status**: Known limitation, documented in v2.3.0-------### Issue 3: Gemini CLI Not Authenticated--**Error**:-```-Error: Not authenticated. Run 'gemini' to authenticate.-```--**Cause**: Gemini CLI not authenticated with Google account--**Fix**:-```bash-gemini-# Follow authentication prompts-```--**Verify**:-```bash-gemini-coach quick "Test question"-# Should return response-```-------### Issue 4: Outdated Gemini CLI Version--**Error**:-```-Error: --include-directories not recognized-```--**Cause**: Gemini CLI version < 0.13.0--**Fix**:-```bash-npm install -g @google/gemini-cli@latest-gemini --version-# Should be 0.13.0 or higher-```--**Required Version**: 0.13.0+ (for `--include-directories` support)-------### Issue 5: gemini-coach Command Not Found--**Error**:-```bash-gemini-coach: command not found-```--**Cause**: Script not in PATH or not executable--**Fix**:-```bash-# Check if file exists-ls -la ~/.local/bin/gemini-coach--# If missing, copy from skill assets-cp /path/to/skill/assets/gemini-coach ~/.local/bin/--# Make executable-chmod +x ~/.local/bin/gemini-coach--# Verify ~/.local/bin is in PATH-echo $PATH | grep ".local/bin"--# If not in PATH, add to ~/.bashrc or ~/.zshrc:-export PATH="$HOME/.local/bin:$PATH"-source ~/.bashrc-```-------### Issue 6: Rate Limit Exceeded--**Error**:-```-Error: Rate limit exceeded. Try again later.-```--**Cause**: Too many Gemini API requests in short time--**Fix**:-- Wait 1-5 minutes before retrying-- Use Flash model (lower cost, higher quota)-- Check Gemini API usage limits-------### Issue 7: Context Too Large for Gemini--**Symptom**: Timeout or truncated responses when analyzing very large codebases--**Workaround**:-- Break analysis into smaller chunks-- Review specific directories instead of entire project-- Use `--max-tokens` if supported in future Gemini CLI versions--**Status**: Rare, but possible with very large projects (>1M tokens)-------## Production Best Practices--### Best Practice 1: Always Synthesize Perspectives--β **Don't**: Return Gemini's response directly to user--β **Do**: Synthesize Claude's and Gemini's perspectives--**Example**:-```-User: "Should I use D1 or KV?"--β Bad:-"Gemini says: Use D1 because..."--β Good:-"I consulted Gemini for a second opinion:--**Gemini's Recommendation**: D1-- Strong consistency is critical-- SQL queries for multi-device tracking--**My Analysis**: Both are viable-- D1: Better for consistency-- KV: Better for edge performance--**Trade-offs**: [comparison table]--Based on your requirements (multi-device tracking), I recommend D1."-```-------### Best Practice 2: Use Pro for Critical Decisions--For these scenarios, **always use Pro model**:-- Architecture decisions-- Security audits-- Major refactors-- Production deployment reviews--**Why**: Pro provides more thorough analysis, better trade-off reasoning--**How**:-```bash-GEMINI_MODEL=gemini-2.5-pro gemini-coach architect "..." .-```-------### Best Practice 3: Document Model Used--When presenting Gemini's analysis, **mention which model was consulted**:--```-"I consulted Gemini 2.5 Pro for architectural advice..."-"Gemini Flash identified these security issues..."-```--**Why**: Helps user understand quality/depth of analysis-------### Best Practice 4: Proactive Consultation--**Don't wait** for user to ask for Gemini consultation. **Automatically invoke** for:-- Architectural decisions-- Security-sensitive code-- Stuck debugging (2+ attempts)-- Large refactors--**Inform user**: "Consulting Gemini for second opinion..."-------### Best Practice 5: Compare Models for Major Decisions--For critical architectural decisions, **get both perspectives**:--```bash-# Flash perspective-gemini-coach quick "Should I use D1 or KV for sessions?"--# Pro perspective-GEMINI_MODEL=gemini-2.5-pro gemini-coach architect "Same question" .--# Present both, explain differences-```--**Why**: Flash and Pro may prioritize different concerns (both valid)-------### Best Practice 6: Use Specific Prompts--β **Vague**: `gemini-coach review "Check this code"`--β **Specific**: `gemini-coach review "Check for SQL injection, XSS, and auth flaws in login endpoint"`--**Why**: Specific prompts get better, more focused analysis-------### Best Practice 7: Run Security Scans Before Deployment--**Always** run security scan before deploying:-- Authentication changes-- Payment processing-- Data handling updates-- API endpoints--```bash-gemini-coach security-scan ./src-```--**Why**: Catches vulnerabilities Claude might miss-------### Best Practice 8: Store Gemini Findings--Save important Gemini analyses for future reference:--```bash-gemini-coach architect "Should I use D1 or KV for sessions?" . > docs/architecture-decisions/sessions.md-```--**Why**: Architectural decisions are documented, can be revisited-------### Best Practice 9: Don't Overuse Gemini--**Use Gemini for**:-- Critical decisions-- Security reviews-- Complex debugging-- Large refactors--**Don't use Gemini for**:-- Simple questions (use Claude's knowledge)-- Trivial code reviews-- Every single decision--**Why**: Saves API costs, faster workflow-------### Best Practice 10: Verify Gemini's Recommendations--**Always verify** Gemini's suggestions:-- Check against official documentation-- Test recommended code-- Use Context7 MCP for current API references--**Why**: Gemini can be wrong, especially for cutting-edge APIs-------## References--- **Gemini CLI Documentation**: https://www.npmjs.com/package/@google/gemini-cli-- **Gemini API Documentation**: https://ai.google.dev/gemini-api/docs-- **Model Comparison**: See `references/models-guide.md`-- **Experiment Results**: See `references/gemini-experiments.md`-- **Prompting Strategies**: See `references/prompting-strategies.md`-- **Helper Functions**: See `references/helper-functions.md`-------## Installation Files--**Assets** (in this skill):-- `assets/gemini-coach` - Main bash wrapper script (v2.3.0)-- `assets/ask-gemini.md` - Slash command for Claude Code--**Scripts** (installation automation):-- `scripts/install-gemini-coach.sh` - Installs binary to ~/.local/bin/-- `scripts/setup-slash-command.sh` - Symlinks /ask-gemini to ~/.claude/commands/-- `scripts/test-connection.sh` - Verifies Gemini CLI is working--**References** (deep-dive documentation):-- `references/gemini-experiments.md` - Complete test results-- `references/models-guide.md` - Flash vs Pro comparison-- `references/prompting-strategies.md` - AI-to-AI prompting patterns-- `references/helper-functions.md` - Command reference-------## Version History--**v1.0.0 (2025-11-09)**:-- Initial skill release-- Includes gemini-coach v2.3.0-- Documented Flash vs Pro differences-- AI-to-AI prompting best practices-- 8+ known issues prevented-- Production-tested patterns-- Installation automation-- Comprehensive reference documentation-------## License--MIT License - See LICENSE file-------**Last Updated**: 2025-11-09-**Production Tested**: Yes-**Gemini CLI Version**: 0.13.0+-**gemini-coach Version**: 2.3.0diff --git a/skills/gemini-cli-integration/assets/ask-gemini.md b/skills/gemini-cli-integration/assets/ask-gemini.mddeleted file mode 100644index cb6e3f51..00000000--- a/skills/gemini-cli-integration/assets/ask-gemini.md+++ /dev/null@@ -1,620 +0,0 @@-# Ask Gemini--Get a second opinion from Gemini CLI on code, architecture, or debugging questions.--**Purpose**: Consult Gemini as a "coding coach" for fresh perspectives when stuck or making critical decisions.--**Modes**:-- **Manual**: User explicitly requests Gemini consultation (original workflow)-- **Proactive**: Claude Code automatically consults Gemini when detecting critical scenarios (see "Proactive Usage" section below)-------## CRITICAL: AI-to-AI Prompting Strategy--**Identity Clarity** (Updated v2.2.0)--When consulting Gemini, ALWAYS use the AI-to-AI peer review format to prevent role confusion:--```-[Claude Code consulting Gemini for peer review]--Task: [Specific task description]--Provide direct analysis with file:line references. I will synthesize your findings with mine before presenting to the developer.-```--**Why This Matters**:-- β **Old way**: "You're an expert..." β Gemini thinks it's talking to the human-- β **New way**: "[Claude Code consulting Gemini...]" β Clear AI-to-AI relationship--**Results**:-- No "How can I help you?" chattiness-- Direct, actionable analysis-- Clear file:line references-- Gemini knows its role is to advise me (Claude Code), not the end user-------## Your Task--Follow these steps to get Gemini's expert opinion.--### 1. Understand the Request--Ask user what they need help with:--```-What would you like Gemini to help with?-1. Code Review - Review specific files for bugs, best practices-2. Architecture Advice - Feedback on design decisions-3. Debugging Help - Analyze errors and suggest fixes-4. Skill Analysis - Review entire skill for completeness-5. Documentation Check - Verify docs against official sources-6. Custom Question - Anything else--Your choice (1-6):-```--### 2. Gather Context--Based on request type:--**For Code Review (Option 1)**:-- Ask: "Which files should I have Gemini review? (paths or glob pattern)"-- Ask: "Any specific concerns? (performance, security, type safety, etc.)"-- Optional: "Any official doc URLs for reference? (e.g., React docs, Cloudflare docs)"--**For Architecture Advice (Option 2)**:-- Ask: "Describe the architectural decision or problem"-- Ask: "Any relevant code files to include?"-- Optional: "URLs to relevant patterns or best practices docs?"--**For Debugging Help (Option 3)**:-- Ask: "Paste the error message or describe the bug"-- Ask: "Which files contain the problematic code?"-- Optional: "What have you already tried?"--**For Skill Analysis (Option 4)**:-- Ask: "Which skill should Gemini analyze? (skill folder name)"-- Automatically include: SKILL.md, README.md, templates/-- Optional: "Any official docs URLs to verify against?"--**For Documentation Check (Option 5)**:-- Ask: "Which documentation files to review?"-- Ask: "URLs to official docs for comparison (required for this task)"--**For Custom Question (Option 6)**:-- Ask: "What's your question for Gemini?"-- Ask: "Any files or context to include?"-- Optional: "Relevant URLs?"--### 3. Build Gemini Command--Based on task type, construct the prompt:--#### Code Review Template-```-[Claude Code consulting Gemini for peer review]--Task: Code review - check for bugs, logic errors, security vulnerabilities (SQL injection, XSS, etc.), performance issues, best practice violations, type safety problems, and missing error handling--[If URLs provided:]-Check against these official docs:-- [URL 1]-- [URL 2]--[User's specific concerns if any]--Provide direct analysis with file:line references. I will synthesize your findings with mine before presenting to the developer.-```--#### Architecture Advice Template-```-[Claude Code consulting Gemini for peer review]--Task: Architecture advice - [User's description of the decision or problem]--Analyze for: architectural anti-patterns, scalability concerns-- Maintainability issues-- Better alternatives-- Potential technical debt--[If URLs provided:]-Reference these patterns:-- [URL 1]-- [URL 2]--Provide specific, actionable recommendations and rationale. I will synthesize your findings with mine before presenting to the developer.-```--#### Debugging Help Template-```-[Claude Code consulting Gemini for peer review]--Task: Debug analysis - identify root cause (not just symptoms), explain why it's happening, suggest specific fix with code example, and how to prevent in future--Error: [User's error message/description]--What was tried: [User's attempts if provided]--Provide direct analysis with file:line references. I will synthesize your findings with mine before presenting to the developer.-```--#### Skill Analysis Template-```-[Claude Code consulting Gemini for peer review]--Task: Claude Code skill completeness check for [skill topic]--Verify: API accuracy, documentation gaps or unclear explanations, missing edge cases or error scenarios, outdated patterns or package versions, incomplete examples, known issues not documented, and type safety concerns--[If URLs provided:]-Check against official documentation:-- [URL 1]-- [URL 2]--Provide direct analysis with file:line references focusing on what was missed or could be improved. I will synthesize your findings with mine before presenting to the developer.-```--#### Documentation Check Template-```-[Claude Code consulting Gemini for peer review]--Task: Documentation accuracy verification--Compare documentation against these official sources:-[URLs - REQUIRED for this task type]-- [URL 1]-- [URL 2]--Check for: outdated information, incorrect patterns, missing important details, breaking changes not mentioned, and deprecated approaches still documented--Provide direct analysis with specific discrepancies. I will synthesize your findings with mine before presenting to the developer.-```--#### Custom Question Template-```-[Claude Code consulting Gemini for peer review]--Task: [User's question or custom request]--Context: [User's context if provided]--[If URLs provided:]-Reference:-- [URL 1]-- [URL 2]--Provide direct, actionable answer. I will synthesize your findings with mine before presenting to the developer.-```--### 4. Construct Bash Command--Choose command pattern based on task:--**For Single Skill Analysis**:-```bash-cd ~/.claude/skills/[skill-name] && \- gemini -p "<formatted prompt>" --all-files \- -m gemini-2.5-flash 2>&1 | grep -v "^Data collection\|^Loaded cached"-```--**For Specific Files (Code Review / Debugging)**:-```bash-cat [file1] [file2] ... | gemini -p "<formatted prompt>" \- -m gemini-2.5-flash 2>&1 | grep -v "^Data collection\|^Loaded cached"-```--**For All Skills (Use Sparingly - Very Slow!)**:-```bash-cd ~/.claude/skills && \- gemini -p "<formatted prompt>" --all-files \- -m gemini-2.5-flash 2>&1 | grep -v "^Data collection\|^Loaded cached"-```--**For Documentation Only**:-```bash-cat [doc-files] | gemini -p "<formatted prompt>" \- -m gemini-2.5-flash 2>&1 | grep -v "^Data collection\|^Loaded cached"-```--**Note**: `--include-directories` doesn't work with `-p` in headless mode. Use `cd` + `--all-files` instead.--**Model Selection**:-- Use `gemini-2.5-flash` by default (~5-25s, good quality, safer with directories)-- Use `gemini-2.5-pro` for architecture/critical decisions (~15-30s, better reasoning)-- **Note**: Flash-lite not accessible via Gemini CLI (returns 404 error)--**When Flash vs Pro Give Different Advice**:-- Flash prioritizes: Performance, simplicity, speed-- Pro prioritizes: Correctness, consistency, thoroughness-- Both can be valid depending on project requirements-- For critical/security decisions, prefer Pro's perspective-- Consider both viewpoints for major architectural choices--### 5. Execute Command--Run the constructed command:-```bash-OUTPUT=$(gemini -p "<prompt>" [options] 2>&1 | grep -v "^Data collection\|^Loaded cached")-```--**If command fails**:-- Check if Gemini CLI is authenticated (`gemini` to test)-- Verify file paths exist-- Check for error messages in output-- Show error to user and ask if they want to retry--### 6. Present Results--Format output:-```-βββββββββββββββββββββββββββββββββββββββββββββββ- GEMINI'S ANALYSIS-βββββββββββββββββββββββββββββββββββββββββββββββ--[Gemini's response from OUTPUT variable]--βββββββββββββββββββββββββββββββββββββββββββββββ--What would you like to do?-1. Implement Gemini's suggestions-2. Ask follow-up question-3. Get my (Claude's) take on Gemini's findings-4. Continue without changes--Your choice (1-4):-```--### 7. Handle User Response--**If choice 1 (Implement)**:-- Parse Gemini's suggestions-- Implement changes using appropriate tools (Edit, Write, etc.)-- Confirm changes with user--**If choice 2 (Follow-up)**:-- Ask: "What's your follow-up question?"-- Go back to step 3 with new prompt-- Include previous context if relevant--**If choice 3 (Claude's take)**:-- Analyze Gemini's findings-- Agree/disagree with specific points-- Provide additional context or alternative perspectives-- Ask user which approach they prefer--**If choice 4 (Continue)**:-- Output: "Understood. Gemini's analysis is available if you need it later."-- Continue normal workflow-------## Performance Expectations--**Updated based on 2025-11-08 testing**:--| Task | Typical Time | Model | Notes |-|------|--------------|-------|-------|-| Single file review | 5-15 seconds | gemini-2.5-flash | Good quality |-| Skill analysis | 10-25 seconds | gemini-2.5-flash | Comprehensive |-| Complex architecture | 15-30 seconds | gemini-2.5-pro | Better reasoning |-| Directory scanning | 15-30 seconds | gemini-2.5-pro | May try to use tools |-| Quick questions | 5-25 seconds | gemini-2.5-flash | Both models similar speed |-| All skills scan | 60+ seconds | (avoid unless necessary) | Very slow |--**Note**: Flash and Pro have more similar response times than previously thought (~20-25s average for both on many queries)-------## Best Practices--### β Good Use Cases-- Before committing major changes (final review)-- When stuck debugging after trying multiple approaches-- Architecture decisions with multiple valid options-- Reviewing critical security code-- "What am I missing?" moments--### β Avoid Using For-- Simple syntax checks (I can do faster)-- Every single edit (too slow, unnecessary)-- Questions with obvious answers-- Tasks I can handle directly-------## Error Handling--**Gemini CLI not installed**:-```-β Gemini CLI not found--Install: npm install -g @google/generative-ai-cli--Or visit: https://github.com/google-gemini/gemini-cli-```--**Authentication issues**:-```-β Gemini CLI not authenticated--Run: gemini--Follow authentication prompts, then try /ask-gemini again.-```--**File not found**:-```-β File not found: [path]--Check path and try again.-```--**Rate limit exceeded**:-```-β οΈ Gemini API rate limit exceeded--Free tier: 1500 requests/day for gemini-2.5-flash--Try again later or upgrade to paid tier.-```-------## Success Criteria--β User gets expert second opinion from Gemini-β Response is actionable and specific-β I can incorporate insights into my work-β User maintains control over implementation-β Complementary perspective (finds things I missed)-------## Notes--**Gemini CLI Context**:-- Loads GEMINI.md from ~/.claude/skills/ automatically-- Has access to files via --include-directories-- Can fetch URLs via web_fetch tool (if provided in prompt)-- 1M token context window (Gemini 2.5 models)--**Comparison to My Analysis**:-- I focus on correctness and syntax-- Gemini catches completeness gaps and documentation issues-- Together we provide comprehensive review--**When to Use Pro vs Flash** (Updated 2025-11-08):-- **Flash** (default): Code reviews, debugging, directory scanning, most tasks- - Faster on simple queries (~5-15s)- - Safer with directories (less likely to use tools aggressively)- - Good quality for general tasks-- **Pro**: Architecture decisions, critical security reviews, complex reasoning- - Better trade-off analysis (~15-30s, sometimes similar to Flash)- - More thorough on complex questions- - May get confused with directory scanning (tries to use tools)-- **Lite**: β Not accessible via Gemini CLI (returns 404 error)-------## Proactive Usage (Automatic Consultation)--**Purpose**: Claude Code can automatically consult Gemini when detecting critical scenarios, without waiting for user to explicitly request it.--### When to Trigger Proactive Consultation--**ALWAYS Consult (Critical Scenarios)**:-1. **Major architectural decisions**- - Choosing between storage solutions (D1 vs KV vs R2)- - Selecting auth strategies (Clerk vs Auth.js vs custom)- - Framework decisions (Next.js vs React + Hono)- - State management approaches (Zustand vs TanStack Query vs context)--2. **Security-sensitive code**- - Implementing authentication logic- - Payment processing- - User data handling (PII, credentials)- - API key management- - CORS and security headers--3. **Large refactors**- - Changes affecting 5+ files- - Core architecture modifications- - Database schema changes affecting multiple tables- - API contract changes--4. **Unfamiliar patterns**- - Technologies I haven't used in 6+ months- - New API versions with breaking changes- - Experimental features--**CONSIDER Consulting (Judgment Call)**:-5. **Stuck debugging**- - Same bug after 2+ failed fix attempts- - Error patterns I can't identify root cause for- - Performance issues without clear bottleneck--6. **Large features**- - Features with >4 hour estimated implementation- - Complex multi-step workflows- - Features requiring coordination across many systems--7. **Context overflow**- - Context approaching 70%+ full- - Need to analyze entire repo structure- - Large file changes requiring full context--8. **Verification failures**- - Tests failing in unexpected ways- - Build errors after seemingly correct changes- - Type errors in complex generic code--### Proactive Workflow Pattern--When I detect a trigger scenario:--**Step 1: Detection**-```-π€ I notice this is a [major architectural decision / security-sensitive change / etc.]-```--**Step 2: Inform User**-```-I'm going to consult Gemini for a second opinion on [specific concern].-This will take ~5-15 seconds...-```--**Step 3: Execute Gemini Query**-Use appropriate command based on scenario:--```bash-# Architecture decision-gemini-coach architect "Should I use D1 or KV for session storage?" /path/to/project--# Security review-gemini-coach security src/auth/--# Debug assistance-cd /project && gemini-coach debug "Error: [error message]" --include-directories . --yolo--# Whole repo analysis (context full)-cd /project && gemini-coach review "Analyze architecture, identify issues" --include-directories . --yolo-```--**Step 4: Synthesize Perspectives**-```-βββββββββββββββββββββββββββββββββββββββββββββββ- GEMINI'S PERSPECTIVE-βββββββββββββββββββββββββββββββββββββββββββββββ--[Gemini's analysis]--βββββββββββββββββββββββββββββββββββββββββββββββ- MY PERSPECTIVE (Claude Code)-βββββββββββββββββββββββββββββββββββββββββββββββ--[My analysis, noting where I agree/disagree with Gemini]--Points of agreement:-β’ [Point 1]-β’ [Point 2]--Where I differ:-β’ [Different view 1 with rationale]--βββββββββββββββββββββββββββββββββββββββββββββββ-```--**Step 5: Present Options**-```-Which approach would you like to take?--1. Follow Gemini's recommendation: [brief description]-2. Follow my recommendation: [brief description]-3. Hybrid approach: [combining both]-4. Discuss further before deciding--Your choice (1-4):-```--### Example Proactive Scenarios--**Scenario 1: Architectural Decision**-```-User: "I need to store user sessions. What should I use?"--Claude: π€ This is a major architectural decision. Let me consult Gemini for a second opinion...--[Runs: gemini-coach architect "Compare D1, KV, and Durable Objects for session storage in Cloudflare Workers" .]--[Presents both perspectives with trade-offs]-```--**Scenario 2: Security Code**-```-User: "Implement the login endpoint"--Claude: π€ Authentication logic is security-sensitive. Consulting Gemini before implementation...--[Runs: gemini-coach security "Review authentication best practices for Cloudflare Workers + Clerk"]--[Presents security checklist from both perspectives]-```--**Scenario 3: Stuck Debugging**-```-[After 2 failed attempts to fix a bug]--Claude: π€ I've attempted 2 fixes without success. Let me get Gemini's perspective...--[Runs: gemini-coach debug "Error: [paste error]" src/problematic-file.ts]--[Presents both debugging theories]-```--**Scenario 4: Context Overflow**-```-[Context at 72%]--Claude: β οΈ Context is at 72% full. Before continuing, let me use Gemini's 1M context to analyze the entire project structure...--[Runs: cd /project && gemini-coach review "Analyze project architecture and suggest refactoring opportunities" --include-directories . --yolo]--[Presents architectural overview and refactoring suggestions]-```--### Integration with Task Agents--Task agents can invoke Gemini when they encounter trigger scenarios:--```typescript-// Pseudocode for Task agent logic-if (scenario === "architectural_decision" || scenario === "security_sensitive") {- await runBashCommand(`gemini-coach architect "${question}" ${projectPath}`);- synthesizePerspectives(geminiResponse, myAnalysis);- presentOptionsToUser();-}-```--### When NOT to Use Proactive Consultation--**Avoid consulting Gemini for**:-- Simple syntax fixes-- Well-established patterns I'm confident about-- Minor refactors (1-2 files)-- Routine CRUD operations-- Documentation updates-- Tasks user explicitly wants fast execution on--**Balance**: Proactive consultation is powerful but shouldn't slow down every task. Use judgment.-------## Version History--**v2.3.0 (2025-11-08)** - Model Validation & Testing-- REMOVED: gemini-2.5-flash-lite (not accessible via Gemini CLI, returns 404)-- Updated: Time estimates based on systematic testing-- Added: "When Flash vs Pro Give Different Advice" guidance-- Updated: Model selection recommendations (Flash default, Pro for critical)-- Added: Performance expectations table with real-world data-- Finding: Flash and Pro have similar response times (~20-25s average)-- Finding: Flash prioritizes performance, Pro prioritizes correctness-- Finding: Pro may get confused with directory scanning (tries to use tools)--**v2.2.0 (2025-11-08)** - AI-to-AI Prompting-- MAJOR: All prompt templates updated to AI-to-AI peer review format-- Added: Identity clarity section at top of document-- Improved: Prevents role confusion between Gemini, Claude Code, and human developer-- Result: More direct, actionable analysis with clear file:line references--**v2.0.0 (2025-11-08)** - Proactive Integration-- Added: Proactive consultation triggers-- Added: Integration with global CLAUDE.md-------**Last Updated**: 2025-11-08-**Testing Report**: See `/tmp/gemini-experiments.md` for detailed findingsdiff --git a/skills/gemini-cli-integration/assets/gemini-coach b/skills/gemini-cli-integration/assets/gemini-coachdeleted file mode 100755index 4cfcb9df..00000000--- a/skills/gemini-cli-integration/assets/gemini-coach+++ /dev/null@@ -1,426 +0,0 @@-#!/bin/bash-# Gemini Coding Coach - Quick wrapper for Gemini CLI-# Version: 2.3.0 (Removed flash-lite, updated time estimates based on testing)-#-# Usage:-# gemini-coach <task> [files...]-# cat file.ts | gemini-coach <task>-# gemini-coach quick "Quick question"-# gemini-coach review-dir "Review prompt" /path/to/dir-# gemini-coach project-review "Review prompt"-# gemini-coach compare /path1 /path2-# gemini-coach security-scan /path--# ============================================-# Configuration-# ============================================--# Model selection-# Flash: Faster, safer with directories, good for most tasks (~5-25s)-# Pro: Better reasoning, use for architecture/critical decisions (~15-30s)-DEFAULT_MODEL="${GEMINI_MODEL:-gemini-2.5-flash}"-DEFAULT_PRO_MODEL="gemini-2.5-pro"--# ============================================-# Helper Functions-# ============================================--# Show model info before execution-show_model_info() {- local model="$1"- local estimated_time=""-- case "$model" in- gemini-2.5-flash)- estimated_time="~5-25 seconds"- ;;- gemini-2.5-pro)- estimated_time="~15-30 seconds"- ;;- *)- estimated_time="~5-25 seconds"- ;;- esac-- echo "ββββββββββββββββββββββββββββββββββββββββ" >&2- echo "Model: $model" >&2- echo "Estimated time: $estimated_time" >&2- echo "ββββββββββββββββββββββββββββββββββββββββ" >&2- echo "" >&2-}--# Quick question (no file context, fast)-gemini-quick() {- local prompt="$1"- show_model_info "$DEFAULT_MODEL"- gemini "$prompt" --yolo -m "$DEFAULT_MODEL" 2>&1 | grep -v "^Loaded\|^YOLO\|^Data collection"-}--# Review with directory context (thorough)-# Fixed: Now uses cd /tmp to avoid CWD pollution-gemini-review() {- local prompt="$1"- local dir="${2:-.}"- local model="${3:-$DEFAULT_MODEL}"-- # Resolve to absolute path- dir=$(cd "$dir" 2>/dev/null && pwd || echo "$dir")-- if [ ! -d "$dir" ] && [ ! -f "$dir" ]; then- echo "Error: Path not found: $dir" >&2- return 1- fi-- show_model_info "$model"-- # Run from /tmp to avoid including CWD in context- (cd /tmp && gemini "$prompt" \- --include-directories "$dir" \- --yolo \- -m "$model" 2>&1 | grep -v "^Loaded\|^YOLO\|^Data collection")-}--# Architecture advice (uses Pro model for better reasoning)-gemini-architect() {- local prompt="$1"- local dir="${2:-.}"- gemini-review "$prompt" "$dir" "$DEFAULT_PRO_MODEL"-}--# Project review (entire codebase)-gemini-project-review() {- local prompt="$1"- local project_dir="${2:-.}"-- echo "Reviewing project: $project_dir" >&2- echo "Note: This includes all files in the directory" >&2- echo "" >&2-- gemini-review "$prompt" "$project_dir" "$DEFAULT_MODEL"-}--# Compare two directories or files-gemini-compare() {- local path1="$1"- local path2="$2"-- if [ -z "$path1" ] || [ -z "$path2" ]; then- echo "Error: gemini-compare requires two paths" >&2- echo "Usage: gemini-compare /path1 /path2" >&2- return 1- fi-- # Resolve to absolute paths- if [ -d "$path1" ]; then- path1=$(cd "$path1" && pwd)- elif [ -f "$path1" ]; then- path1=$(cd "$(dirname "$path1")" && pwd)/$(basename "$path1")- fi-- if [ -d "$path2" ]; then- path2=$(cd "$path2" && pwd)- elif [ -f "$path2" ]; then- path2=$(cd "$(dirname "$path2")" && pwd)/$(basename "$path2")- fi-- if [ ! -e "$path1" ]; then- echo "Error: Path not found: $path1" >&2- return 1- fi-- if [ ! -e "$path2" ]; then- echo "Error: Path not found: $path2" >&2- return 1- fi-- show_model_info "$DEFAULT_MODEL"-- echo "Comparing:" >&2- echo " 1) $path1" >&2- echo " 2) $path2" >&2- echo "" >&2-- # Run from /tmp to avoid CWD pollution- (cd /tmp && gemini "[Claude Code consulting Gemini for peer review]--Task: Compare two implementations - analyze key differences in approach, pros and cons of each, which is better for different use cases, and any missing features in either--Provide direct analysis with specific comparisons. I will synthesize your findings with mine before presenting to the developer." \- --include-directories "$path1" \- --include-directories "$path2" \- --yolo \- -m "$DEFAULT_MODEL" 2>&1 | grep -v "^Loaded\|^YOLO\|^Data collection")-}--# Security scan (uses Pro model for thorough analysis)-gemini-security-scan() {- local target="${1:-.}"-- echo "π Security Scan: $target" >&2- echo "Using gemini-2.5-pro for thorough analysis" >&2- echo "" >&2-- gemini-review \- "[Claude Code consulting Gemini for comprehensive security audit]--Task: Security audit - identify SQL injection vulnerabilities, XSS/CSRF risks, authentication/authorization flaws, insecure data handling, exposed secrets or credentials, insufficient input validation, missing rate limiting, insecure dependencies, and improper error handling--Provide direct analysis with file:line references, how to exploit, and how to fix. I will synthesize your findings with mine before presenting to the developer." \- "$target" \- "$DEFAULT_PRO_MODEL"-}--# ============================================-# Main Script-# ============================================--TASK="${1:-review}"-shift--# Handle special commands-case "$TASK" in- # Helper function aliases- quick)- gemini-quick "$@"- exit $?- ;;-- review-dir)- gemini-review "$@"- exit $?- ;;-- architect)- gemini-architect "$@"- exit $?- ;;-- # Task bundles (new in v2.1.0)- project-review)- gemini-project-review "$@"- exit $?- ;;-- compare)- gemini-compare "$@"- exit $?- ;;-- security-scan)- gemini-security-scan "$@"- exit $?- ;;-- # Help- help|--help|-h)- cat << 'EOF'-Gemini Coding Coach - Get expert analysis on code--USAGE:- gemini-coach <task> [files...]- cat file.ts | gemini-coach <task>--HELPER FUNCTIONS:- gemini-coach quick "question" Fast answer, no file context- gemini-coach review-dir "prompt" /path Review directory/file with context- gemini-coach architect "question" /path Architecture advice (uses Pro model)- gemini-coach project-review "prompt" [/path] Review entire project (default: current dir)- gemini-coach compare /path1 /path2 Compare two directories or files- gemini-coach security-scan [/path] Security audit (uses Pro model, default: current dir)--TASKS:- review General code review (bugs, best practices, security)- debug Analyze errors and suggest fixes- architecture Review system design and architecture- skill Analyze Claude Code skill completeness- docs Verify documentation accuracy- security Security audit (SQL injection, XSS, etc.)- performance Performance analysis and optimization- types TypeScript type safety review- quick Quick question (no file context)- review-dir Review directory with full context- architect Architecture advice with Pro model- project-review Review entire project- compare Compare two implementations- security-scan Security audit with Pro model- help Show this help message--CUSTOM PROMPTS:- gemini-coach "Your custom prompt here" [files...]--EXAMPLES:- # File-based review- gemini-coach review src/App.tsx-- # Piped input- cat error.log | gemini-coach debug-- # Directory review- gemini-coach review-dir "Check for security issues" ./src-- # Project review- gemini-coach project-review "Review for bugs and security issues"-- # Compare implementations- gemini-coach compare ./src/auth-v1 ./src/auth-v2-- # Security scan- gemini-coach security-scan ./src/api-- # Quick question- gemini-coach quick "Best way to handle WebSockets in Cloudflare Workers?"-- # Architecture advice- gemini-coach architect "Should I use D1 or KV for sessions?" .--ENVIRONMENT:- GEMINI_MODEL Model to use (default: gemini-2.5-flash)--NOTES:- - Uses Gemini CLI 0.13.0+ features- - Requires --yolo for directory access- - Filters metadata for clean output- - Shows model info before execution--MODEL SELECTION:- - gemini-2.5-flash (default): Faster, safer with directories (~5-25s)- - gemini-2.5-pro: Better reasoning for architecture/critical decisions (~15-30s)- - Override: GEMINI_MODEL=gemini-2.5-pro gemini-coach ...--CHANGELOG:--v2.3.0 (2025-11-08):- - REMOVED: gemini-2.5-flash-lite (not accessible via Gemini CLI, returns 404)- - Updated: Time estimates based on real-world testing- - Improved: Model selection guidance (Flash for most, Pro for critical)- - Note: Flash and Pro can give different recommendations (both may be valid)--v2.2.0 (2025-11-08):- - MAJOR: All prompts updated to AI-to-AI peer review format- - Improved: Clear identity (Gemini advising Claude Code, not human)- - Improved: Prevents chatty responses and role confusion- - Improved: More direct, actionable analysis with file:line references-EOF- exit 0- ;;-esac--# Define prompts for preset tasks (Option B: AI-to-AI peer review format)-case "$TASK" in- review)- PROMPT="[Claude Code consulting Gemini for peer review]--Task: Code review - check for bugs, logic errors, security vulnerabilities (SQL injection, XSS, etc.), performance issues, best practice violations, type safety problems, and missing error handling--Provide direct analysis with file:line references. I will synthesize your findings with mine before presenting to the developer."- ;;-- debug)- PROMPT="[Claude Code consulting Gemini for peer review]--Task: Debug analysis - identify root cause (not just symptoms), explain why it's happening, suggest specific fix with code example, and how to prevent in future--Provide direct analysis with file:line references. I will synthesize your findings with mine before presenting to the developer."- ;;-- architecture)- PROMPT="[Claude Code consulting Gemini for peer review]--Task: Architecture advice - analyze for architectural anti-patterns, scalability concerns, maintainability issues, better alternatives, and potential technical debt--Provide direct analysis with specific, actionable recommendations and rationale. I will synthesize your findings with mine before presenting to the developer."- ;;-- skill)- PROMPT="[Claude Code consulting Gemini for peer review]--Task: Claude Code skill completeness check - verify API accuracy, identify documentation gaps or unclear explanations, find missing edge cases or error scenarios, check for outdated patterns or package versions, note incomplete examples, and identify type safety concerns--Provide direct analysis with file:line references. I will synthesize your findings with mine before presenting to the developer."- ;;-- docs)- PROMPT="[Claude Code consulting Gemini for peer review]--Task: Documentation accuracy verification - check for outdated information, incorrect patterns, missing important details, breaking changes not mentioned, and deprecated approaches still documented--Provide direct analysis with specific discrepancies. I will synthesize your findings with mine before presenting to the developer."- ;;-- security)- PROMPT="[Claude Code consulting Gemini for peer review]--Task: Security audit - identify SQL injection vulnerabilities, XSS/CSRF risks, authentication/authorization flaws, insecure data handling, exposed secrets or credentials, insufficient input validation, and missing rate limiting--Provide direct analysis with file:line references, how to exploit, and how to fix. I will synthesize your findings with mine before presenting to the developer."- ;;-- performance)- PROMPT="[Claude Code consulting Gemini for peer review]--Task: Performance analysis - identify N+1 queries, missing indexes, inefficient algorithms, memory leaks, unnecessary re-renders/computations, blocking operations, and missing caching--Provide direct analysis with specific optimizations and expected impact. I will synthesize your findings with mine before presenting to the developer."- ;;-- types)- PROMPT="[Claude Code consulting Gemini for peer review]--Task: TypeScript type safety review - identify any types that should be specific, missing generics, unsafe type assertions, implicit any, missing null checks, and type narrowing opportunities--Provide direct analysis with specific type improvements. I will synthesize your findings with mine before presenting to the developer."- ;;-- *)- # Custom prompt - wrap with AI-to-AI context- PROMPT="[Claude Code consulting Gemini for peer review]--Task: $TASK--Provide direct analysis. I will synthesize your findings with mine before presenting to the developer."- ;;-esac--# Show model info before execution (for file-based tasks)-if [ -t 0 ] && [ $# -gt 0 ]; then- show_model_info "$DEFAULT_MODEL"-fi--# Execute Gemini with appropriate input method-if [ -t 0 ]; then- # No stdin - expecting files as arguments- if [ $# -eq 0 ]; then- echo "Error: No input provided" >&2- echo "" >&2- echo "Usage:" >&2- echo " gemini-coach <task> [files...]" >&2- echo " cat file.ts | gemini-coach <task>" >&2- echo " gemini-coach quick \"question\"" >&2- echo "" >&2- echo "Run 'gemini-coach help' for more information." >&2- exit 1- fi-- # Read files and pass to Gemini- cat "$@" | gemini "$PROMPT" --yolo -m "$DEFAULT_MODEL" 2>&1 | \- grep -v "^Loaded\|^YOLO\|^Data collection"-else- # Reading from stdin- show_model_info "$DEFAULT_MODEL"- gemini "$PROMPT" --yolo -m "$DEFAULT_MODEL" 2>&1 | \- grep -v "^Loaded\|^YOLO\|^Data collection"-fi--# Check for errors-EXIT_CODE=$?-if [ $EXIT_CODE -ne 0 ]; then- echo "" >&2- echo "Error: Gemini CLI failed (exit code: $EXIT_CODE)" >&2- echo "" >&2- echo "Common issues:" >&2- echo " - Gemini CLI not installed or outdated: npm install -g @google/gemini-cli" >&2- echo " - Not authenticated: Run 'gemini' and follow auth prompts" >&2- echo " - Rate limit exceeded: Try again later" >&2- echo " - Required version: 0.13.0+ (run: gemini --version)" >&2- exit $EXIT_CODE-fidiff --git a/skills/gemini-cli/.claude-plugin/plugin.json b/skills/gemini-cli/.claude-plugin/plugin.jsonnew file mode 100644index 00000000..00781542--- /dev/null+++ b/skills/gemini-cli/.claude-plugin/plugin.json@@ -0,0 +1,29 @@+{+ "name": "gemini-cli",+ "description": "Use Google Gemini CLI directly from Claude Code for second opinions, architectural advice, debugging help, code reviews, and security audits. Leverage Gemini's 1M+ context window with the official gemini command-line tool.",+ "version": "2.0.0",+ "author": {+ "name": "Jeremy Dawes",+ "email": "[email protected]"+ },+ "license": "MIT",+ "repository": "https://github.com/jezweb/claude-skills",+ "keywords": [+ "gemini-cli",+ "google gemini",+ "gemini command line",+ "second opinion",+ "model comparison",+ "gemini-2.5-flash",+ "gemini-2.5-pro",+ "architectural decisions",+ "debugging assistant",+ "code review",+ "security audit",+ "1M context window",+ "AI pair programming",+ "AI-to-AI prompting",+ "peer review",+ "codebase analysis"+ ]+}diff --git a/skills/gemini-cli/README.md b/skills/gemini-cli/README.mdnew file mode 100644index 00000000..197fb1f5--- /dev/null+++ b/skills/gemini-cli/README.md@@ -0,0 +1,269 @@+# gemini-cli++**Status**: β Production-Ready | v2.0.0 | Last Updated: 2025-11-13++Use the official Google Gemini CLI directly from Claude Code for second opinions, architectural advice, debugging help, and comprehensive code reviews using Gemini's 1M+ context window.++---++## Auto-Trigger Keywords++This skill should activate when Claude Code encounters these scenarios:++### Commands+- `gemini` (official CLI tool)+- `gemini-cli` (installation package)+- `gemini-2.5-flash`, `gemini-2.5-pro` (model names)++### Use Cases+- "second opinion"+- "consult Gemini"+- "peer review"+- "architectural decision"+- "stuck debugging" (after 2+ attempts)+- "security audit"+- "compare implementations"+- "model comparison"+- "Flash vs Pro"+- "1M context window"+- "large codebase analysis"++### Technologies+- Google Gemini+- Gemini CLI+- @google/gemini-cli+- AI pair programming+- AI-to-AI prompting++### Scenarios (Proactive)+- Major architectural decisions (D1 vs KV, Durable Objects vs Workflows, etc.)+- Security-sensitive code (auth, payments, data handling)+- Large refactors (5+ files, core architecture changes)+- Context approaching 70%+ full+- Unfamiliar technology stack+- Debugging failures (2+ attempts on same bug)++---++## When to Use++### β Use This Skill When:++- [ ] User asks major architectural question ("Should I use D1 or KV for sessions?")+- [ ] Writing security-sensitive code (auth, payments, PII)+- [ ] Planning large refactor (5+ files or core architecture)+- [ ] Stuck debugging after 2+ failed attempts+- [ ] Context approaching 70%+ capacity, need full codebase analysis+- [ ] Unfamiliar with technology stack or library+- [ ] Need to compare two implementations (old vs new, alternative approaches)+- [ ] User explicitly requests Gemini consultation+- [ ] Want complementary perspective on critical decision+- [ ] Need 1M+ context window for comprehensive analysis++### β Don't Use This Skill When:++- [ ] Simple questions answerable with Claude's knowledge+- [ ] Trivial code reviews (small, non-critical changes)+- [ ] Every single decision (reserve for critical scenarios)+- [ ] API rate limits exceeded+- [ ] No internet connection available++---++## Quick Example++**Scenario**: User asks "Should I use D1 or KV for session storage?"++**Claude's Workflow**:+```bash+# 1. Detect architectural decision+# 2. Inform user: "Consulting Gemini for second opinion..."++# 3. Get Gemini's perspective (Pro model)+gemini -m gemini-2.5-pro -p "I'm building a Cloudflare Worker with 1000-5000 DAU. Should I use D1 or KV for session storage? Consider: 1) Session reads on every request, 2) TTL-based expiration after 30 days, 3) Remember me functionality, 4) Multi-device tracking, 5) Cost under $50/month."++# 4. Synthesize both perspectives+# 5. Present unified recommendation+```++**User sees**:+```+Based on consultation with Gemini:++**My Perspective**: Both viable, depends on priorities+- KV excels at read performance (sub-millisecond)+- D1 provides better querying for multi-device tracking++**Gemini's Perspective** (2.5-Pro): D1 recommended+- Strong consistency is critical for sessions+- Query flexibility for "remember me" across devices+- Cost effective at this scale++**Recommendation**: Start with D1+```++---++## Installation++### Via Marketplace (Recommended)++```bash+# Add marketplace+/plugin marketplace add https://github.com/jezweb/claude-skills++# Install skill+/plugin install gemini-cli@claude-skills+```++### Manual Installation++```bash+# Clone repository+git clone https://github.com/jezweb/claude-skills.git+cd claude-skills++# Symlink skill+ln -s $(pwd)/skills/gemini-cli ~/.claude/skills/gemini-cli+```++### Install Gemini CLI++```bash+# Install official Gemini CLI+npm install -g @google/gemini-cli++# Authenticate+gemini++# Test+gemini --version+gemini -p "What is 2+2?"+```++---++## Features++### Core Capabilities++- β **Direct CLI Integration**: Use official `gemini` command (no wrapper needed)+- β **Model Selection**: Flash (fast) vs Pro (thorough)+- β **1M+ Context Window**: Analyze large code files+- β **Non-Interactive Mode**: Perfect for Claude Code automation (`-p` flag)+- β **File Context**: Pipe files or use `--all-files`+- β **AI-to-AI Prompting**: Optimized prompts for Gemini from Claude++### Use Cases Covered++1. **Architecture Decisions**: Technology selection, pattern choices+2. **Security Audits**: Authentication, payments, sensitive data handling+3. **Debugging Assistance**: Root cause analysis after failed attempts+4. **Code Reviews**: Before commits, pull requests+5. **Refactoring Plans**: Large-scale changes (5+ files)+6. **Performance Optimization**: Bottleneck identification++### Token Efficiency++- **~60-70% token savings** vs manual consultation+- **6+ common errors prevented** (see SKILL.md)+- **Automated synthesis** of both AI perspectives++---++## Usage Patterns++### Pattern 1: Quick Consultation++```bash+gemini -p "Should I use Drizzle ORM or raw SQL for Cloudflare D1?"+```++### Pattern 2: Security Review++```bash+cat src/auth/middleware.ts | gemini -m gemini-2.5-pro -p "Security audit this auth middleware"+```++### Pattern 3: Code Review++```bash+git diff HEAD | gemini --all-files -p "Review these changes for edge cases and security"+```++### Pattern 4: Architecture Advice++```bash+gemini -m gemini-2.5-pro -p "Best way to handle WebSocket state in Cloudflare Durable Objects? Consider: 1) 100+ concurrent connections, 2) Persistence requirements, 3) Failover"+```++### Pattern 5: Debugging++```bash+echo "[error message]" | gemini -p "Help debug this error. What's the likely root cause?"+```++---++## Comparison: gemini-cli vs google-gemini-api++| Feature | gemini-cli (this skill) | google-gemini-api |+|---------|------------------------|-------------------|+| **Purpose** | Second opinions, peer review | Direct API integration |+| **Context** | Full codebase (1M+ tokens) | Request-specific |+| **Integration** | Command-line tool | SDK (@google/genai) |+| **Use Case** | AI-to-AI consultation | Building Gemini-powered apps |+| **Best For** | Architecture, security audits | Chat, embeddings, function calling |++**Use both**: gemini-cli for consulting Gemini, google-gemini-api for building with Gemini.++---++## Related Skills++- **[google-gemini-api](../google-gemini-api/)** - Gemini API integration via SDK+- **[google-gemini-embeddings](../google-gemini-embeddings/)** - Gemini embeddings for RAG+- **[google-gemini-file-search](../google-gemini-file-search/)** - Managed RAG with Gemini+- **[openai-api](../openai-api/)** - Alternative for second opinions++---++## Known Issues++1. **Model Deprecation**: `gemini-2.5-flash-lite` removed (use `flash` or `pro`)+2. **Rate Limits**: Space out requests if hitting limits+3. **Large Files**: Use `--all-files` carefully (can exceed context)++See [SKILL.md](SKILL.md) for complete troubleshooting guide.++---++## Version History++**2.0.0** (2025-11-13):+- β¨ Complete rewrite for official Gemini CLI (removed gemini-coach wrapper)+- β¨ Direct CLI integration patterns+- β¨ Simplified to core use cases+- β¨ Updated for gemini CLI v0.13.0+++**1.0.0** (2025-11-08):+- Initial release with gemini-coach wrapper+- Production testing and experimentation++---++## Contributing++Issues and improvements welcome:+- **Issues**: https://github.com/jezweb/claude-skills/issues+- **Email**: [email protected]++---++## License++MIT - See [LICENSE](../../LICENSE)++---++**Maintained by**: Jeremy Dawes | [Jezweb](https://jezweb.com.au)diff --git a/skills/gemini-cli/SKILL.md b/skills/gemini-cli/SKILL.mdnew file mode 100644index 00000000..70e3d2f7--- /dev/null+++ b/skills/gemini-cli/SKILL.md@@ -0,0 +1,656 @@+---+name: Gemini CLI+description: |+ Use Google Gemini CLI directly from Claude Code for second opinions, architectural advice, debugging help, code reviews, and security audits. Leverage Gemini's 1M+ context window for comprehensive code analysis using the official gemini command-line tool.++ Use when: Need second opinion on architectural decisions, stuck debugging after 2+ attempts, writing security-sensitive code (auth, payments, data handling), planning large refactors (5+ files), approaching 70%+ context capacity, unfamiliar with technology stack, want to compare Flash vs Pro model recommendations, need comprehensive codebase analysis, or consulting Gemini for peer review on critical code changes.++ Keywords: gemini-cli, google gemini, gemini command line, second opinion, model comparison, gemini-2.5-flash, gemini-2.5-pro, architectural decisions, debugging assistant, code review gemini, security audit gemini, 1M context window, AI pair programming, gemini consultation, flash vs pro, AI-to-AI prompting, peer review, codebase analysis, gemini CLI tool, shell gemini, command line AI assistant, gemini architecture advice, gemini debug help, gemini security scan, gemini code compare+license: MIT+metadata:+ version: 2.0.0+ production_tested: true+ gemini_cli_version: 0.13.0++ last_verified: 2025-11-13+ token_savings: ~60-70%+ errors_prevented: 6++---++# Gemini CLI++**Leverage Gemini's 1M+ context window as your AI pair programmer within Claude Code workflows.**++This skill teaches Claude Code how to use the official Google Gemini CLI (`gemini` command) to get second opinions, architectural advice, debugging help, and comprehensive code reviews. Based on production testing with the official CLI tool.++---++## Table of Contents++1. [Quick Start](#quick-start)+2. [When to Use Gemini Consultation](#when-to-use-gemini-consultation)+3. [Installation](#installation)+4. [Using Gemini CLI](#using-gemini-cli)+5. [Model Selection: Flash vs Pro](#model-selection-flash-vs-pro)+6. [Proactive Consultation Patterns](#proactive-consultation-patterns)+7. [AI-to-AI Prompting Best Practices](#ai-to-ai-prompting-best-practices)+8. [Common Use Cases](#common-use-cases)+9. [Integration Examples](#integration-examples)+10. [Troubleshooting & Known Issues](#troubleshooting--known-issues)++---++## Quick Start++**Prerequisites**:+- Gemini CLI installed (`npm install -g @google/gemini-cli`)+- Authenticated with Google account (run `gemini` once to authenticate)++**Basic Usage Patterns**:++```bash+# Quick question (non-interactive with -p flag)+gemini -p "Should I use D1 or KV for session storage?"++# Code review with file context (using --all-files)+gemini --all-files -p "Review this auth implementation for security issues"++# Architecture advice using Pro model+gemini -m gemini-2.5-pro -p "Best way to handle WebSockets in Cloudflare Workers?"++# Pipe file content for review+cat src/auth.ts | gemini -p "Review this authentication code for security vulnerabilities"++# Interactive mode for follow-up questions+gemini -i "Help me debug this authentication error"+```++---++## When to Use Gemini Consultation++### ALWAYS Consult (Critical Scenarios)++Claude Code should **automatically invoke Gemini** in these situations:++1. **Major Architectural Decisions**+ - Example: "Should I use D1 or KV for session storage?"+ - Example: "Durable Objects vs Workflows for long-running tasks?"+ - Why: Gemini provides complementary perspective, may prioritize different concerns+ - **Pattern**: `gemini -m gemini-2.5-pro -p "[architectural question]"`++2. **Security-Sensitive Code Changes**+ - Authentication systems+ - Payment processing+ - Data handling (PII, sensitive data)+ - API key/secret management+ - Why: Gemini 2.5 Pro excels at security audits+ - **Pattern**: `cat [security-file] | gemini -m gemini-2.5-pro -p "Security audit this code"`++3. **Large Refactors**+ - Affecting 5+ files+ - Core architecture changes+ - Database schema migrations+ - Why: Fresh perspective prevents tunnel vision+ - **Pattern**: `gemini --all-files -m gemini-2.5-pro -p "Review this refactoring plan"`++4. **Stuck Debugging (2+ Failed Attempts)**+ - Error persists after 2 debugging attempts+ - Stack trace unclear+ - Intermittent bugs+ - Why: Different reasoning approach may spot root cause+ - **Pattern**: `gemini -p "Help debug: [error message]" < error.log`++5. **Context Window Pressure (70%+ Full)**+ - Approaching token limit+ - Need to offload analysis to Gemini+ - Why: Gemini's 1M context can handle large code files+ - **Pattern**: `cat large-file.ts | gemini -p "Analyze this code structure"`++### OPTIONALLY Consult++6. **Unfamiliar Technology**+ - Using library/framework for first time+ - Experimenting with new patterns+ - Why: Gemini may have more recent training data+ - **Pattern**: `gemini -p "Best practices for [new technology]"`++7. **Code Reviews**+ - Before committing major changes+ - Pull request preparation+ - Why: Catches edge cases and improvements+ - **Pattern**: `git diff | gemini -p "Review these changes"`++---++## Installation++### 1. Install Gemini CLI++```bash+npm install -g @google/gemini-cli+```++### 2. Authenticate++```bash+gemini+```++Follow the authentication prompts to link your Google account.++### 3. Verify Installation++```bash+gemini --version+```++Should show version 0.13.0 or higher.++### 4. Test Connection++```bash+gemini -p "What is 2+2?"+```++---++## Using Gemini CLI++### Core Command Patterns++#### Non-Interactive Mode (`-p` flag)++Best for Claude Code integration:++```bash+# Direct question+gemini -p "Your question here"++# With model selection+gemini -m gemini-2.5-flash -p "Quick debugging question"+gemini -m gemini-2.5-pro -p "Complex architectural decision"++# With file context via pipe+cat src/auth.ts | gemini -p "Review this code"++# With all files in current directory+gemini --all-files -p "Analyze project structure"++# With stdin input+echo "Error: Cannot connect to database" | gemini -p "Help debug this error"+```++#### Interactive Mode (`-i` flag)++For follow-up conversations:++```bash+# Start interactive session with initial prompt+gemini -i "Let's discuss the architecture"++# Interactive with model selection+gemini -m gemini-2.5-pro -i "Help me design a database schema"+```++#### YOLO Mode (`-y` flag)++Auto-accepts all actions (use with caution):++```bash+# Dangerous: Auto-executes suggested commands+gemini -y -p "Fix all linting errors"+```++β οΈ **Warning**: YOLO mode can execute commands without confirmation. Only use in trusted environments.++---++## Model Selection: Flash vs Pro++### gemini-2.5-flash (Default)++**Characteristics**:+- Fast response time: ~5-25 seconds+- Good quality for most tasks+- Lower cost+- Safe for general questions++**Use For**:+- Code reviews+- Debugging+- General questions+- Quick consultations+- When speed matters++**Example**:+```bash+gemini -m gemini-2.5-flash -p "Review this function for performance issues"+```++### gemini-2.5-pro++**Characteristics**:+- Response time: ~15-30 seconds+- Excellent quality, thorough analysis+- Higher cost+- Best for critical decisions++**Use For**:+- Architecture decisions (critical)+- Security audits (thorough)+- Complex reasoning tasks+- Major refactoring plans+- When accuracy > speed++**Example**:+```bash+gemini -m gemini-2.5-pro -p "Security audit this authentication system"+```++### How to Choose++```+Quick question? β Flash+Security/architecture? β Pro+Debugging? β Flash (try Pro if stuck)+Code review? β Flash+Refactoring 5+ files? β Pro+```++---++## Proactive Consultation Patterns++### Pattern 1: Architecture Decision++**Trigger**: User asks about technology choice+**Claude Action**: Automatically consult Gemini for second opinion++```bash+# Claude runs:+gemini -m gemini-2.5-pro -p "Compare D1 vs KV for session storage in Cloudflare Workers. Consider: read/write patterns, cost, performance, complexity."++# Then synthesizes both perspectives+```++### Pattern 2: Security Review++**Trigger**: Working on auth/payment/sensitive code+**Claude Action**: Request Gemini security audit++```bash+# Claude runs:+cat src/auth/verify-token.ts | gemini -m gemini-2.5-pro -p "Security audit this authentication code. Check for: token validation, timing attacks, injection vulnerabilities, error handling."+```++### Pattern 3: Debugging Assistance++**Trigger**: Error persists after 2 attempts+**Claude Action**: Get Gemini's perspective++```bash+# Claude runs:+echo "[error message and stack trace]" | gemini -p "Help debug this error. What's the likely root cause?"+```++### Pattern 4: Code Review++**Trigger**: Major changes ready to commit+**Claude Action**: Request comprehensive review++```bash+# Claude runs:+git diff HEAD | gemini --all-files -p "Review these changes for: correctness, edge cases, performance, security, best practices."+```++---++## AI-to-AI Prompting Best Practices++### How Claude Should Format Prompts to Gemini++**β GOOD: Context-Rich, Specific**+```bash+gemini -m gemini-2.5-pro -p "I'm building a Cloudflare Worker with user authentication. Should I use D1 or KV for storing session data? Consider: 1) Session reads on every request, 2) TTL-based expiration, 3) Cost under 10M requests/month, 4) Deployment complexity."+```++**β BAD: Vague, No Context**+```bash+gemini -p "D1 or KV?"+```++### Prompt Structure Template++```+[Context: What you're building]+[Question]+[Considerations: Key factors (numbered)]+```++### Example: Architecture Decision++```bash+gemini -m gemini-2.5-pro -p "+Context: Building a real-time collaborative editing app on Cloudflare Workers.++Question: Should I use Durable Objects or Workflows for managing document state?++Considerations:+1. Need to handle WebSocket connections (100+ simultaneous users per document)+2. Document state must be consistent across all clients+3. Need to persist changes every 5 seconds+4. Budget: <\$100/month at 1000 documents+5. Simple deployment preferred+"+```++---++## Common Use Cases++### 1. Technology Selection++```bash+# Compare two technologies+gemini -m gemini-2.5-pro -p "Compare Drizzle ORM vs raw SQL for Cloudflare D1. Consider: type safety, performance, query complexity, bundle size."+```++### 2. Security Audit++```bash+# Audit authentication code+cat src/middleware/auth.ts | gemini -m gemini-2.5-pro -p "+Security audit this authentication middleware. Check for:+1. Token validation vulnerabilities+2. Timing attack risks+3. Error handling leaks+4. CSRF protection+5. Rate limiting+"+```++### 3. Debugging Root Cause++```bash+# Analyze error logs+tail -100 error.log | gemini -p "+These errors started appearing after deploying auth changes. What's the likely root cause?++Context:+- Added JWT validation middleware+- Using @cloudflare/workers-jwt+- Errors only on /api/* routes+"+```++### 4. Code Review++```bash+# Review pull request changes+git diff main...feature-branch | gemini --all-files -p "+Review this pull request. Focus on:+1. Breaking changes+2. Edge cases not handled+3. Performance implications+4. Security concerns+"+```++### 5. Refactoring Plan++```bash+# Plan large refactor+gemini --all-files -m gemini-2.5-pro -p "+I want to refactor this Express app to Cloudflare Workers with Hono. Analyze the codebase and suggest:+1. Migration order (which routes first)+2. Potential blockers (middleware that won't work)+3. Testing strategy+4. Deployment plan+"+```++### 6. Performance Optimization++```bash+# Analyze performance+cat src/api/heavy-endpoint.ts | gemini -p "+This endpoint is slow (500ms+ response time). Identify performance bottlenecks and suggest optimizations.++Context:+- Cloudflare Worker+- Fetches data from 3 external APIs+- Processes 1000+ items+"+```++---++## Integration Examples++### Example 1: Claude Consulting Gemini Automatically++**Scenario**: User asks architectural question++```+User: "Should I use D1 or KV for storing user sessions?"++Claude (internal): This is an architectural decision. Consult Gemini for second opinion.++[Runs: gemini -m gemini-2.5-pro -p "Compare D1 vs KV for user session storage in Cloudflare Workers..."]++Claude (to user): "I've consulted Gemini for a second opinion. Here's what we both think:++My perspective: [Claude's analysis]+Gemini's perspective: [Gemini's analysis]++Key differences: [synthesis]+Recommendation: [combined recommendation]"+```++### Example 2: Security Review Before Commit++```+User: "Ready to commit these auth changes"++Claude (internal): Security-sensitive code. Request Gemini audit.++[Runs: cat src/auth/*.ts | gemini -m gemini-2.5-pro -p "Security audit..."]++Claude (to user): "I've reviewed the code and consulted Gemini for security concerns:++Gemini identified: [security issues]+Additional checks I recommend: [Claude's additions]++Safe to commit after addressing: [list]"+```++### Example 3: Debugging Assistance++```+User: "Still getting this error after trying your suggestions: [error]"++Claude (internal): Two failed attempts. Consult Gemini for fresh perspective.++[Runs: echo "[error details]" | gemini -p "Help debug..."]++Claude (to user): "Let me get a second opinion from Gemini...++Gemini suggests: [Gemini's diagnosis]+This makes sense because: [Claude's analysis]+Let's try: [combined solution]"+```++---++## Troubleshooting & Known Issues++### Issue 1: Not Authenticated++**Error**: `Error: Not authenticated`++**Solution**:+```bash+gemini+# Follow authentication prompts+```++### Issue 2: Model Not Found++**Error**: `Error: Model not found: gemini-2.5-flash-lite`++**Cause**: Model deprecated or renamed++**Solution**:+```bash+# Use stable models+gemini -m gemini-2.5-flash -p "Your question"+gemini -m gemini-2.5-pro -p "Your question"+```++### Issue 3: Rate Limit++**Error**: `Error: Rate limit exceeded`++**Solution**: Wait 1-5 minutes, then retry++**Prevention**: Space out requests++### Issue 4: Large File Context++**Error**: File too large for context++**Solution**: Use `--all-files` carefully or pipe specific sections++```bash+# Instead of:+gemini --all-files -p "Review everything"++# Do:+cat src/specific-file.ts | gemini -p "Review this file"+```++### Issue 5: Command Hangs++**Cause**: Interactive mode when expecting non-interactive++**Solution**: Always use `-p` flag for non-interactive commands++```bash+# β Correct+gemini -p "Question"++# β Wrong (will hang waiting for input)+gemini "Question"+```++---++## Production Best Practices++### 1. Always Use `-p` for Automation++```bash+# β Good for scripts+gemini -p "Question"++# β Bad for scripts (interactive)+gemini+```++### 2. Select Model Based on Criticality++```bash+# Architecture/security β Pro+gemini -m gemini-2.5-pro -p "[critical question]"++# Debugging/review β Flash+gemini -m gemini-2.5-flash -p "[general question]"+```++### 3. Provide Context in Prompts++```bash+# β Good+gemini -p "Context: Building Cloudflare Worker. Question: Best auth pattern? Considerations: 1) Stateless, 2) JWT, 3) <100ms overhead"++# β Bad+gemini -p "Best auth?"+```++### 4. Pipe File Content for Reviews++```bash+# β Good+cat src/auth.ts | gemini -p "Review for security"++# β Inefficient+gemini -p "Review src/auth.ts" # Gemini has to read file separately+```++### 5. Handle Errors Gracefully++```bash+# Add error handling+if output=$(gemini -p "Question" 2>&1); then+ echo "Gemini says: $output"+else+ echo "Gemini consultation failed, proceeding with Claude's recommendation"+fi+```++### 6. Synthesize, Don't Just Forward++**β BAD**: Just paste Gemini's response+```+User: "Should I use D1?"+Claude: [runs gemini] "Gemini says: [paste]"+```++**β GOOD**: Synthesize both perspectives+```+User: "Should I use D1?"+Claude: [runs gemini]+"I've consulted Gemini for a second opinion:++My analysis: [Claude's perspective]+Gemini's analysis: [Gemini's perspective]+Key differences: [synthesis]+Recommendation: [unified answer]"+```++---++## Version History++**2.0.0** (2025-11-13):+- Complete rewrite for official Gemini CLI (removed gemini-coach wrapper)+- Direct CLI integration patterns+- Simplified to core use cases+- Updated command examples for `gemini` CLI v0.13.0+++**1.0.0** (2025-11-08):+- Initial release with gemini-coach wrapper+- Production testing and experimentation+- 8+ documented errors prevented++---++## Related Skills++- [google-gemini-api](../google-gemini-api/) - Gemini API integration via SDK+- [google-gemini-embeddings](../google-gemini-embeddings/) - Gemini embeddings for RAG+- [google-gemini-file-search](../google-gemini-file-search/) - Managed RAG with Gemini++---++## License++MIT - See [LICENSE](../../LICENSE)++---++## Support++- **Issues**: https://github.com/jezweb/claude-skills/issues+- **Email**: [email protected]+- **Official Gemini CLI**: https://github.com/google-gemini/gemini-clidiff --git a/skills/gemini-cli-integration/references/gemini-experiments.md b/skills/gemini-cli/references/gemini-experiments.mdsimilarity index 100%rename from skills/gemini-cli-integration/references/gemini-experiments.mdrename to skills/gemini-cli/references/gemini-experiments.mddiff --git a/skills/gemini-cli-integration/references/helper-functions.md b/skills/gemini-cli/references/helper-functions.mdsimilarity index 100%rename from skills/gemini-cli-integration/references/helper-functions.mdrename to skills/gemini-cli/references/helper-functions.mddiff --git a/skills/gemini-cli-integration/references/models-guide.md b/skills/gemini-cli/references/models-guide.mdsimilarity index 100%rename from skills/gemini-cli-integration/references/models-guide.mdrename to skills/gemini-cli/references/models-guide.mddiff --git a/skills/gemini-cli-integration/references/prompting-strategies.md b/skills/gemini-cli/references/prompting-strategies.mdsimilarity index 100%rename from skills/gemini-cli-integration/references/prompting-strategies.mdrename to skills/gemini-cli/references/prompting-strategies.mddiff --git a/skills/gemini-cli-integration/scripts/install-gemini-coach.sh b/skills/gemini-cli/scripts/install-gemini-coach.shsimilarity index 100%rename from skills/gemini-cli-integration/scripts/install-gemini-coach.shrename to skills/gemini-cli/scripts/install-gemini-coach.shdiff --git a/skills/gemini-cli-integration/scripts/setup-slash-command.sh b/skills/gemini-cli/scripts/setup-slash-command.shsimilarity index 100%rename from skills/gemini-cli-integration/scripts/setup-slash-command.shrename to skills/gemini-cli/scripts/setup-slash-command.shdiff --git a/skills/gemini-cli-integration/scripts/test-connection.sh b/skills/gemini-cli/scripts/test-connection.shsimilarity index 100%rename from skills/gemini-cli-integration/scripts/test-connection.shrename to skills/gemini-cli/scripts/test-connection.shdiff --git a/skills/google-gemini-file-search/.claude-plugin/plugin.json b/skills/google-gemini-file-search/.claude-plugin/plugin.jsonnew file mode 100644index 00000000..8b723e1c--- /dev/null+++ b/skills/google-gemini-file-search/.claude-plugin/plugin.json@@ -0,0 +1,28 @@+{+ "name": "google-gemini-file-search",+ "description": "Fully managed RAG system using Google Gemini File Search API. No vector database needed - automatic chunking, embedding generation, and semantic search with citations. Upload 100+ file formats (PDF, Word, Excel, code) and query with metadata filtering.",+ "version": "1.0.0-beta",+ "author": {+ "name": "Jeremy Dawes",+ "email": "[email protected]"+ },+ "license": "MIT",+ "repository": "https://github.com/jezweb/claude-skills",+ "keywords": [+ "google gemini",+ "file search",+ "RAG",+ "semantic search",+ "document retrieval",+ "embeddings",+ "chunking",+ "citations",+ "managed RAG",+ "google AI",+ "gemini-2.5-pro",+ "gemini-2.5-flash",+ "knowledge base",+ "document search",+ "no vector db"+ ]+}