codex-bridge

作者 Sateezg已验证

Image generation (gpt-image-2) and GPT-5 subagents for Claude Code — through the Codex CLI login you already have. No OpenAI API key.

251
Stars
2
Forks
Shell
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/Sateezg/codex-bridge

快速入门

使用 codex-bridge 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

codex-bridge

Give Claude Code image generation and a team of GPT-5 subagents — using the Codex CLI login you already have.

Claude Code plugin License: MIT No API key required

Claude Code can't generate images, and everything it does runs on your Claude quota. The Codex CLI can generate images with gpt-image-2, and runs on your ChatGPT plan — a completely separate budget. This plugin bridges the two.

Two things you get:

1. Claude can produce images. Ask for an icon, a mockup, a hero image, a full favicon set — Claude writes the prompt, drives gpt-image-2 through Codex, then looks at the result and regenerates if it missed.

2. Claude can delegate to GPT-5. Four Codex-powered subagents handle review, debugging, bulk implementation, and image work. Claude stays the orchestrator: it scopes the task, Codex does the volume, Claude verifies the result. Heavy work runs on your ChatGPT quota and its intermediate output never enters your Claude context.

No OpenAI API key. Everything routes through codex login, so it bills against your ChatGPT plan rather than API credits.

Demo

Claude generating an icon through Codex, in a real terminal

One style contract across a set. Each sibling was generated with an earlier icon passed as --ref, so the palette, stroke weight, glyph scale and margins carry over instead of being re-described and re-interpreted every time:

Paper rocket icon Settings gear icon Shield with checkmark icon

Every image in this repository was generated by this plugin — the GIF above, these icons, and the social preview card. The exact commands and the VHS recording script are in assets/README.md, so you can reproduce all of it.

Contents

Install

Prerequisites

Codex CLInpm i -g @openai/codex or brew install codex
Logged incodex login → verify with codex login status (should say Logged in using ChatGPT)
ChatGPT planPlus, Pro, or Team
Claude Codeany current version

Then:

/plugin marketplace add Sateezg/codex-bridge
/plugin install codex-bridge@codex-bridge

Run /reload-plugins if Claude Code asks you to.

Other install methods

Try it for one session, no install:

git clone https://github.com/Sateezg/codex-bridge.git
claude --plugin-dir ./codex-bridge

Auto-load from your skills directory:

git clone https://github.com/Sateezg/codex-bridge.git ~/.claude/skills/codex-bridge
chmod +x ~/.claude/skills/codex-bridge/bin/*

Loads as codex-bridge@skills-dir on your next session.

Quickstart

Nothing to configure. Just ask in plain language:

generate a hero image for the landing page, save it in assets/
make the sky in assets/hero.png sunset orange, keep everything else
set up favicons and an OG card for this project
review my changes before I commit
ask codex why this test only fails under --parallel
rename useSession to useAuthSession across the whole repo

The last one is the interesting case. Claude notices it's mechanical work across many files and offers the split before starting:

This touches 34 files with the same change. I can hand the edits to Codex — runs on your ChatGPT quota and keeps 34 file dumps out of this context — then review its diff here. Want me to?

What's inside

Skills — Claude picks these up automatically; you can also call them as /codex-bridge:<name>.

SkillFires when
generate-imagea task needs a new image that doesn't exist yet
edit-imageyou point at an image file and ask to change or restyle it
asset-setfavicons, app icons, OG cards, or a matching icon family
ask-codexyou want GPT-5's take on one question about this repo
codex-review"review my changes" — diff, branch, or module
codex-delegatea task is big or repetitive enough that delegating saves you tokens

Subagents — Claude launches these itself, or you can name them.

SubagentDoesCan write files?
codex-artistimages, icon sets, style-matched asset familiesimages only
codex-reviewerreview a diff, then verifies every finding against the codeno
codex-debuggerroot-cause a failure, proposes a patchno
codex-implementerbulk mechanical edits and scaffoldingyes — after you agree
codex-second-opiniongeneral independent opinion on an approachno

Executables — on your PATH while the plugin is enabled, and usable straight from a shell.

codex-imagegengenerate or edit an image; prints the output path
codex-runrun any task on Codex; prints only its final answer

Feature 1 — images

codex-imagegen "flat vector rocket icon, #2563EB on white, 2px stroke, minimal" ./rocket.png
codex-imagegen "change the sky to sunset orange, keep everything else identical" ./out.png --ref ./hero.png
codex-imagegen "settings gear, same style as the reference" ./settings.png --ref ./home.png
Option
--size WxH1024x1024, 1536x1024, 1024x1536, 2048x2048, 3840x2160, … — see note below
--ref <file>source or style reference, repeatable up to 4 — turns the call into an edit
--model <name>model override
--timeout <sec>default 600

A custom size is only accepted if all of these hold: longest edge ≤ 3840px, both edges multiples of 16, long-to-short ratio ≤ 3:1, total pixels between 655,360 and 8,294,400. Square is fastest. For anything outside that — favicons, a 1200×630 OG card — generate a large master and resample locally.

The wrapper prints the path it actually wrote. Codex is instructed not to overwrite existing assets, so it occasionally saves out-v2.png; the wrapper detects that (and the ~/.codex/generated_images/<session>/ default location) and reports the real path.

What makes this better than pasting prompts into a chat window: the skills teach Claude to pull your actual palette out of tailwind.config.* or your design tokens, to reuse one style contract across a whole set so the assets match, to derive size variants with ImageMagick instead of regenerating, and to open the PNG and check it before telling you it's done.

Feature 2 — GPT-5 subagents

The point isn't "Claude can also call GPT-5". It's the division of labour: Claude scopes and verifies, Codex does the volume.

you ──▶ Claude          scopes the work, writes the brief, reviews the result
             │
             ▼
        codex-run ──▶ Codex CLI ──▶ GPT-5 / gpt-image-2
                                     (your ChatGPT quota)

Because Codex runs as a separate process, its intermediate output — the 40 files it read, the search results, the generated boilerplate — never enters your Claude context. You pay Claude tokens only for the brief and the review.

What gets delegated, per the codex-delegate rubric: mechanical edits across many files, bulk generation, exhaustive repo sweeps, all image work, and self-contained subtasks. What doesn't: architecture calls, ambiguous requirements, anything needing the conversation history, and small edits — round-tripping a two-line fix costs more, not less.

Every subagent follows the same contract: read-only by default, verify before reporting, and never claim success on unverified work. Only codex-implementer writes to your files, only after you've agreed, and only with a clean working tree so its changes land as a reviewable diff.

Straight from a shell:

codex-run -C . "which module owns rate limiting? name the file"
codex-run -C . -r "now show me the minimal patch"          # -r continues the session
git diff main...HEAD | codex-run -C . --timeout 1200 -      # pipe a diff in
Option
-C, --cd <dir>working directory (default: cwd)
-s, --sandbox <mode>read-only (default), workspace-write, danger-full-access
-m, --model <name>e.g. gpt-5-codex
-r, --resumecontinue the previous session instead of starting fresh
--schema <file>constrain the answer to a JSON Schema
--rawalso dump Codex's event log to stderr
--timeout <sec>default 900

How it works

Both wrappers shell out to codex exec, Codex's non-interactive mode.

Images run in a workspace-write sandbox scoped to the output directory:

codex exec -C <outdir> -s workspace-write --skip-git-repo-check [-i <ref>...] \
  "Use the \$imagegen image generation tool to ... save to ./<file>.png ..."

$imagegen is Codex's built-in image skill; it calls gpt-image-2 with your ChatGPT credentials and writes the PNG into the working directory. The wrapper verifies the file landed — falling back to $CODEX_HOME/generated_images/ if Codex saved it there instead — and prints the absolute path so Claude can read the image back.

Text tasks capture the final message with -o instead of scraping the event log, so subagents get a clean answer rather than a transcript:

codex exec -C <dir> -s read-only --skip-git-repo-check -o <tmpfile> "<task>"

Both fail fast and loudly: a missing codex binary or a logged-out session exits 1 with an actionable message rather than hanging. Timeouts exit 124. Both handle BSD and GNU stat, and degrade gracefully when timeout/gtimeout isn't installed.

Limitations

  • Quota, not free. Image turns burn ChatGPT plan quota roughly 3–5× faster than text turns. Set OPENAI_API_KEY and Codex switches to API billing instead.
  • Transparency takes two steps. The default path can't emit alpha, so the skills generate on a flat #00FF00 key and strip it with the remove_chroma_key.py helper Codex already ships. True native transparency needs Codex's CLI fallback plus an OPENAI_API_KEY; the skills surface that as a choice rather than switching silently.
  • Slow. 1–4 minutes per image; a repo-wide Codex task can take 10+ minutes. Skills set long Bash timeouts accordingly.
  • Codex is blind to your conversation. Every brief has to stand alone. This is exactly why the subagents verify before reporting.
  • macOS and Linux. Not tested on Windows.

Troubleshooting

SymptomFix
codex CLI not found on PATHinstall Codex CLI, then reopen your shell
codex is not logged inrun codex login; confirm with codex login status
Operation not permitted from codexownership on ~/.codexsudo chown -R $(whoami) ~/.codex
Got out-v2.png instead of out.pngexpected — Codex won't overwrite; use the path the wrapper printed
Image lands somewhere unexpectedthe wrapper also checks $CODEX_HOME/generated_images/<session>/; pass an absolute output path
failed to load models cache: missing field base_instructionsharmless Codex cache warning; clear it with rm -rf ~/.codex/cache if it persists
Codex output full of MCP/hook errorsyour Codex config, not this plugin — the wrapper ignores them. Prune unused MCP servers in ~/.codex/config.toml to speed runs up
Skills don't show up/reload-plugins, then /help → Custom commands
Wrapper "permission denied"chmod +x ~/.claude/skills/codex-bridge/bin/*
Everything times outraise --timeout; check codex exec -C . -s read-only "say hi" works standalone

Contributing

Issues and PRs welcome.

claude plugin validate .
bash -n bin/codex-imagegen && bash -n bin/codex-run

Credits

License

MIT — see LICENSE.

常见问题

What is codex-bridge?

codex-bridge is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by Sateezg. Image generation (gpt-image-2) and GPT-5 subagents for Claude Code — through the Codex CLI login you already have. No OpenAI API key. It has 251 GitHub stars.

Is codex-bridge safe to use?

Yes. codex-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.

How do I install codex-bridge?

Clone the repository with "git clone https://github.com/Sateezg/codex-bridge" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is codex-bridge written in?

codex-bridge is primarily written in Shell. It is open-source under Sateezg on GitHub, so you can review or fork the full source.

Are there alternatives to codex-bridge?

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-bridge against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情