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.
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.
npx agentmods add skills/xiaoduoya/codex-with-chatgpt/skillnpx skills add XiaoDuoYa/codex-with-chatgpt --skill skillgit clone --depth 1 https://github.com/XiaoDuoYa/codex-with-chatgptWrote 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/skills/xiaoduoya/codex-with-chatgpt/skill)<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>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.00090 | $0.10228 |
| Opus 5 | $0.00045 | $0.05114 |
| Sonnet 5 | $0.00018 | $0.02046 |
| Haiku 4.5 | $0.00009 | $0.01023 |
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). 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
- NEVER paste file contents, diffs, or logs into ChatGPT. ChatGPT reads them through MCP.
- 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.
- The pairing code is the ONLY credential you may ever type into a browser. Never touch OAuth tokens, cookies, or session storage.
- If something fails, run
c2c doctorand 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:setupModemissing: tell the user exactlysetupChoicePrompt, wait for 「1」or「2」, thenc2c prefs set --setup-mode auto|manual --json. Do not start ChatGPT configuration until they answer. Do not guess.setupModeismanual: skip automatic ChatGPT settings. Use guided manual from the start (chosen, not a failure).setupModeisauto: 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 savedsetupModewhen falling back.developerModeEnabled: truemeans skip#settings/Securityuntil a connector create fails because developer mode is required. Then open that page, enable it, andc2c 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.
- 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.
- Conversation reuse depends on
c2c session --json→conversation.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
gotohttps://chatgpt.com/to create it, and never reuse another Codex conversation's chat URL just becausesession.urlexists. 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.
- 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. - ChatGPT pages: only the URLs in In-app browser (ChatGPT). Never start from chatgpt.com and click through menus.
- Doctor gate. After
c2c doctor --json, do notgotoChatGPT and do not send[C2C]until local is green — except the reconnect settings pages whenchatgptRepair.neededis true. Not green:report.bridge.okis not truereport.mcp.okis not true (unauthenticated local/mcpmust be 401)- sandbox / state-dir write failed (EPERM)
- this workspace used to have a public URL and the tunnel is down
chatgptRepair.neededis true (fix the connector first, then doctor again)namedRepair.neededis true (user must log in to Cloudflare, then doctor again. Do not Delete the ChatGPT connector — the address did not change)report.bridgesays 状态无法确认: the local bridge may still be running. Do notc2c start, do not Delete the connector, do not treat it aschatgptRepair. 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.
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.
- today Changed · +139 lines 63010b8b0473
- 6d ago First seen · 556 lines · 90 tokens per session scan C 3e0eb67fe648
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.
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…
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…
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".
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…
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".
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…