ccx AGENTS.md

Repository instructions for the CCX project, an AI API gateway that connects different service formats. They describe its code structure, development rules, and build and test commands.

In plain words
What is it for?
They guide work across the Go backend, Vue frontend, configuration, documentation, development servers, builds, tests, formatting, and linting.
Why use it?
They give an agent the project context and local conventions needed to make consistent changes safely.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/benedictking/ccx/agents-md
Clone the repo
git clone --depth 1 https://github.com/BenedictKing/ccx

Made for: Codex, OpenCode.

Per session 1,228 This file is loaded in full into every session.
When invoked 1,228 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01228 $0.01228
Opus 5 $0.00614 $0.00614
Sonnet 5 $0.00246 $0.00246
Haiku 4.5 $0.00123 $0.00123

Measured 2d ago against content hash ebe6995470ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ccx AGENTS.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 2d 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.

AGENTS.md · 60 lines

How it starts

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

仓库协作指南

重要约定

  • 始终使用简体中文回复
  • 遵循 SOLID / KISS / DRY / YAGNI;优先修复根因,避免无关重构。
  • 禁止停止或杀掉本项目正在运行的服务进程;默认用户已通过开发命令启动服务,如需让代码生效,只能提示用户手动重启或使用用户明确指定的安全方式。
  • 修改文档时,优先以以下文件为事实源:VERSIONMakefilebackend-go/Makefilefrontend/package.jsonbackend-go/main.go

项目概览

  • CCX 是一个多上游 AI API 代理与协议转换网关,当前正式支持六类渠道:messageschatresponsesgeminiimagesvectors
  • 根目录 VERSION 是唯一发布版本源;后端构建时通过 backend-go/Makefile-ldflags 注入运行时版本信息。

项目结构与模块

  • backend-go/:主 Go 服务(Gin),负责路由、认证、调度、协议转换、指标与日志;前端构建产物嵌入到 backend-go/frontend/dist/
  • frontend/:Vue 3 + Vite + Vuetify 管理界面。
  • dist/:发布构建产物,禁止手动编辑。
  • .config/:运行时配置与持久化目录(如 config.jsonmetrics.dbbackups/)。
  • refs/:外部参考项目存档,仅供对照,默认只读。
  • 文档入口:README.mdREADME.zh-CN.mdbackend-go/README.mddocs/guide/architecture.mddocs/guide/development.mddocs/guide/environment.mddocs/guide/release.md

构建 / 测试 / 开发命令

  • 全栈开发(推荐):根目录 make dev(前端 bun run dev + 后端 air 热重载)。
  • 根目录常用命令:make runmake buildmake frontend-devmake clean
  • 仅后端:cd backend-go && make dev|run|build|test|test-cover|fmt|lint|deps
  • 后端本地构建:cd backend-go && make build-local
  • 前端:cd frontend && bun install 后执行 bun run dev|build|preview|type-check|lint
  • Docker:docker-compose up -d 用于接近生产环境的验证。

代码风格

  • Go:保持包职责单一、接口清晰;修改后运行 go fmt ./...
  • 前端:遵循现有 Vuetify / TypeScript / Prettier 风格;保持 strict 类型约束。
  • 不要手动编辑生成产物:dist/frontend/dist/backend-go/frontend/dist/
  • 配置/密钥:.env / .json 只提交示例文件或文档化内容,禁止提交真实密钥。

路由与能力边界

  • 实际代理与管理路由以 backend-go/main.go 为准。
  • 常见代理入口包括:
    • /v1/messages
    • /v1/chat/completions
    • /v1/responses
    • /v1/images/generations
    • /v1/images/edits
    • /v1/images/variations
    • /v1/embeddings
    • /v1beta/models/*
  • 管理入口统一位于 /api/{type}/channels/*
  • 能力测试当前只适用于 messageschatresponsesgemini;不要假设 imagesvectors 具备 capability-test。
  • 渠道保活验证位于 backend-go/internal/healthcheck/:L1(带 key 拉模型列表)六类渠道通用,L2(最便宜模型的普通真实调用)仅 messageschatresponsesgemini;配置为全局/渠道级 healthCheck,频率硬下限 30 分钟;管理端点 GET /api/{type}/channels/:id/healthPOST /api/{type}/channels/:id/health/check

Read the full file on GitHub · 60 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. 2d ago First seen · 60 lines · 1,228 tokens per session scan A ebe6995470ad

Subscribe to this mod's changes

ccx AGENTS.md is an instructions file published in the GitHub repository BenedictKing/ccx (3,966 stars, last pushed 2d ago), licensed MIT. It adds 1,228 tokens to every session, about $0.0061 per session on Opus 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

ClawRouter CLAUDE.md

Claude Code instructions for BlockRunAI/ClawRouter, covering clawrouter, commands, project structure, key dependencies and conventions.

BlockRunAI/ClawRouter · 535 tokens

SearChat CLAUDE.md

Claude Code instructions for yokingma/SearChat, covering claude.md, project overview, architecture, monorepo structure and key technologies.

yokingma/SearChat · 852 tokens

ima2-gen AGENTS.md

Instructions for lidge-jun/ima2-gen, covering ima2-gen — ai context, what this project does, tech stack, project structure and agent skills (packaged).

lidge-jun/ima2-gen · 1,235 tokens

InvestSkill copilot-instructions.md

Instructions for yennanliu/InvestSkill, covering investskill — github copilot setup & usage guide, installation & setup, automatic setup, verify setup and core stock analysis (6 frameworks).

yennanliu/InvestSkill · 3,183 tokens

InvestSkill GEMINI.md

Instructions for yennanliu/InvestSkill, covering investskill — gemini cli setup & usage guide, installation & setup, quick start, navigate to the investskill directory and start gemini cli (loads gemini.md automatically).

yennanliu/InvestSkill · 3,074 tokens

DevoxxGenieIDEAPlugin GEMINI.md

Instructions for devoxx/DevoxxGenieIDEAPlugin, a project described as: DevoxxGenie is an agentic plugin for IntelliJ IDEA that uses local LLM's (Ollama, LMStudio, GPT4All, Jan and Llama.cpp) and Cloud based LLMs to help review, test, explain your project code. Latest version now also supports Spec Driven Development…

devoxx/DevoxxGenieIDEAPlugin · 257 tokens