From gemini-bridge
Get refactoring suggestions from Gemini CLI before Claude implements. Triggers on: "refactor this", "suggest refactoring", "improve code quality", "clean up code", "code smells", "reduce complexity"
How this skill is triggered — by the user, by Claude, or both
Slash command
/gemini-bridge:gemini-refactorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use Gemini to analyze code and suggest refactoring strategies.
Use Gemini to analyze code and suggest refactoring strategies.
Read the target code files
Build refactoring prompt:
cat > /tmp/gemini_prompt.txt << 'GEMINI_EOF'
Analyze this code and suggest refactoring improvements.
For each suggestion provide:
1. What to change and why (specific pattern/smell identified)
2. Before/after code example
3. Risk level: LOW / MEDIUM / HIGH
4. Priority: 1 (most important) to 5 (least)
5. Estimated effort: TRIVIAL / SMALL / MEDIUM / LARGE
Focus on:
- DRY violations
- Complex conditionals
- Long methods/functions
- Poor naming
- Missing abstractions
- Performance anti-patterns
- Unnecessary coupling
Be specific with line references.
Code to analyze:
[INSERT CODE HERE]
GEMINI_EOF
bash ~/.claude/gemini-bridge.sh --file /tmp/gemini_prompt.txt
Present suggestions organized by priority
Ask user which refactorings to apply
Claude implements the approved changes
Gemini suggests → User approves → Claude implements → Gemini reviews result
npx claudepluginhub andytargino/gemini-bridge --plugin gemini-bridgeAnalyzes code for smells, duplication, complexity, SOLID violations; suggests refactorings like Extract Method; implements incrementally with explanations, risks, and test preservation.
Applies disciplined refactoring in small, verifiable steps to improve code structure without changing behavior: extract functions, rename, move code.
Analyzes code smells like long functions and nesting, prioritizes high-impact refactorings, presents findings, then applies one transformation per cycle after user approval without changing behavior.