Claude Code Provider Switching Kit banner
riccardovandra riccardovandra

Claude Code Provider Switching Kit

Development community

Description

Switch Claude Code between Anthropic, GLM, and OpenRouter (including free models) with one command.

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

Claude Code Provider Switching Kit

Switch Claude Code between **Anthropic**, **GLM**, and **OpenRouter** (including free models) with one command.

No code changes. No config juggling. Just `claude-switch glm` and you're running on a different provider.

What's included

profiles/
  anthropic.json     # Default Anthropic API (best quality)
  glm.json           # GLM via z.ai (budget-friendly)
  openrouter.json    # OpenRouter (free models included)
claude-switch.sh     # The switching script

Quick Setup (2 minutes)

1. Create the profiles folder

mkdir -p ~/.claude/profiles

2. Copy everything into place

cp profiles/*.json ~/.claude/profiles/
cp claude-switch.sh ~/.claude/profiles/claude-switch.sh
chmod +x ~/.claude/profiles/claude-switch.sh

3. Add your API keys

Edit each profile file in `~/.claude/profiles/` and replace the placeholder keys:

4. Add the alias

Add this to your `~/.zshrc` (or `~/.bashrc`):

alias claude-switch="~/.claude/profiles/claude-switch.sh"

Then reload:

source ~/.zshrc

5. Switch providers

claude-switch anthropic    # Best quality, full cost
claude-switch glm          # Solid quality, minimal cost
claude-switch openrouter   # Free models, great for learning

Provider Comparison

Provider Cost Quality Extended Thinking Best For
Anthropic ~$200/mo heavy use Best Yes Production work, complex tasks
GLM ~$5-15/mo Good (close to Sonnet) No Daily work, drafting, research
OpenRouter Free tier available Variable No Learning, testing, simple tasks

What stays