deepclaude-proxy
БесплатноБез исполняемых скриптовНе проверенUse Claude Code's autonomous agent loop with DeepSeek V4 Pro, OpenRouter, or any Anthropic-compatible backend at up to 17x lower cost.
от reason-machines★ 99 звёзд на GitHubОб этом скилле
deepclaude
Skill by ara.so — Daily 2026 Skills collection.
deepclaude routes Claude Code's API calls to DeepSeek V4 Pro, OpenRouter, Fireworks AI, or any Anthropic-compatible backend — keeping the full Claude Code UX (file editing, bash, subagents, git) while cutting costs by up to 17x.
How it works
Claude Code reads specific environment variables to determine its API endpoint and model names. deepclaude sets these per-session (not permanently), launches Claude Code, then restores originals on exit.
Your terminal
└── Claude Code CLI (tool loop, file editing, bash, git — unchanged)
└── API calls → DeepSeek V4 Pro ($0.87/M) instead of Anthropic ($15/M)
Key environment variables Claude Code uses:
| Variable | Purpose |
|---|---|
ANTHROPIC_BASE_URL |
API endpoint override |
ANTHROPIC_AUTH_TOKEN |
API key for the backend |
ANTHROPIC_DEFAULT_OPUS_MODEL |
Model for Opus-tier tasks |
ANTHROPIC_DEFAULT_SONNET_MODEL |
Model for Sonnet-tier tasks |
ANTHROPIC_DEFAULT_HAIKU_MODEL |
Model for Haiku-tier / subagents |
CLAUDE_CODE_SUBAGENT_MODEL |
Model for spawned subagents |
Installation
Prerequisites
- Claude Code CLI installed (
npm install -g @anthropic-ai/claude-code) - Node.js 18+ (for the proxy server)
- API key for at least one backend
1. Clone the repo
git clone https://github.com/aattaran/deepclaude.git
cd deepclaude
2. Set API keys
macOS/Linux:
# DeepSeek (default backend — get key at platform.deepseek.com)
echo 'export DEEPSEEK_API_KEY="$DEEPSEEK_API_KEY"' >> ~/.bashrc
# OpenRouter (optional — cheapest US latency)
echo 'export OPENROUTER_API_KEY="$OPENROUTER_API_KEY"' >> ~/.bashrc
# Fireworks AI (optional — fastest inference)
echo 'export FIREWORKS_API_KEY="$FIREWORKS_API_KEY"' >> ~/.bashrc
source ~/.bashrc
Windows (PowerShell):
setx DEEPSEEK_API_KEY $env:DEEPSEEK_API_KEY
setx OPENROUTER_API_KEY $env:OPENROUTER_API_KEY
setx FIREWORKS_API_KEY $env:FIREWORKS_API_KEY
3. Install the CLI
macOS/Linux:
chmod +x deepclaude.sh
sudo ln -s "$(pwd)/deepclaude.sh" /usr/local/bin/deepclaude
Windows (PowerShell):
Copy-Item deepclaude.ps1 "$env:USERPROFILE\.local\bin\deepclaude.ps1"
# Or add repo directory to PATH:
setx PATH "$env:PATH;C:\path\to\deepclaude"
Key CLI commands
# Launch Claude Code with DeepSeek V4 Pro (default)
deepclaude
# Show available backends and configured API keys
deepclaude --status
# Select a specific backend
deepclaude --backend ds # DeepSeek (default)
deepclaude --backend or # OpenRouter
deepclaude --backend fw # Fireworks AI
deepclaude --backend anthropic # Normal Claude Opus
# Show pricing comparison
deepclaude --cost
# Latency benchmark across all configured providers
deepclaude --benchmark
# Switch backend mid-session (proxy must be running)
deepclaude --switch ds
deepclaude --switch or
deepclaude --switch anthropic
# Remote control — open session in any browser
deepclaude --remote
deepclaude --remote --backend or
deepclaude --remote --backend anthropic
Supported backends
| Backend | Flag | Input/M | Output/M | Notes |
|---|---|---|---|---|
| DeepSeek | ds |
$0.44 | $0.87 | Auto context caching (120x cheaper on repeat turns) |
| OpenRouter | or |
$0.44 | $0.87 | Lowest latency from US/EU |
| Fireworks AI | fw |
$1.74 | $3.48 | Fastest inference, US servers |
| Anthropic | anthropic |
$3.00 | $15.00 | Original Claude Opus |
Live backend switching (no restart)
A local proxy runs on localhost:3200 and intercepts all API calls. Switch backends instantly without restarting Claude Code.
Proxy control endpoints
# Switch backend
curl -sX POST http://127.0.0.1:3200/_proxy/mode -d "backend=deepseek"
curl -sX POST http://127.0.0.1:3200/_proxy/mode -d "backend=openrouter"
curl -sX POST http://127.0.0.1:3200/_proxy/mode -d "backend=anthropic"
# Check current backend + uptime
curl -s http://127.0.0.1:3200/_proxy/status
# Token usage and cost savings vs Anthropic
curl -s http://127.0.0.1:3200/_proxy/cost
Cost endpoint response shape:
{
"backends": {
"deepseek": {
"input_tokens": 125000,
"output_tokens": 45000,
"requests": 12,
"cost": 0.0941,
"anthropic_equivalent": 1.05
}
},
"total_cost": 0.0941,
"anthropic_equivalent": 1.05,
"savings": 0.9559
}
Slash commands (recommended UX)
Create files in ~/.claude/commands/ to switch backends from inside any Claude Code session:
~/.claude/commands/deepseek.md:
Switch the model proxy to DeepSeek. Run this command silently and report the result:
curl -sX POST http://127.0.0.1:3200/_proxy/mode -d "backend=deepseek"
If successful, say: "Switched to DeepSeek."
~/.claude/commands/anthropic.md:
Switch the model proxy back to Anthropic. Run this command silently and report the result:
Установить deepclaude-proxy в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл deepclaude-proxy?
Use Claude Code's autonomous agent loop with DeepSeek V4 Pro, OpenRouter, or any Anthropic-compatible backend at up to 17x lower cost.
Как установить скилл deepclaude-proxy?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл deepclaude-proxy запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic