← ClaudeAtlas

claude-code-proxy-patternslisted

Claude Code OAuth proxy patterns and anti-patterns for multi-provider model routing.
terrylica/cc-skills · ★ 49 · AI & Automation · score 79
Install: claude install-skill terrylica/cc-skills
<!-- # SSoT-OK: version references are documentation of binary analysis findings, not package versions --> # Claude Code Proxy Patterns Multi-provider proxy that routes Claude Code model tiers to different backends. Haiku to MiniMax (cost/speed), Sonnet/Opus to Anthropic (native OAuth passthrough). Includes Go binary proxy with launchd auto-restart and failover wrapper for resilience. **Scope**: Local reverse proxy for Claude Code with OAuth subscription (Max plan). Routes based on model name in request body. **Reference implementations**: - Go proxy binary: `/usr/local/bin/claude-proxy` (port 8082) --- > **Self-Evolving Skill**: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues. ## When to Use This Skill - Building or debugging a Claude Code multi-provider proxy - Setting up `ANTHROPIC_BASE_URL` with OAuth subscription mode - Integrating Anthropic-compatible providers (MiniMax, etc.) - Diagnosing "OAuth not supported" or auth failures through a proxy - Understanding how Claude Code stores and transmits OAuth tokens **Do NOT use for**: Claude API key-only setups (no proxy needed), MCP server development, Claude Code hooks (operate at tool level, not API level), or corporate HTTPS proxy traversal. --- ## Architecture ``` Claude Code (OAuth/Max subscription) | | ANTHROPIC_BASE_URL=http://127.0.0.1:8082 (Go proxy)