Coder-Codex-Gemini CLAUDE.md

A project guide for Coder-Codex-Gemini, an MCP server that coordinates several AI models to plan, write, review, and advise on code. MCP is a standard way for AI assistants to call external tools.

In plain words
What is it for?
Use it when working on the server, its command-line entry point, model-specific tools, configuration, workflow guides, or collaboration templates.
Why use it?
It explains which model handles each role and how work moves from planning through execution, review, and retries.

Instructions file

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/fredericmn/coder-codex-gemini/claude-md
Clone the repo
git clone --depth 1 https://github.com/FredericMN/Coder-Codex-Gemini
Per session 1,438 This file is loaded in full into every session.
When invoked 1,438 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01438 $0.01438
Opus 5 $0.00719 $0.00719
Sonnet 5 $0.00288 $0.00288
Haiku 4.5 $0.00144 $0.00144

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

Security

Grade A, and why

Coder-Codex-Gemini CLAUDE.md scanned grade A 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 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

通过 `subprocess.Popen(env=custom_env)` 注入环境变量,无需依赖脚本文件。
CLAUDE.md · 135 lines

How it starts

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

Coder-Codex-Gemini (CCG)

Claude + Coder + Codex + Gemini 多模型协作 MCP 服务器

项目定位

一个统一的 MCP 服务器,让 Claude (Opus) 作为架构师调度 Coder 执行代码任务、Codex 审核代码质量、Gemini 提供专家咨询,形成自动化的多方协作闭环。

核心价值

维度 价值
成本优化 Opus 负责思考(贵但强),Coder 负责执行(量大管饱)
能力互补 Opus 补足 Coder 创造力短板,Codex 提供独立审核视角,Gemini 提供多元化专家意见
质量保障 双重审核机制(Claude 初审 + Codex 终审)
全自动闭环 拆解 → 执行 → 审核 → 重试,无需人工干预

角色分工

Claude (Opus)     →  架构师 + 初审官 + 终审官 + 协调者
Coder (可配置)    →  代码执行者(生成、修改、批量任务)
Codex (OpenAI)    →  独立代码审核者(质量把关)
Gemini (可选)     →  多面手专家(架构设计、第二意见、前端/UI)

项目结构

Coder-Codex-Gemini/
├── src/ccg_mcp/              # 源代码
│   ├── __init__.py
│   ├── cli.py                # 入口点
│   ├── server.py             # MCP 服务器主体
│   ├── config.py             # 配置加载
│   └── tools/
│       ├── coder.py          # Coder 工具
│       ├── codex.py          # Codex 工具
│       └── gemini.py         # Gemini 工具
├── skills/                   # Skills 工作流指导
│   ├── ccg-workflow/         # CCG 协作流程
│   └── gemini-collaboration/ # Gemini 协作指南
├── templates/                # 模板文件
│   └── ccg-global-prompt.md  # 全局 CLAUDE.md 模板
├── cases/                    # 实测案例
├── pyproject.toml
├── config.example.toml       # 配置文件示例
├── setup.sh                  # Unix/macOS 安装脚本
├── setup.ps1                 # Windows PowerShell 安装脚本
├── setup.bat                 # Windows 批处理入口
├── README.md                 # 项目说明(中文)
├── README_EN.md              # 项目说明(英文)
└── CLAUDE.md                 # 本文件

开发里程碑

阶段 内容 状态
M0 方案设计、技术验证 ✅ 完成
M1 最小可用版本(coder 工具) ✅ 完成
M2 集成 codex 工具 ✅ 完成
M3 协作 Prompt 优化 ✅ 完成
M4 集成 gemini 工具 ✅ 完成
M5 文档、发布 ✅ 完成

技术要点

MCP 工具

  • coder: 调用可配置后端模型执行代码生成/修改,默认 workspace-write
  • codex: 调用 Codex 进行代码审核,默认 read-only
  • gemini: 调用 Gemini CLI 进行专家咨询或代码执行,默认 workspace-write

核心特性

结构化错误

失败时返回 error_kinderror_detail,便于上层决策是否重试:

{
  "success": false,
  "error": "错误摘要",
  "error_kind": "timeout | upstream_error | ...",
  "error_detail": {
    "message": "错误简述",
    "exit_code": 1,
    "last_lines": ["最后20行输出..."],
    "retries": 0
  }
}

Read the full file on GitHub · 135 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 · 135 lines · 1,438 tokens per session scan A 97203d9e8165

Subscribe to this mod's changes

Coder-Codex-Gemini CLAUDE.md is an instructions file published in the GitHub repository FredericMN/Coder-Codex-Gemini (181 stars, last pushed 7mo ago), licensed MIT. It adds 1,438 tokens to every session, about $0.0072 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). 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

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

buildNext

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

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

Instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,040 tokens

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

langchain-ai/langchain · 4,345 tokens