Created
July 10, 2025 21:14
-
-
Save arunsanna/0a91c6ff05d737f0daa7c7ac3d93bd1e to your computer and use it in GitHub Desktop.
Claude-Code Integration with Gemini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Prompt to Add Mandatory Gemini CLI Integration for Large Files | |
Please add the following functionality to my Claude Code configuration: | |
1. Create a MANDATORY rule that forces Claude to use Gemini CLI for any file larger than 300 lines | |
2. Claude must NEVER analyze large files itself - it MUST delegate to Gemini | |
3. All Gemini commands should run in background with output logging | |
4. Include "TASK COMPLETED" in all Gemini prompts for completion monitoring | |
5. Add monitoring loops that check for "TASK COMPLETED" in the output | |
Specifically: | |
- Add a new section "MANDATORY LARGE FILE ANALYSIS RULES" after the Privacy Rules in CLAUDE.md | |
- Update the Pre-Implementation Checks to make file size checking the FIRST step | |
- Create an /enforce-gemini-check slash command that automates this check | |
- Add reminders throughout the documentation (Quality Assurance, Code Review, etc.) | |
- For file splitting, Gemini must be used with prompts that preserve functionality | |
Example implementation for file analysis: | |
```fish | |
set output_file "gemini_analysis_$(date +%s).txt" | |
gemini --model gemini-2.5-flash -y -a -p "Analyze [file] thoroughly. End with 'TASK COMPLETED'." > "$output_file" 2>&1 & | |
while true | |
if test -f "$output_file" && grep -q "TASK COMPLETED" "$output_file" | |
echo "✅ Analysis complete" | |
break | |
end | |
sleep 2 | |
end | |
Make these rules absolutely mandatory with penalties for non-compliance. I've noticed Claude missing important details in large files, | |
so this integration is critical. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment