Borrowing it
Nothing to install: this file belongs to betmoar/cc-proxy-plugin. 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/betmoar/cc-proxy-plugin/main/CLAUDE.mdgit clone --depth 1 https://github.com/betmoar/cc-proxy-pluginWrote 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/betmoar/cc-proxy-plugin/claude-md)<a href="https://agentmods.dev/instructions/betmoar/cc-proxy-plugin/claude-md"><img src="https://agentmods.dev/badge/instructions/betmoar/cc-proxy-plugin/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/betmoar/cc-proxy-plugin/claude-md"><img src="https://agentmods.dev/badge/instructions/betmoar/cc-proxy-plugin/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.03741 | $0.03741 |
| Opus 5.5 | $0.01496 | $0.01496 |
| Sonnet 5.5 | $0.00748 | $0.00748 |
| Haiku 4.5 | $0.00374 | $0.00374 |
Grade B, and why
cc-proxy-plugin CLAUDE.md scanned grade B with 1 finding 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 1mo 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
| 7 | `scripts/render-model-picker.js` `writeSettings()` | corrupts or forks the user's `~/.claude/settings.json` | How it starts
The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.
cc-proxy — maintainer handoff
A local HTTP proxy that lets Claude Code use GLM (Z.ai), OpenRouter, DeepSeek,
Qwen, LM Studio (self-hosted, lmstudio: selector only) and Claude in one
session. Claude Code points ANTHROPIC_BASE_URL at it; the proxy routes each
request by model name and forwards. That is the whole product. Resist
making it more than that.
This file carries the rules. The evidence behind each rule (measurements,
histories, refuted alternatives) is in
docs/MAINTAINING.md; read the matching section there
before reversing anything here.
Read next: docs/ARCHITECTURE.md (design and why),
docs/ROUTING.md / docs/DISCOVERY.md
/ docs/CONFIGURATION.md (the user-facing contracts),
docs/OPERATIONS.md (runtime),
docs/RELEASING.md, docs/BACKLOG.md
(open work and why past decisions went the way they did),
CONTRIBUTING.md (add-a-provider procedure).
Gates
pnpm check(=pnpm lint && pnpm test) before any commit; CI runs the same. The suite spins real local HTTP backends: if you change forwarding and no test fails, you have not tested it. Add one.pnpm probe:vendorsis the MANUAL gate for claims about someone else's server. Never inpnpm check(real keys, real quota). It exits 1 when a vendor stops behaving the way a source comment says. Run it when you touch routing or forwarding, or when a probe date in a comment looks old.- Node 22 or newer.
.npmrcis engine-strict becauseprocess.loadEnvFileis how~/.envis read.
Invariants (breaking one is a design decision, not a refactor)
Each is locked by tests; the test names tell you what you broke.
- Transparent pipe. Auth and headers only. The full inbound path
including the query string reaches upstream; bodies forwarded byte for
byte. Four body exceptions and two header exceptions (hop-by-hop dropped;
the upstream's own
x-request-iddropped, becausewriteHeadreplaces whatsetHeaderput there). The first three body strips share one shape — a spelling the CLIENT uses that no BACKEND knows: thinking-strip,<provider>:selector strip,[1m]suffix strip. The fourth is the INVERSE shape — history a BACKEND produced that the destination backend rejects wholesale (GLM's ownserver_tool_usecalls) — and is DIRECTIONAL for that reason: claude route only, since the same history is legal input to the backend that made it. It removes MESSAGES too, not just blocks, becausecontent: []is its own 400. →server.test.js"query string is preserved…", "provider selector strip…", "routing log annotates the normalized id…", "keeps the proxy's x-request-id when the upstream sets its own…", "no message reaches upstream with an EMPTY content array" - Stateless. No breakers, no on-disk state, no in-proxy waiting. Rate
limits inject
Retry-Afterand let the client back off. → "…1302 … gets a Retry-After", "1313 … no Retry-After" - Credential isolation. Inbound
Authorization/x-api-keynever reach a third party; the Claude route passes them through (OAuth). Never setANTHROPIC_API_KEYin a settings template; it shadows OAuth. →providers.test.js"…drops an inbound x-api-key…" claude-haiku-*pins to Claude. The pin tests the STRIPPED tail; pinning the raw id letsglm:claude-haiku-…skip it. →router.test.js- Anthropic Messages only. No OpenAI-to-Anthropic translation, ever. The
media tunnel forwards a DashScope body byte for byte and is not an
exception. →
models.test.js"media generation tunnel (issue #40)" - Client abort propagates upstream, or a cancelled turn bills into a dead socket. → "client abort mid-stream aborts the upstream request"
- Loopback bind by default.
PROXY_HOSTis the explicit opt-out;PROXY_AUTH_TOKENmakes it safe. →config.test.js - One bad request never ends the process. No
uncaughtExceptionhandler exists; every dispatch point contains its own throws (a JSONnullbody used to exit the process for every session). →server.test.js"dispatcher containment (a bad request never ends the process)"
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.
- 1mo ago Changed · -111 lines · -3,170 tokens per session 267ff5478ebc
- 1mo ago Changed · +11 lines · +525 tokens per session 9584844e8dd1
- 1mo ago Changed · +16 lines · +1,090 tokens per session 7e6d73295622
- 1mo ago First seen · 288 lines · 5,296 tokens per session scan B 7459a651c238
cc-proxy-plugin CLAUDE.md is an instructions file published in the GitHub repository betmoar/cc-proxy-plugin (12 stars, last pushed 1mo ago), licensed MIT. It adds 3,741 tokens to every session, about $0.0150 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.