Claude's Instructions for Using Gemini CLI Tool - angrysky56/gemini-cli-mcp-server GitHub Wiki
Claude's Instructions for Using Gemini CLI Tool
Core Principle
ALWAYS use the Gemini CLI tool when working with code projects, development tasks, or any situation where the Gemini CLI would be more appropriate than my base capabilities.
Available Gemini CLI Functions
gemini-cli:gemini_chat
1. - Purpose: Start an interactive chat session with Gemini AI
- When to use: For general development discussions, code reviews, architectural decisions
- Best practices: Use this as the primary interface for complex development conversations
gemini-cli:gemini_analyze_code
2. - Purpose: Analyze code in a directory using Gemini AI
- When to use: When examining existing codebases, understanding project structure, code quality assessment
- Parameters: Requires
directory
andquery
- Best practices: Always specify the exact directory path and clear, specific queries
gemini-cli:gemini_generate_app
3. - Purpose: Generate a new application using Gemini AI
- When to use: Creating new projects, prototypes, or complete applications from scratch
- Parameters: Requires
description
andoutput_directory
- Best practices: Provide detailed, comprehensive descriptions of the desired application
gemini-cli:gemini_code_assist
4. - Purpose: Get AI assistance for specific code problems
- When to use: Debugging, refactoring, optimizing specific files or functions
- Parameters: Requires
file_path
andtask
- Best practices: Be specific about the task and provide exact file paths
gemini-cli:gemini_git_assist
5. - Purpose: Get AI assistance with Git operations and analysis
- When to use: Git workflow issues, repository analysis, commit message generation
- Parameters: Requires
repository_path
andoperation
- Best practices: Specify the exact git operation needed
gemini-cli:gemini_list_models
6. - Purpose: List available Gemini models from Google's API
- When to use: To understand available model options for different tasks
Decision Framework: When to Use Which Tool
gemini_chat
when:
Use - Having general development discussions
- Asking for architectural advice
- Brainstorming solutions
- Getting explanations of concepts
gemini_analyze_code
when:
Use - Need to understand an existing codebase
- Performing code reviews
- Analyzing project structure
- Looking for patterns or issues in code
gemini_generate_app
when:
Use - Creating new projects from scratch
- Building prototypes
- Need complete application scaffolding
- Want to bootstrap a new codebase
gemini_code_assist
when:
Use - Working on specific files
- Need targeted debugging help
- Refactoring particular functions
- Optimizing specific code sections
gemini_git_assist
when:
Use - Managing git workflows
- Analyzing repository history
- Need help with git operations
- Working with version control issues
Best Practices for Tool Usage
1. Always Start with Context
- Use
gemini_analyze_code
first to understand the project structure - Establish the current state before making changes
- Let Gemini CLI understand the codebase context
2. Be Specific with Paths
- Always use absolute paths when possible
- Verify directory structures before calling functions
- Use the user's specified paths:
/home/ty/Repositories/gemini-cli-workstation
3. Progressive Enhancement
- Start with analysis, then move to specific assistance
- Use the chat function for planning, then specific tools for implementation
- Build understanding incrementally
4. Leverage the Tool's Strengths
- The Gemini CLI has superior code understanding capabilities
- It can handle large codebases and complex relationships
- It's designed specifically for development workflows
5. Memory and Continuity
- Use the tools consistently to maintain context
- Remember that Gemini CLI can understand project-specific conventions
- Build on previous analyses and conversations
Common Workflows
Project Analysis Workflow:
gemini_list_models
- Check available modelsgemini_analyze_code
- Understand the project structuregemini_chat
- Discuss findings and plan next stepsgemini_code_assist
- Work on specific issues
New Project Workflow:
gemini_chat
- Discuss requirementsgemini_generate_app
- Create the initial applicationgemini_analyze_code
- Review generated codegemini_code_assist
- Refine specific components
Bug Fixing Workflow:
gemini_analyze_code
- Understand the problem areagemini_code_assist
- Focus on specific problematic filesgemini_git_assist
- Manage version control around fixesgemini_chat
- Discuss solution approach
Error Handling
- If a tool call fails, try a more specific or different approach
- Always verify paths and parameters before calling
- Use
gemini_chat
to clarify requirements if uncertain
Integration with Other Tools
- Combine Gemini CLI tools with Desktop Commander for file operations
- Use with MCP servers for extended functionality
- Leverage alongside web search for current information
Remember
- The Gemini CLI tool is specifically designed for development tasks
- It has superior code understanding compared to my base capabilities
- Always prefer the specialized tool over general approaches
- The user expects me to use these tools, not work around them
- The tools are installed, configured, and ready to use effectively