testAccountDeltas

Claude Code Relay — Development skill for Claude Code

Development community

One-click Claude Code on any CLIProxyAPI/CliRelay gateway.

How to install Claude Code Relay

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

What Claude Code Relay does

One-click Claude Code on any CLIProxyAPI/CliRelay gateway. Fixes the x-anthropic-billing-header 429/503, runs a silent local proxy, and adds a right-click folder action to launch the agent. Windows & macOS.

Alternatives in Development

  • Ccusage — CLI for analyzing Claude Code/Codex usage from local JSONL files 11.8k ★
  • Bypass 403 — Probe a 403/401 endpoint with the most-paid bypass tricks (header injection, path encoding, method swap, WAF f 4.5k ★
  • License — Check that every Python source file carries the required SPDX Apache-2.0 license header 1.1k ★

README

claude-code-relay

One script to run **Claude Code** against your own [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI) / CliRelay gateway (Gemini, Claude, GPT, … on your subscription). Right-click any folder → **"Run agent here"** → Claude Code opens in that folder with `--dangerously-skip-permissions`, talking to your gateway. Windows & macOS.

Один скрипт ставит Claude Code в паре с CliRelay (или любым CLIProxyAPI-шлюзом): правый клик по папке → **«Запустить агента здесь»** → Claude Code открывается в этой папке с `--dangerously-skip-permissions`, работая через шлюз на твоей подписке.

The `x-anthropic-billing-header` fix (why this exists)

Point Claude Code at a CLIProxyAPI/Antigravity gateway via `ANTHROPIC_BASE_URL` and the very first request fails with:

503 All credentials for model ... are temporarily unavailable
(upstream: 429 RESOURCE_EXHAUSTED — "Resource has been exhausted / check quota")

It looks like a quota/capacity problem — **it is not**. Claude Code injects a system block whose text is `x-anthropic-billing-header: cc_version=...; cc_entrypoint=cli;`. The gateway's Antigravity→Gemini path chokes on that text and returns `429`, which cascades to `503`. (Proven by byte-exact request replay + bisection: removing just that one system block → `200`.)

This tool ships a tiny **local proxy that strips that block** before forwarding, so Claude Code works. Everything else — auth, streaming, tools — already works fine over CLIProxyAPI.

Установка

python setup-agent.py

Спросит **URL шлюза** и **API-ключ**, подтянет список моделей, всё настроит.

Требуется: Python 3.8+ и установленный Claude Code (`claude` в PATH).

  • установить Claude Code: npm i -g @anthropic-ai/claude-code или brew install --cask claude-code.

Что делает

  • Ставит тихий фикс-прокси (~/.clirelay-agent/relay-proxy.py): вырезает служебный system-блок x-anthropic-billing-header, из-за которого шлюз иначе отдаёт 429/503. Работает **