claude-code-proxy-patterns

Solid

Claude Code OAuth proxy patterns and anti-patterns for multi-provider model routing.

AI & Automation 62 stars 9 forks Updated today MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
60
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

<!-- # 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) ...

Details

Author
terrylica
Repository
terrylica/cc-skills
Created
8 months ago
Last Updated
today
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

claude-api

Claude API and Anthropic SDK reference for model selection, pricing, parameters, streaming, tool use, MCP, agents, caching, token counting and migrations. Use whenever the request names Claude, Anthropic, Opus, Sonnet, Haiku, the anthropic packages or Claude model IDs; when choosing or debugging a Claude API feature; or when an LLM-shaped task names no provider. Before editing, inspect the target for another provider. Do not use this skill when the user or project explicitly targets OpenAI, Gemini, Llama, Mistral, Cohere or Ollama; ask before switching an existing non-Anthropic implementation to Claude. Verify time-sensitive model, price and limit claims against current official documentation.

0 Updated 3 days ago
trugurpala
AI & Automation Listed

claude-api

Load when a task needs Claude API or Anthropic SDK build, debug, migration, or tuning work; skip provider-neutral, OpenAI, or non-Anthropic model work.

72 Updated 4 weeks ago
JasonxzWen
AI & Automation Listed

claude-api

Build, debug, and optimize Claude API / Anthropic SDK apps. Apps built with this skill should include prompt caching. Also handles migrating existing Claude API code between Claude model versions (4.5 → 4.6, 4.6 → 4.7, retired-model replacements). TRIGGER when: code imports `anthropic`/`@anthropic-ai/sdk`; user asks for the Claude API, Anthropic SDK, or Managed Agents; user adds/modifies/tunes a Claude feature (caching, thinking, compaction, tool use, batch, files, citations, memory) or model (Opus/Sonnet/Haiku) in a file; questions about prompt caching / cache hit rate in an Anthropic SDK project. SKIP: file imports `openai`/other-provider SDK, filename like `*-openai.py`/`*-generic.py`, provider-neutral code, general programming/ML.

15 Updated today
Zandereins