blender-motion-state-inspection
AFaffaan-m/ECC278k4,046 new stars in the last 7 days
给任何已登录 Codex CLI 的 Agent 提供本地生图能力,零私有依赖。只要用户提到生图、画图、生成图片、image generation、文生图、配图、插图、封面、海报、根据 prompt 出图,或要把本机 `~/.codex/auth.json` 里的 Codex OAuth 登录态复用成可执行脚本,都应优先使用本 skill。适用于 Claude Code、Codex、OpenCode 等任何能运行 bash / python3 脚本的 Agent。
目标:把“本机已登录的 Codex OAuth 生图能力”封装成一个零私有依赖的跨 Agent Skill。
它不依赖任何私有模块;任何能执行 python3 的 Agent,只要宿主机已经装好 Codex CLI 并执行过 codex auth login,就能直接调用 scripts/codex_image.py 生图或做图像编辑。
必须同时满足:
codex auth login~/.codex/auth.json 存在且可读https://chatgpt.com/backend-api/codex/responseshttps://auth.openai.com/oauth/token如果 ~/.codex/auth.json 不存在,不要猜测或绕过。直接提示用户先运行:
codex auth login
data:image/...;base64,... 后发给 Codex Responses API~/.codex/auth.json相对路径:scripts/codex_image.py
典型调用方式:
python3 scripts/codex_image.py --prompt "极简科技感课程封面,无文字" --aspect landscape
如果 Agent 不是在 skill 根目录执行,就显式传 skill 相对路径或绝对路径,例如:
python3 .claude/skills/codex-image-gen/scripts/codex_image.py \
--prompt "商业文章封面插图,克制,干净,无文字" \
--aspect landscape \
--quality high \
--out-dir ./outputs
二选一:
--prompt "..."--prompt-file /path/to/prompt.txt--quality low|medium|high:默认 medium--aspect landscape|square|portrait:默认 square--out-dir /path/to/output-dir:默认当前目录--image /path/to/image.png:主编辑图 / 输入图--reference-image /path/to/ref.png:参考图,可重复传入--model gpt-image-2:默认 gpt-image-2python3 scripts/codex_image.py \
--prompt "蓝白配色的 AI 课程封面插图,几何感,极简,无文字" \
--aspect landscape \
--quality high \
--out-dir ./outputs
python3 scripts/codex_image.py \
--prompt-file ./prompt.txt \
--aspect portrait \
--out-dir ./outputs
python3 scripts/codex_image.py \
--prompt "把这张草图做成干净的白板商业插图风格" \
--image ./draft.png \
--reference-image ./style-ref.png \
--aspect landscape \
--out-dir ./outputs
~/.codex/auth.json 存在;不存在就停止并提示 codex auth loginpython3 scripts/codex_image.py --help 自检 CLI--aspect landscape--quality high--aspect square脚本成功时会输出 JSON:
{"success": true, "image": "/absolute/path/to/file.png"}
Agent 应返回:
明确提示:
codex auth login
说明本地登录态失效,建议重新登录:
codex auth login
说明大概率是 Cloudflare / 关键请求头 / 账号态问题。先检查:
User-Agent: codex_cli_rs/0.0.0originator: codex_cli_rsChatGPT-Account-ID说明上游 SSE 响应格式变了,或只返回了中间事件但没有可用图片字段。此时应检查 references/api-notes.md 并根据新响应结构更新脚本。
references/api-notes.mdscripts/codex_image.pyAFaffaan-m/ECC278k4,046 new stars in the last 7 days
ANanthropics/skills181k1,119 new stars in the last 7 days
Generate flow fields and particle systems with p5.js, using seeded randomness for original algorithmic art.
ANanthropics/skills181k1,119 new stars in the last 7 days
SHShubhamsaboo/awesome-llm-apps141k808 new stars in the last 7 days
HAharry0703/MoneyPrinterTurbo130k1,722 new stars in the last 7 days
PApaperclipai/paperclip101k2,948 new stars in the last 7 days