1实现原理 · 为什么它能做到
把只有 Codex 内部可调用的生图能力经 `codex app-server`(stdio JSON-RPC)中继出来,再补上让图「能用」的工艺层:24 模板/48 预设/20 Mondo 设计师与一套防编造规则
Codex ships an image generator that other agents cannot call. This package relays to it (`codex app-server`) and adds the craft that makes the pictures usable: a library of 24 templates (48 presets) distilled from 689 reference prompts, Mondo poster techniques, scenario presets, and a rule set for facts, text and identity.
调用入口有确定优先级:MCP 工具优先,其次本目录 CLI,两者都不可用则引导安装,并明令不得用代码伪造图片
**No MCP**: run the CLI from this skill's folder: `node scripts/cli.mjs suggest|compose|generate|search|prompt|list` (see `--help`).…Neither available: tell the user to install (README). Requires the Codex CLI, logged in. Never fake an image with code.
首次请求必须先给至少四个机制不同的方向(文字主导/平面结构/摄影/产品近摄/材料空间,外加一个 Mondo 设计师方向),且不得把两种机制混进同一张图
Call `suggest_directions` with the topic, deliverable and any headline/text mode. It returns **four or more directions with different visual mechanisms** (typography-led, graphic structure, photographic, product macro, material/space, plus a Mondo artist option for poster-like work). Never mix two mechanisms into one image.
海报/封面/卡片/幻灯片必须有排版层:用 exact_short 给出 headline 加 `|` 分隔的成套短文案;只有标题或没有字,得到的是概念图而不是海报
**Posters, covers, cards and slides need a typographic layer.** A finished poster has a hierarchy: headline, subtitle, one or two info lines, a small tag. With only a headline, or none, the result is concept art, not a poster.
提示词变量语义被约束:颜色按角色(背景/主色/强调/墨)而非固定 hex;事实与数字只能来自用户,禁止编造价格、统计、人名、日期、二维码、logo
Colours are **roles** (background, primary, accent, ink), not fixed hex values.…No invented facts: prices, statistics, titles, names, dates, weather, quotes, QR codes, logos.
默认每个选定方向各生成一张(最多四张)并行调用,`count` 只用于同方向变体;每次生成消耗用户 Codex 额度,禁止测试性生成
Default **one image per chosen direction**, up to four, each its own `generate_image` call (they can run in parallel). Use `count` only for variants of the same direction.…Each generation spends the user's quota: no test generations, `count` above 3 only if asked.
生成后必须逐图对照工具打印的 acceptance_checks 复核(首眼焦点、必须成立的关系、材料位置、文字与身份、无编造),失败只改承载该关系的一句并重生成一次
Read each saved image and test it against `acceptance_checks` (the tool prints them): first-glance focus, relations that must hold, materials only where intended, exact text and identity, nothing invented.
本地 689 条参考提示词语料只用于学习「一种机制怎么被描述」,禁止把语料提示词原样当用户提示词发送
Reference corpus: `search_prompts` / `get_prompt` read the local pack of 689 reference prompts (installed on the user's machine only). Use them to study how a mechanism is described; never send a corpus prompt unchanged as the user's prompt.
交付契约要求回报绝对路径、像素尺寸、所用方向(模板/预设或 Mondo 设计师)、假设、验收结果与 prompt sidecar 位置
Reply with: absolute path(s), pixel size, direction (template/preset or Mondo artist) per image, assumptions made, acceptance result, and where the prompt sidecar is.
2核心能力
3外部依赖
| 类型 | 依赖 |
|---|---|
| cli | Codex CLI(`codex app-server --listen stdio://`;需已安装并登录、账号具备图片生成权限) |
| mcp | MCP 客户端(Claude Code / Cursor / Codex 等注册 `scripts/mcp-server.mjs`) |
| env | 环境变量 `QIAOMU_CODEX_BIN` / `QIAOMU_CORPUS_DIR`(Codex 可执行路径与本地语料目录) |
4风险提醒 风险提醒:橙色 · 评估后使用
- 强依赖 Codex CLI 与账号:未安装、未登录或账号无图片生成权限时直接不可用;出网与额度消耗发生在 Codex 侧,需用户自行确认额度与内容合规
- 提示词与参考图(可能含真实人物身份照、产品包装)会离开本机进入模型服务,涉密或未授权素材不宜使用
- 本地语料包把第三方提示词原样返回给 agent,虽已明令不得原样转手,仍是可被误用的注入/合规面
- 模型对中文与长句仍会出错,README 自承小字号信息行可能有细微瑕疵,需人工放大逐字检查
- 24 模板/48 预设/66 风格/20 设计师的规模会推高上下文占用与「选项过载」,且模板由公开样本提炼、无法保证复现原图
5第二遍独立确认
- [ok] 架构陈述与文件清单一致:SKILL.md 说 relay 到 `codex app-server`,§1 有 scripts/lib/codex.mjs(11655B) 与 scripts/mcp-server.mjs(1550B) 支撑 — §3 沙箱条目给出 scripts/lib/codex.mjs:81/87 的 approvalPolicy/ sandboxPolicy 原文,与 agents/interface.yaml:29 的 subprocess 声明互证,relay 说法成立。
- [ok] 「无网络请求」结论:风险扫描「網路請求」标注「無命中」,与 README 大量 https:// 文档链接不矛盾 — URL 命中 26 条全部为文档/作者/上游链接(README、SKILL.md 版权行、manifest/package 的 homepage/repository),无执行期端点;出网只可能发生在 spawn 出的 codex 子进程。
- [ok] 凭证面:只读两个路径类环境变量,不接触任何 key — §3 凭证命中 23 条中与本 skill 相关的是 QIAOMU_CORPUS_DIR / QIAOMU_CODEX_BIN,其余为 mondo 文案里的 credentials 一词与测试用 FAKE_CODEX_MODE / QIAOMU_CORPUS_DIR;无 API_KEY/TOKEN/SECRET 类读取。
- [ok] 写盘面:29 条写盘命中集中在输出目录、sidecar、语言包与测试假图,未触及源文件 — scripts/lib/tools.mjs:144 写 sidecar;scripts/lib/png.mjs:64 写压平 PNG;scripts/build-corpus.mjs 写 ~/.local/share/.../corpus;tests/fake-codex.mjs 写 tmpdir;符合「只写输出目录」的沙箱声明。
- [ok] 判级取样:与站内同类的 codex-image-to-eagle(orange)、ian-xiaohei-illustrations(orange)、baoyu-article-illustrator(orange)口径一致 — 同类「调用外部生图后端并消耗账号额度」均落橙;本 skill 无 red 特征(无逆向/冒充/绕过/任意执行),也无 blue 的可能(自身脚本会触发外部生成)。
- [ok] 第三方语料授权风险已被作者显式隔离,不构成 red — README 明写 689 条语料「没有看到开放授权,所以只做成你本机的数据包,不随仓库分发」,SKILL.md 亦禁止原样转手;仅记为 verdict.risks。
- [ok] meta 核定值核对:license MIT、official_desc 逐字取自 SKILL.md frontmatter、commit 与 audit 一致 — commit=c03a1ccaf77938257bb93f64e09afa9cd08efe29,与骨架 audit.skill_commit 相同;stars/last_push/installs 维持 null(无 per-skill 可定位值)。
6结论
30d89f420fcbc925…c03a1ccaf7