Gemini for Claude Code
Description
This server acts as a bridge, enabling you to use **Claude Code** with Google's powerful **Gemini models**. It translates API requests and responses between the Anthropic format (used by Claude Code) and the Gemini format (via LiteLLM), allowing seamless integration.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
FOR OFFICIAL GOOGLE AI CLI TOOL SEE https://github.com/google-gemini/gemini-cli
Gemini for Claude Code: An Anthropic-Compatible Proxy
This server acts as a bridge, enabling you to use **Claude Code** with Google's powerful **Gemini models**. It translates API requests and responses between the Anthropic format (used by Claude Code) and the Gemini format (via LiteLLM), allowing seamless integration.
Features
- Claude Code Compatibility with Gemini: Directly use the Claude Code CLI with Google Gemini models.
- Seamless Model Mapping: Intelligently maps Claude Code model requests (e.g.,
haiku,sonnet,opusaliases) to your chosen Gemini models. - LiteLLM Integration: Leverages LiteLLM for robust and flexible interaction with the Gemini API.
- Enhanced Streaming Support: Handles streaming responses from Gemini with robust error recovery for malformed chunks and API errors.
- Complete Tool Use for Claude Code: Translates Claude Code's tool usage (function calling) to and from Gemini's format, with robust handling of tool results.
- Advanced Error Handling: Provides specific and actionable error messages for common Gemini API issues with automatic fallback strategies.
- Resilient Architecture: Gracefully handles Gemini API instability with smart retry logic and fallback to non-streaming modes.
- Diagnostic Endpoints: Includes
/healthand/test-connectionfor easier troubleshooting of your setup. - Token Counting: Offers a
/v1/messages/count_tokensendpoint compatible with Claude Code.
Recent Improvements (v2.5.0)
🛡️ Enhanced Error Resilience
- Malformed Chunk Recovery: Automatically detects and handles malformed JSON chunks from Gemini streaming
- Smart Retry Logic: Exponential backoff with configurable retry limits for streaming errors
- Graceful Fallback: Seamlessly switches to non-streaming mode when streaming fails
...
Related Skills
Awesome Go
A curated list of awesome Go frameworks, libraries and software
Development next.js
| The React Framework | 138360 | 1503 | 1 |
Development sharing-skills
skill for guidance.
Development root-cause-tracing
Use when errors occur deep in execution and you need to trace back to find the original trigger.
Development Template Skill
Minimal skeleton for a new skill project structure.
Development Third-party Notices
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THI
Development