Skip to content

Instantly share code, notes, and snippets.

@syabro
Created July 18, 2025 13:38
Show Gist options
  • Save syabro/e84b68d56584c2b0d0a96b9fe2a7b03e to your computer and use it in GitHub Desktop.
Save syabro/e84b68d56584c2b0d0a96b9fe2a7b03e to your computer and use it in GitHub Desktop.

read @CLAUDE.md !IMPORTANT MUST NOT ANY COMMANDS TO PROVIDE ANY CONTEXT TO GEMINI THINK Ask gemini to review your changes with request You need to provide

NOTE: $(git diff HEAD) is bash placeholder, don't run it

read @AGENTS-TEXT.md

I need a review for my code.

--- TASK REQUIREMENTS ---
<WHOLE_TASK_REQURIMENTS_TEXT>

--- WHAT I'VE DONE ---
<YOUR_CHANGES_DESCRIPTION>

--- GIT DIFF ---
```diff
$(git diff HEAD)

--- WHAT I NEED ---

  1. Overall Summary: Provide a brief, high-level summary of your assessment.
  2. Requirements Coverage:
    • Do the changes fully meet all task requirements?
    • Are there any gaps, deviations, or misunderstandings of the requirements?
  3. Implementation Analysis:
    • Does the git diff correctly implement the described changes?
    • <ASK_QUESTIONS_SPECIFIC_TO_IMPLEMENTATION>
  4. Recommendations for Improvement:
    • Suggest concrete improvements to enhance code quality, clarity, and simplicity.
    • Are there any potential issues regarding performance, security, or maintainability?
  5. Formatting: Present your findings as a list of actionable points. For each point, specify the file and line number if applicable.

--- NOTES ---

  • CHECK IF MY CHANGES 100% matching and covering requirements
  • Be 100% neutral no-emotions autisit and NOT ENCOURAGE ME. I need a trully neutral review to understand code quality
  • you don't have access to any tools, you can only

read @CLAUDE.md You are an expert senior software engineer and system architect. Your task is to provide a critical and objective review of an implementation plan. Your feedback should be direct, neutral, and without conversational filler.

read @AGENTS-TEXT.md

I need a review of my implementation plan.

--- TASK REQUIREMENTS --- <WHOLE_TASK_REQURIMENTS_TEXT>

--- MY IMPLEMENTATION PLAN --- <YOUR_FULL_IMPLEMENTATION_PLAN_TEXT>

--- ADDITIONAL CONTEXT ---

--- WHAT I NEED --- Review the plan based on the following criteria:

  1. Requirements Alignment:
    • Does the plan fully address all requirements from the task?
    • Are there any gaps, deviations, or misinterpretations of the requirements?
  2. Completeness and Logic:
    • Is the plan logically sound and well-ordered?
    • Are there any missing steps, dependencies, or prerequisites?
    • Does the plan include unnecessary steps that do not contribute to the final goal?
  3. Optimality and Simplicity:
    • Is the proposed implementation approach the most effective and efficient?
    • Are there simpler or more robust alternatives?
    • Can the plan be simplified to reduce complexity or the amount of code required?
  4. Risk Assessment:
    • Identify potential risks, challenges, or edge cases that the plan does not account for.
  5. Specific Questions:
    • <ASK_QUESTIONS_SPECIFIC_TO_IMPLEMENTATION>
  6. Formatting: Present your findings as a list of actionable points.

Using Gemini CLI for Large Codebase Analysis

When analyzing large codebases or multiple files that might exceed context limits, use the Gemini CLI with its massive context window. Use gemini -p to leverage Google Gemini's large context capacity.

File and Directory Inclusion Syntax

Use the @ syntax to include files and directories in your Gemini prompts. The paths should be relative to WHERE you run the gemini command:

REQUIRED

Always add "RETURN TEXT, DON'T MODIFY ANYTHING" to the end of the all requests to be sure gemini is only replying to you

Examples:

  • Single file analysis: gemini -p "@src/main.py Explain this file's purpose and structure"
  • Multiple files: gemini -p "@package.json @src/index.js Analyze the dependencies used in the code"
  • Entire directory: gemini -p "@src/ Summarize the architecture of this codebase"
  • Multiple directories: gemini -p "@src/ @tests/ Analyze test coverage for the source code"
  • Current directory and subdirectories: gemini -p "@./ Give me an overview of this entire project"
  • Or use --all_files flag:

    gemini --all_files -p "Analyze the project structure and dependencies"

Implementation Verification Examples

  • Check if a feature is implemented: gemini -p "@src/ @lib/ Has dark mode been implemented in this codebase? Show me the relevant files and functions"
  • Verify authentication implementation: gemini -p "@src/ @middleware/ Is JWT authentication implemented? List all auth-related endpoints and middleware"
  • Check for specific patterns: gemini -p "@src/ Are there any React hooks that handle WebSocket connections? List them with file paths"
  • Verify error handling: gemini -p "@src/ @api/ Is proper error handling implemented for all API endpoints? Show examples of try-catch blocks"
  • Check for rate limiting: gemini -p "@backend/ @middleware/ Is rate limiting implemented for the API? Show the implementation details"
  • Verify caching strategy: gemini -p "@src/ @lib/ @services/ Is Redis caching implemented? List all cache-related functions and their usage"
  • Check for specific security measures: gemini -p "@src/ @api/ Are SQL injection protections implemented? Show how user inputs are sanitized"
  • Verify test coverage for features: gemini -p "@src/payment/ @tests/ Is the payment processing module fully tested? List all test cases"

When to Use Gemini CLI

Use gemini -p when:

  • Analyzing entire codebases or large directories
  • Comparing multiple large files
  • Need to understand project-wide patterns or architecture
  • Current context window is insufficient for the task
  • Working with files totaling more than 100KB
  • Verifying if specific features, patterns, or security measures are implemented
  • Checking for the presence of certain coding patterns across the entire codebase

Important Notes

  • Paths in @ syntax are relative to your current working directory when invoking gemini
  • The CLI will include file contents directly in the context
  • No need for --yolo flag for read-only analysis
  • Gemini's context window can handle entire codebases that would overflow Claude's context
  • When checking implementations, be specific about what you're looking for to get accurate results

If you understand say " 🟢 USER GEMINI READ AND I CAN CALL IT "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment