Gemini refactor
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"From its SKILL.md
npx -y skills add AndyTargino/gemini-bridge --skill gemini-refactorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.4 KB, as published. Nobody here has run it
Gemini Refactor — Refactoring analysis via Gemini CLI
Instructions
Use Gemini to analyze code and suggest refactoring strategies.
How to execute
-
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
Workflow
Gemini suggests → User approves → Claude implements → Gemini reviews result