ccLoad: Instructions file for Claude Code

CLAUDE.md

ccLoad CLAUDE.md is an instructions file for Claude Code from caidaoli/ccLoad. It costs 1,392 tokens per session, scanned A, original, MIT.

Project-specific instructions for developing ccLoad, a Go gateway that connects to multiple AI service providers and can switch channels, convert protocols, and track costs.

In plain words
What is it for?
Use them when building, testing, linting, reviewing race conditions, verifying the web interface, or preparing releases for ccLoad.
Why use it?
They record the project’s required commands, testing practices, code rules, and less obvious behavior so changes follow the repository’s conventions.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Codex.

This is caidaoli/ccLoad's own configuration. It tells Claude Code how to work on ccLoad itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ccLoad configures →

Reuse

Borrowing it

Nothing to install: this file belongs to caidaoli/ccLoad. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/caidaoli/ccLoad/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/caidaoli/ccLoad

Made for: Claude Code.

Wrote 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.

agentmods badge for ccLoad CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/caidaoli/ccload/claude-md/github.svg)](https://agentmods.dev/instructions/caidaoli/ccload/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/caidaoli/ccload/claude-md"><img src="https://agentmods.dev/badge/instructions/caidaoli/ccload/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.

agentmods 80×15 button for ccLoad CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/caidaoli/ccload/claude-md"><img src="https://agentmods.dev/badge/instructions/caidaoli/ccload/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,392 This file is loaded in full into every session.
When invoked 1,392 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.01392 $0.01392
Opus 5.5 $0.00557 $0.00557
Sonnet 5.5 $0.00278 $0.00278
Haiku 4.5 $0.00139 $0.00139

Measured 17d ago against content hash a9df341cd0f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ccLoad 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 17d 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.

CLAUDE.md · 53 lines

How it starts

The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

ccLoad 是 Claude/OpenAI/Gemini/Codex 多协议 API 网关,负责渠道选择、故障切换、协议转换与成本计量。

工作方式

  • 修改任务完成到实现、相关验证及本次引入问题的修复;常规本地操作按现有授权连续执行。
  • 按下表读取与当前改动有关的契约。新增或修正规则写入对应专题,根文件只保留通用约束与入口。
  • 发布使用仓库 ccload-release;CLIProxyAPI 核心及 provider adapter 的同步/同步审计使用 sync-cliproxy-core。
  • 上游参照源码优先用本机 checkout:CLIProxyAPI ~/Source/go/CLIProxyAPI、sub2api ~/Source/go/sub2api(~/Source 即 ~/Share/Source)。checkout 不钉提交,对照时按专题文档或 internal/protocol/cliproxy/UPSTREAM.md 记录的提交用 git -C <repo> show <commit>:<path> 读,不读 HEAD;本机不存在时按记录的仓库与提交获取。

命令与验证

Go 构建和测试必须带 -tags sonic(Makefile 已处理)。环境变量契约见 .env.example(容器部署见 .env.docker.example);本地 .env 被 gitignore,仅作个人覆盖。

make build                    # 构建并注入版本
make dev                      # 开发运行
go test -tags sonic ./internal/app -run 'TestXxx' # 受影响测试
go test -tags sonic ./internal/...
make verify-web               # 前端验证,含 node:test
make race-fast                # 并发相关改动;全量使用 make race
golangci-lint run ./...        # Go 改动提交前零警告
  • 迭代运行受影响包;Go 改动提交前运行全量 ./internal/... 与 lint,前端改动运行 make verify-web。
  • 不用 -count=1,除非排查缓存、不稳定测试或测量性能。独立检查可并行。
  • 调整测试并行度时读 测试并行化。发布和核心同步的专属验证命令见各自技能。

通用代码约束

  • 用 any;配置错误 fail-fast;defer cancel() 无条件调用,取消监听用 context.AfterFunc。
  • lint 启用 errcheck/govet/staticcheck/unused/revive/bodyclose,gosec 已禁。
  • JSON 重复 key 按 encoding/json 后者胜出,不加检测、拒绝或兼容兜底,审查也不作为问题;只有改写与渲染不一致时才就地收敛(见 ordered_json.go)。
  • Web 单选下拉必须可搜索:统一由 searchable-select.js 增强并复用 createSearchableCombobox;原生 <select> 仅作隐藏的表单/业务值载体。保留动态选项、禁用态、input/change、表单提交、键盘/ARIA 与 <dialog> 顶层菜单;多选控件未提供可搜索实现前禁止新增。

任务入口

路径相对仓库根目录;下表省略目录的 Go 文件位于 internal/app/。只读取相关专题;上游文档按提供商分节。

任务 代码入口与契约
代理、SSE、重试、冷却、取消 proxy_handler.go:HandleProxyRequest → runProxyAttemptLoop → proxy_forward.go / proxy_stream.go;代理契约
Responses WebSocket proxy_responses_websocket.go、responses_execution_session.go;代理契约及 Codex 契约
渠道/Key/URL、模型后缀、多模态回退 selector*.go、key_selector.go、url_selector.go;路由契约
上游认证、请求指纹、provider wire 各提供商 *_wire.go / *_credentials.go / internal/*auth/;上游契约
Registry 与协议转换 internal/protocol/registry.go → builtin/register.go → builtin/cliproxy_adapter.go;转换边界,快照来源见 internal/protocol/cliproxy/UPSTREAM.md
计费、访问控制、OAuth 额度 internal/util/cost_calculator.go、internal/oauthcost/、oauth_quota_cost.go;计费契约
系统设置、超时、连接、存储与迁移 config_service.go、internal/storage/;运行与存储契约;写库后按改动失效 InvalidateChannelListCache / InvalidateAPIKeysCache
Admin API、管理账户与定时任务 admin_types.go → admin_<feature>.go → server.go:SetupRoutes;账户核心为 channel_management_service.go;管理与定时任务
发布、容器与进程内更新 .agents/skills/ccload-release/SKILL.md;更新机制
管理后台 / 独立介绍站 web/ 是管理后台;www/ 是独立介绍站,make www-setup 复制共享资源后可独立部署

Read the full file on GitHub · 53 lines

Changes

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.

  1. 17d ago Changed · -75 tokens per session a9df341cd0f8
  2. 23d ago Changed · +2 lines · +173 tokens per session 2c1e56626e04
  3. 1mo ago Changed · +26 tokens per session b493c34940b9
  4. 1mo ago Changed · -127 lines · -14,227 tokens per session 2c046d0f7f93
  5. 1mo ago Changed · +3 lines · +422 tokens per session c26950346f1e
  6. 1mo ago Changed · +886 tokens per session 45af0e22230e
  7. 1mo ago First seen · 175 lines · 14,187 tokens per session scan A 5cec851f9e9b

Subscribe to this mod's changes

ccLoad CLAUDE.md is an instructions file published in the GitHub repository caidaoli/ccLoad (428 stars, last pushed today), licensed MIT. It adds 1,392 tokens to every session, about $0.0056 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.

Related

Other instructions, from other repositories