fprochazka

Claude Code Auth Switch — Git skill for Claude Code

Git community

Note: This has only been tested on Linux.

How to install Claude Code Auth Switch

This entry records only its repository, not the path inside it, so there is no exact command to give. Open fprochazka/claude-code-auth-switch and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Code Auth Switch does

**Note:** This has only been tested on Linux. macOS and Windows may not work as expected — macOS in particular has a [Keychain collision bug](https://github.com/anthropics/claude-code/issues/20553)

Alternatives in Git

  • Win Dev Skills — Agent plugins for building Windows apps with GitHub Copilot, Claude Code, OpenAI Codex, and more 463 ★
  • Annotation — Create a detailed technical note for this commit 327 ★
  • Diri — Native macOS orchestrator for coding agents — run Claude Code, Codex, Cursor, Gemini and shells in parallel ac 272 ★

README

claude-code-auth-switch

**Note:** This has only been tested on Linux. macOS and Windows may not work as expected — macOS in particular has a [Keychain collision bug](https://github.com/anthropics/claude-code/issues/20553) that breaks multi-account OAuth isolation.

Run multiple [Claude Code](https://docs.anthropic.com/en/docs/claude-code) accounts side-by-side with isolated credentials, shared configuration, and zero Docker overhead.

Each profile gets its own `claude-` command on your `$PATH`:

claude-personal     # Personal Anthropic subscription (OAuth)
claude-work-team    # Company team subscription (OAuth)
claude-work-vertex  # Company via Google Cloud Vertex AI

Run them in parallel across different project directories without credential collisions, file lock conflicts, or billing mix-ups.

How it works

Claude Code's `CLAUDE_CONFIG_DIR` environment variable redirects all configuration and credential storage to a custom directory. We [verified in the binary](docs/Binary-Analysis-and-Design-Decisions.md) that this provides **full isolation** — including the `~/.claude.json` state file, which contrary to [some reports](docs/Gemini-Symlink-Behavior-Research.md) is **not** hardcoded to the home directory.

The install script reads `~/.claude/auth-switch.yaml`, creates a profile directory per account under `~/.claude-profiles/`, and generates thin wrapper scripts that set the right environment variables before `exec`-ing `claude`:

~/.claude/
├── auth-switch.yaml          # Your profile definitions
└── auth-switch.secrets.yaml  # Secret env values (gitignored, optional)

~/.claude-profiles/
├── personal/                # Profile: claude-personal
│   ├── settings.json        # Copied from ~/.claude/ (mutable)
│   ├── settings.local.json  # Copied from ~/.claude/ (mutable)
│   ├── CLAUDE.md            # Copied from ~/.claude/ (mutable, plus any other *.md files)
│   ├── keybindings.json     # Copied from ~/.claude/ (mutable)
│   ├── commands