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 skills add zjp1997720/zhijian-skills --skill codex-image-gengit clone --depth 1 https://github.com/zjp1997720/zhijian-skillsWrote 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/zjp1997720/zhijian-skills/codex-image-gen)<a href="https://agentmods.dev/skills/zjp1997720/zhijian-skills/codex-image-gen"><img src="https://agentmods.dev/badge/skills/zjp1997720/zhijian-skills/codex-image-gen/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/zjp1997720/zhijian-skills/codex-image-gen"><img src="https://agentmods.dev/badge/skills/zjp1997720/zhijian-skills/codex-image-gen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Privilege Escalation · line 39 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
- high Privilege Escalation · line 40 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
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.00126 | $0.01375 |
| Opus 5 | $0.00063 | $0.00687 |
| Sonnet 5 | $0.00025 | $0.00275 |
| Haiku 4.5 | $0.00013 | $0.00137 |
Grade A, and why
codex-image-gen scanned grade A with 0 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 12d ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codex Image Gen
目标:把“本机已登录的 Codex OAuth 生图能力”封装成一个零私有依赖的跨 Agent Skill。
它不依赖任何私有模块;任何能执行 python3 的 Agent,只要宿主机已经装好 Codex CLI 并执行过 codex auth login,就能直接调用 scripts/codex_image.py 生图或做图像编辑。
前置条件
必须同时满足:
- 本机已安装 Codex CLI
- 已执行过
codex auth login ~/.codex/auth.json存在且可读- 机器可访问:
https://chatgpt.com/backend-api/codex/responseshttps://auth.openai.com/oauth/token
如果 ~/.codex/auth.json 不存在,不要猜测或绕过。直接提示用户先运行:
codex auth login
这个 skill 能做什么
- 文生图
- 配图 / 插图 / 封面图生成
- image-to-image / 编辑
- 把本地参考图编码成
data:image/...;base64,...后发给 Codex Responses API - 自动检查 access token 是否过期
- access token 过期时自动用 refresh token 刷新,并写回
~/.codex/auth.json - 从 SSE 流里提取图片 base64,保存为本地 PNG
核心脚本
相对路径: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
CLI 参数
必填
二选一:
--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-2
推荐工作方式
1) 最短路径:文生图
python3 scripts/codex_image.py \
--prompt "蓝白配色的 AI 课程封面插图,几何感,极简,无文字" \
--aspect landscape \
--quality high \
--out-dir ./outputs
2) 用 prompt 文件
python3 scripts/codex_image.py \
--prompt-file ./prompt.txt \
--aspect portrait \
--out-dir ./outputs
3) image-to-image / 编辑
python3 scripts/codex_image.py \
--prompt "把这张草图做成干净的白板商业插图风格" \
--image ./draft.png \
--reference-image ./style-ref.png \
--aspect landscape \
--out-dir ./outputs
Agent 执行规则
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 12d ago First seen · 174 lines · 126 tokens per session scan A d686cfd083b6
codex-image-gen is a skill published in the GitHub repository zjp1997720/zhijian-skills (680 stars, last pushed 6d ago), licensed MIT. It adds 126 tokens to every session and 1,375 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
webgl-holographic-foil
A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.
general-video
Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…
html-ppt-hermes-cyber-terminal
OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.
html-ppt-taste-brutalist
16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).
chengfeng-check-updates
An environment manager for a video-editing system. It checks whether its skills and runtime—the software needed to run them—are installed and compatible.
diagnostic-stem-delivery
Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow.