by Zhenyu98
A safe bridge for Codex and ChatGPT to hand off coding work, save tokens, and keep local execution under control.
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
# Add to your Claude Code skills
git clone https://github.com/Zhenyu98/codex-chatgpt-bridgeGuides for using ai agents skills like codex-chatgpt-bridge.
Last scanned: 7/6/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-07-06T08:19:32.494Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}Long Codex sessions burn quota on planning, re-reading, and repeated design. This bridge moves that heavy thinking to ChatGPT and keeps Codex focused on execution and verification, so a long build stays within budget and under local control.
| Before | After |
|---|---|
| Copy large context into the Codex chat to get a review | ChatGPT reads the scoped project directly over the bridge |
| Codex spends quota planning, re-reading, and iterating | ChatGPT plans and reviews; Codex executes one task at a time |
| A remote tool with unclear reach into your machine | A narrow, OAuth-gated root that is off by default and re-keyable |
git clone https://github.com/Zhenyu98/codex-chatgpt-bridge.git
cd codex-chatgpt-bridge
powershell -ExecutionPolicy Bypass -File .\install.ps1
If a copy is already installed, the installer moves it to a timestamped backup before copying the new skill. Use -ForceOverwrite only when you intentionally want to discard that installed copy. Add -RegisterRestartTask only if you also want the optional, on-demand Reboot task.
Expected success signal:
Installed codex-chatgpt-bridge skill to C:\Users\<you>\.codex\skills\codex-chatgpt-bridge
Restart Codex or reload skills to use it.
Then check the local environment (no tunnel started):
$skill = "$env:USERPROFILE\.codex\skills\codex-chatgpt-bridge"
powershell -ExecutionPolicy Bypass -File "$skill\scripts\local_bridge.ps1" -Action Doctor
Copy this to Codex, Claude Code, Cursor, or another coding agent:
Read https://github.com/Zhenyu98/codex-chatgpt-bridge/blob/main/agent-setup.md and follow it to install and configure codex-chatgpt-bridge for me.
See agent-setup.md for the full copy-paste prompt, prerequisites, and safe defaults.
NORMAL: ChatGPT acts like a strong review/reasoning subagent. Codex inspects enough context to steer the task, then executes and verifies.TOKEN_SAVING: Codex acts mostly as the orchestrator. Safe non-mutating reading, broad review, and synthesis go to ChatGPT whenever they save Codex tokens.CHATGPT_ARCHITECT: the planning-inverted mode for long, continuous builds. ChatGPT is the architect/manager (spec, design, task decomposition, per-task prompts, review); Codex executes one small task at a time and verifies. With your explicit L3 grant, ChatGPT can also write over the bridge while Codex integrates.The router picks by marginal cost: a unit of work goes to ChatGPT when it saves far more Codex tokens than one slow bridge round-trip. When a plan needs parallel subagents, ChatGPT can serve as the subagent pool so the fan-out stays off Codex quota, while Codex remains the single orchestrator that integrates and verifies.
$skill = "$env:USERPROFILE\.codex\skills\codex-chatgpt-bridge"
$controller = "$skill\scripts\bridge_controller.ps1"
# Save a non-secret profile once. Use cloudflare for a changing Quick Tunnel,
# or cloudflare-worker plus a stable Worker URL.
powershell -ExecutionPolicy Bypass -File $controller -Action Configure -ProjectRoot "D:\your\project" -Tunnel cloudflare -InstallCloudflared
powershell -ExecutionPolicy Bypass -File $controller -Action On
powershell -ExecutionPolicy Bypass -File $controller -Action Reboot
powershell -ExecutionPolicy Bypass -File $controller -Action Off
powershell -ExecutionPolicy Bypass -File $controller -Action Status
powershell -ExecutionPolicy Bypass -File $controller -Action Doctor
# Panic button: revoke issued OAuth tokens and mint a new Owner password.
powershell -ExecutionPolicy Bypass -File "$skill\scripts\local_bridge.ps1" -Action Rotate
Use the controller for normal operation. On records an intentional running state. Off records an intentional stopped state and closes the service and tunnel while preserving the ChatGPT app configuration. Restart and Reboot are the same mutex-protected transaction: stop, start, refresh Worker KV when configured, and verify the local, Quick Tunnel, and stable Worker endpoints before success. A Reboot refuses to reopen a bridge intentionally turned off with Off; use On to open it again.
For a stable Worker setup, configure the profile and store a minimum-scope Cloudflare token with Windows DPAPI before the first On:
powershell -ExecutionPolicy Bypass -File $controller -Action Configure -ProjectRoot "D:\your\project" -Tunnel cloudflare-worker -PublicBaseUrl https://bridge.example.workers.dev -InstallCloudflared
powershell -ExecutionPolicy Bypass -File "$skill\scripts\set_cf_api_config.ps1" -Action Set -AccountId <account-id> -KvNamespaceId <namespace-id>
powershell -ExecutionPolicy Bypass -File $controller -Action On
To keep one default working directory while authorizing several explicit file roots, add a semicolon-separated list. ProjectRoot must be inside one of the allowed roots:
powershell -ExecutionPolicy Bypass -File $controller -Action Configure -ProjectRoot "C:\Users\you\DevSpace" -AllowedRoots "C:\Users\you\DevSpace;D:\Projects;E:\Reference" -Tunnel cloudflare-worker -PublicBaseUrl https://bridge.example.workers.dev
The controller stores the list in profile schema v2 and forwards it to DevSpace on every On or Restart, so later configuration runs do not collapse access back to one root.
The credential helper reads the saved Worker URL from the controller profile and writes the matching non-credential operational metadata to worker-proxy.json alongside the DPAPI-protected credential. The file still contains your Worker URL and KV namespace ID: keep it local and out of git. You can override the URL explicitly with -WorkerBaseUrl for a standalone setup.
The helper verifies a DPAPI encrypt/decrypt round trip before saving and removes an older plaintext cf-api.json after a successful migration. Controller-driven On / Reboot refuses plaintext legacy credentials. If -InstallCloudflared downloads the tunnel binary, the bridge verifies a valid Windows Authenticode signature from Cloudflare, Inc. before installing or running it.
Stable Worker and external public base URLs must use HTTPS and cannot contain embedded credentials, a query string, or a fragment.
The optional scheduled task is an external, on-demand recovery entrypoint. It has no automatic trigger and always calls the single Reboot transaction:
powershell -ExecutionPolicy Bypass -File "$skill\scripts\restart_task.ps1" -Action Install
powershell -ExecutionPolicy Bypass -File "$skill\scripts\restart_task.ps1" -Action Run
Run only requests the task asynchronously. Confirm the final result in %LOCALAPPDATA%\devspace-bridge\controller-result.json, then run controller Doctor. The default task uses the same interactive Windows user, so that user must be logged on; it improves recovery reliability but is not a security boundary. True isolation needs a separate least-privilege OS account plus ACL-separated scripts, state, logs, and credentials.
Rotate remains the panic button: it stops the bridge, revokes all issued OAuth tokens, and mints a new Owner password. Run it after suspected unauthorized access, then use controller On and re-authorize.
For a stable ChatGPT app URL across restarts, put a stable Worker / custom proxy or external tunnel in front of the changing Quick Tunnel. Full walkthrough for creating the ChatGPT app (developer mode, app URL, OAuth, smoke test) is in README_zh.md.
Be honest about the trust boundary: once you OAuth-authorize the ChatGPT app, the bridge grants file read/write and shell execution on your machine. The L0–L5 levels are policy Codex instructs ChatGPT to follow; they are guidance, and run_shell is not confined to the root, so an authorized app effectively holds local-user code execution. The boundaries actually enforced are OAuth approval (a strong random Owner password), the narrow allowedRoots for file tools, and closing reachability with controller Off.
Practical rules:
Off when the bridge is idle — the always-on public endpoint is the main attack surface.Doctor.securityWarnings; drive roots, the full user profile, and ancestors of the user profile are flagged as overly broad.codex-chatgpt-bridge is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by Zhenyu98. A safe bridge for Codex and ChatGPT to hand off coding work, save tokens, and keep local execution under control. It has 159 GitHub stars.
Yes. codex-chatgpt-bridge passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/Zhenyu98/codex-chatgpt-bridge" and add it to your Claude Code skills directory (see the Installation section above).
codex-chatgpt-bridge is primarily written in PowerShell. It is open-source under Zhenyu98 on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh codex-chatgpt-bridge against similar tools.
No comments yet. Be the first to share your thoughts!