BenedictKing/ccx is an AI API proxy and protocol-translation gateway that provides one entry point for Claude, OpenAI, Codex Responses, Gemini, and other listed APIs. It is used to manage provider channels, keys, routing, monitoring, and failover, and the catalogue entries provide skills and instructions for operating it.
Borrowing it
Nothing to install: this file belongs to BenedictKing/ccx. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/BenedictKing/ccx/main/CLAUDE.mdgit clone --depth 1 https://github.com/BenedictKing/ccxWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/benedictking/ccx/claude-md)<a href="https://agentmods.dev/instructions/benedictking/ccx/claude-md"><img src="https://agentmods.dev/badge/instructions/benedictking/ccx/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/benedictking/ccx/claude-md"><img src="https://agentmods.dev/badge/instructions/benedictking/ccx/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01665 | $0.01665 |
| Opus 5.5 | $0.00666 | $0.00666 |
| Sonnet 5.5 | $0.00333 | $0.00333 |
| Haiku 4.5 | $0.00167 | $0.00167 |
Grade A, and why
ccx CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 161 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with this repository.
项目概述
CCX 是一个支持 Claude、OpenAI Chat、OpenAI Images、OpenAI Embeddings、Codex Responses 和 Gemini 的多上游 AI API 代理与协议转换网关,提供统一代理入口和 Web 管理界面。
技术栈: Go 1.25 + Gin(后端)+ Vue 3 + Vuetify 3 + TypeScript(前端)+ Docker
版本管理: 根目录 VERSION 是唯一版本源,构建时通过 backend-go/Makefile 的 -ldflags 注入运行时版本信息。
常用命令
# 根目录(推荐)
make dev # 同时启动前端开发服务器和后端热重载
make run # 构建前端并运行 Go 后端
make frontend-dev # 前端开发服务器
make build # 构建前端并编译 Go 后端
make clean # 清理构建文件
# Go 后端开发 (backend-go/)
make dev # 热重载开发模式
make run # 复制前端产物后直接运行
make build # 构建生产版本
make test # 运行所有测试
make test-cover # 测试 + 覆盖率报告
make fmt # 格式化代码
make lint # 代码检查
make deps # 更新依赖
# 前端开发 (frontend/)
bun install
bun run dev
bun run build
bun run type-check
架构概览
Client -> backend :3000 ->
|- / -> Web UI
|- /api/* -> Admin API
|- /v1/messages -> Claude Messages proxy
|- /v1/chat/completions -> OpenAI Chat proxy
|- /v1/responses -> Codex Responses proxy
|- /v1/images/{...} -> OpenAI Images proxy
|- /v1/embeddings -> OpenAI Embeddings proxy
|- /v1/models -> Models API
`- /v1beta/models/* -> Gemini proxy
六类正式渠道:
messageschatresponsesgeminiimagesvectors
核心设计模式
- Provider Pattern -
backend-go/internal/providers/负责上游请求构造与响应处理。 - Converter Pattern -
backend-go/internal/converters/负责 Responses 场景的协议转换。 - Session Manager -
backend-go/internal/session/负责 Responses 多轮会话与 Trace 亲和性。 - Scheduler Pattern -
backend-go/internal/scheduler/负责优先级、促销期、熔断与故障转移。
API 总览
代理入口
POST /v1/messagesPOST /v1/messages/count_tokensPOST /v1/chat/completionsPOST /v1/responsesPOST /v1/responses/compactGET /v1/modelsGET /v1/models/:modelPOST /v1beta/models/{model}:generateContentPOST /v1/images/generationsPOST /v1/images/editsPOST /v1/images/variationsPOST /v1/embeddingsGET /health
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 161 lines · 1,665 tokens per session scan A 4a2760f3ecb6
ccx CLAUDE.md is an instructions file published in the GitHub repository BenedictKing/ccx (3,983 stars, last pushed 3d ago), licensed MIT. It adds 1,665 tokens to every session, about $0.0067 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
ccx CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ccx CLAUDE.mdBenedictKing/ccx | Instructions file | 4.0k | 3d ago | MIT | A | 1,665 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |