codex-with-chatgpt

codex-with-chatgpt is a skill for Claude Code, Codex from XiaoDuoYa/codex-with-chatgpt. It costs 90 tokens per session (10,228 once invoked), scanned C, original, MIT.

A connection that lets ChatGPT help plan and review coding work while Codex edits files, runs commands, tests code, and handles execution.

In plain words
What is it for?
It helps connect or disconnect ChatGPT to the current workspace, plan coding tasks, review progress, and guide debugging.
Why use it?
It separates high-level planning from hands-on work, so you can use ChatGPT's reasoning without copying files, changes, or logs into a chat.

Skill for Claude CodeCodex

About the project

Codex with ChatGPT connects the ChatGPT web app to Codex as a planning and review assistant through a read-only MCP bridge. Developers use ChatGPT for reasoning about a coding task while Codex retains control of executing changes in the workspace. The catalogue skill supports this workflow.

XiaoDuoYa/codex-with-chatgpt · 2,474 stars · on GitHub

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 skills/xiaoduoya/codex-with-chatgpt/skill
Any agent
npx skills add XiaoDuoYa/codex-with-chatgpt --skill skill
Clone the repo
git clone --depth 1 https://github.com/XiaoDuoYa/codex-with-chatgpt

Made for: Claude Code, Codex.

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 codex-with-chatgpt

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaoduoya/codex-with-chatgpt/skill.svg)](https://agentmods.dev/skills/xiaoduoya/codex-with-chatgpt/skill)
Your own site
<a href="https://agentmods.dev/skills/xiaoduoya/codex-with-chatgpt/skill"><img src="https://agentmods.dev/badge/skills/xiaoduoya/codex-with-chatgpt/skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,228 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.1 $0.00090 $0.10228
Opus 5 $0.00045 $0.05114
Sonnet 5 $0.00018 $0.02046
Haiku 4.5 $0.00009 $0.01023

Measured today against content hash 63010b8b0473, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade C, and why

codex-with-chatgpt scanned grade C with 2 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 today.

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.

Subtle steeringmediumPrompt injection

Instructions that bias recommendations or shape behaviour without the user noticing.

commands (both are cheap / cached; never mention them unless an update exists):

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

`~/.codex/config.toml` on both, or `%USERPROFILE%\.codex\config.toml` on Windows).
skill/SKILL.md · 695 lines

How it starts

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

Codex with ChatGPT

ChatGPT thinks. Codex works.

You (Codex) own execution: editing, shell, git, tests, recovery. ChatGPT owns high-level reasoning: understanding, planning, review, debug strategy. The C2C Bridge gives ChatGPT read-only MCP access to the current workspace, so control messages between you and ChatGPT stay tiny (< 1 KB) — ChatGPT pulls whatever data it needs by itself.

Golden rules

  1. NEVER paste file contents, diffs, or logs into ChatGPT. ChatGPT reads them through MCP.
  2. NEVER show the user technical internals (MCP, OAuth, PKCE, tunnel, ports, localhost). Speak in terms of "连接 ChatGPT / 安全连接 / 配对". The only exception is the guided manual ChatGPT setup below: expose only the exact settings field labels/values the user must enter, without explaining internals.
  3. The pairing code is the ONLY credential you may ever type into a browser. Never touch OAuth tokens, cookies, or session storage.
  4. If something fails, run c2c doctor and repair silently. Only involve the user for logins, CAPTCHA, 2FA, explicit consent screens, or guided manual ChatGPT setup below — and then give them ONE action. Before the first ChatGPT connection on this machine, c2c prefs --json:
    • setupMode missing: tell the user exactly setupChoicePrompt, wait for 「1」or「2」, then c2c prefs set --setup-mode auto|manual --json. Do not start ChatGPT configuration until they answer. Do not guess.
    • setupMode is manual: skip automatic ChatGPT settings. Use guided manual from the start (chosen, not a failure).
    • setupMode is auto: automatic browser setup. Two explicit failures of the same configuration step after repair then enter guided manual. A browser/js timeout, a page still loading/generating, or waiting for user login/2FA does NOT count as a failure. Do not change the saved setupMode when falling back. developerModeEnabled: true means skip #settings/Security until a connector create fails because developer mode is required. Then open that page, enable it, and c2c prefs set --developer-mode --json. These prefs are for this machine, not per workspace. Do not ask again on reconnect or a second repo. A new computer (empty prefs) asks/checks once.
  5. ALWAYS use the built-in in-app browser (iab) for every ChatGPT step. Follow In-app browser (ChatGPT) below. NEVER Computer Use (no screenshot-click). NEVER launch or control a third-party/external browser (Chrome, Safari, Edge…), and never use open <url> to hand off to one.
    • The ONLY exception: the user explicitly says the Cloudflare login must use their own browser session — that single Cloudflare login step may go through their browser; everything else stays in the built-in browser.
    • If the user asks to run ChatGPT in their own browser, refuse politely and explain: "Codex 需要持续调用 ChatGPT 和配置连接,这会频繁操作页面,可能影响 你浏览器的正常使用。ChatGPT 只能跑在内置浏览器里。" Only if the user replies with an explicit "我愿意承担影响" may you proceed in their browser; otherwise keep ChatGPT in the built-in browser, every time they ask.
  6. Conversation reuse depends on c2c session --jsonconversation.mode (see Conversation management). Do not invent a second mode.
    • long-chat (legacy session file, or the user opted out): ONE ChatGPT conversation per workspace. Never silently start a new chat.
    • project (new workspaces, or an existing workspace that opted in): ONE ChatGPT Project (collection) per workspace. Same Codex conversation reuses the ChatGPT chat URL saved in THIS thread. A new Codex conversation opens a new chat from the Project collection page — never goto https://chatgpt.com/ to create it, and never reuse another Codex conversation's chat URL just because session.url exists. Each workspace also has exactly ONE ChatGPT connector. Do not create a second connector for the same workspace. Other workspaces may have their own connectors — never edit those.
  7. After first-time setup, never ask the user to approve writing C2C's local settings directory. Run c2c sandbox-allow --json (idempotent). If it fails with EPERM / Operation not permitted, request elevated permissions and retry ONCE. After { "alreadyAllowed": true } or { "added": true }, stay silent.
  8. ChatGPT pages: only the URLs in In-app browser (ChatGPT). Never start from chatgpt.com and click through menus.
  9. Doctor gate. After c2c doctor --json, do not goto ChatGPT and do not send [C2C] until local is green — except the reconnect settings pages when chatgptRepair.needed is true. Not green:
    • report.bridge.ok is not true
    • report.mcp.ok is not true (unauthenticated local /mcp must be 401)
    • sandbox / state-dir write failed (EPERM)
    • this workspace used to have a public URL and the tunnel is down
    • chatgptRepair.needed is true (fix the connector first, then doctor again)
    • namedRepair.needed is true (user must log in to Cloudflare, then doctor again. Do not Delete the ChatGPT connector — the address did not change)
    • report.bridge says 状态无法确认: the local bridge may still be running. Do not c2c start, do not Delete the connector, do not treat it as chatgptRepair. Wait and run doctor again. A ChatGPT-side 401 after a sent message is different: repair then, do not treat it as permission to skip this gate next time.

Read the full file on GitHub · 695 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. today Changed · +139 lines 63010b8b0473
  2. 6d ago First seen · 556 lines · 90 tokens per session scan C 3e0eb67fe648

Subscribe to this mod's changes

codex-with-chatgpt is a skill published in the GitHub repository XiaoDuoYa/codex-with-chatgpt (2,474 stars, last pushed yesterday), licensed MIT. It adds 90 tokens to every session and 10,228 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it C with 2 findings (subtle steering, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

codexless-release-supervisor

Prepare, validate, and publish Codexless preview/hotfix releases from the canonical household source, including acceptance anti-omission gates, candidate provenance/parity, manifest/build identity, native Windows/macOS fresh-install acceptance from clean public source, safe Git integration, GitHub prerelease…

liyana31811/Codexless · 87 tokens

codexless-browser-repair

Diagnose and temporarily repair Codexless Browser compatibility after a Codex, Chrome Skill, or Browser runtime update when Codexless Browser stopped working. Use for current-version Codexless Browser compatibility drift, not ordinary website bugs, general Browser operation, Codexless install/update work, or long-term…

liyana31811/Codexless · 70 tokens

add-widget

Add a new widget (React UI + MCP tool) to this template. Use when asked to "add a widget", "add a new tool with UI", "create a new widget", "scaffold a widget", or "build a new MCP App feature".

pomerium/mcp-app-typescript-template · 56 tokens

threebrowser-studio-mcp

Author, inspect, render, validate, animate, and save Three.js WebGPU projects in the native ThreeBrowser Studio through its real threestudio MCP tools. Use whenever Codex is asked to build or edit a ThreeBrowser Studio scene, material, Blender-style shader or texture graph, animation, lighting setup, camera, or…

SamG-Coder/ThreeBrowserStudio · 122 tokens

create-mcp-tool

Add a plain (text-only) or UI-enhanced MCP tool to this template's server. Use when asked to "add a tool", "add an MCP tool", "create a new tool", "add a server-side tool without a widget", "add a tool with a UI", "add a tool with a widget", or "create a tool and a widget".

pomerium/mcp-app-typescript-template · 80 tokens

wani-code-review

Pre-review quality assurance for any repo in the WaniWani workspace. Run this skill BEFORE creating a PR, before claiming work is done, or when the user says "review", "QA", "check my changes", "pre-review", "ready for review", or anything suggesting they want to validate their work before sharing it. Also trigger…

WaniWani-AI/sdk · 93 tokens