GGGODLIN

Cc Translate Proxy — Development skill for Claude Code

Development community

Type 中文, CC sees English.

How to install Cc Translate Proxy

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

What Cc Translate Proxy does

Type 中文, CC sees English. Sidecar i18n proxy for Claude Code.

Alternatives in Development

  • Antigravity Claude Proxy — Proxy that exposes Antigravity provided claude / gemini models, so we can use them in Claude Code and OpenClaw 3.5k ★
  • Claude Code Proxy — Run Claude Code on OpenAI models 3.3k ★
  • Astro — Astro 5.x components, routing, collections, i18n, SEO, Tailwind, React islands, transitions 2.6k ★

README

cc-translate-proxy

讓 [Claude Code](https://claude.com/claude-code) 用英文跟 Anthropic 對話、你用繁中讀寫的 sidecar 翻譯 proxy。

![cc-translate-proxy demo — 一段對話,兩種語言](screenshots/brag-demo.gif)

為什麼做這個

兩件事讓我覺得值得寫個 sidecar:

  1. Claude Code 用英文比中文穩。Anthropic 自家 multilingual benchmark 顯示 Sonnet 4.5 中文(簡)對英文 MMLU 是 96.9%;最近一篇 vibe coding 實測論文 也指出中文 prompt 的問題解決率比英文低 4.5–9.9 個百分點。同樣語意中文 token 數還更多(Petrov et al. 2023 量過跨語 token 數可差 15x)。再加上 cc 會跟著「最後一句的語言」調整輸出,中英混打很容易把整段對話拉進中文模式。
  2. Sonnet 偶爾會自己切到韓文 / 日文。這是已知 bug,繁中使用者在 #30025(中文中突切韓文)跟 #46846(CLAUDE.md 明寫繁中仍回日文)都有重現案例。光靠 prompt / CLAUDE.md 提醒治不住。

這個 proxy 介在 cc 跟 `api.anthropic.com` 中間:你打的繁中先翻成英文再送過去;模型回的英文一邊原樣回 cc,一邊翻成繁中渲染在本機網頁上。**CC 那邊的對話 100% 英文**(便宜、穩定、不會自己切日韓文),**你這邊讀到的 100% 繁中**。

截圖

![繁中與英文雙向同步](screenshots/bilingual-render.png)

上半部是 cc-translate-proxy 的本機繁中 render(瀏覽器 `localhost:9090/`),下半部是 cc TUI 看到的英文版對話 — 同一輪對話、不同語言視角。網址 `?nostatusline=1` 是本機隱藏底部 statusline 用的截圖模式 query。

運作方式

你輸入「幫我重構這個函式」
   │
   ▼
cc-translate-proxy 攔截 /v1/messages
   ├─ 把繁中翻成英文(Gemini Flash / Groq / OpenRouter,自動切換)
   ├─ 英文版送 api.anthropic.com
   └─ 英文回應 fork 一份 → 翻成繁中 → 渲染到本機網頁

CC 看到乾淨英文對話;你瀏覽器讀到繁中 render。

使用前須知

  • 你的 prompt 跟 cc 回覆會送給第三方 LLM(預設 Gemini Flash)做翻譯。含敏感內容的 session 不要開。
  • 本機會留兩份對話落檔:audit log(翻譯前後的完整 prompt / 回覆,JSONL)在 ~/.cc-i18n-proxy/audit/、render 用的 emit 檔(繁中 markdown)在 ~/.cc-i18n-proxy/emit/。兩者都是除錯 / 渲染用,內容等同完整對話紀錄,要定期清。
  • 個人實驗工具,不適合 production。預期會碰到 bug。

快速開始

需要:Python 3.12+、[`uv`](https://github.com/astral-sh/uv)。

  1. Clone 跟安裝:

    git clone https://github.com/gggodlin/cc-translate-proxy.git
    cd cc-translate-proxy
    uv sync
  2. 設定翻譯 provider chain(複製範例後編輯):

    mkdir -p ~/.c