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.
初回の要求では、メカニズムの異なる少なくとも 4 つの方向性(タイポグラフィ主導/平面構成/写真/製品クローズアップ/マテリアル空間、および Mondo デザイナーの方向性を 1 つ)を提示しなければならず、単一の画像に複数のメカニズムを混在させてはならない。
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 を用いて見出しと `|` 区切りのセット短文を提供。タイトルのみや文字なしの場合はポスターではなくコンセプトアートとみなされる。
**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 ではなく役割(背景/メイン/アクセント/インク)で指定。事実や数値はユーザー提供のものに限定し、価格、統計、人名、日付、QR コード、ロゴの捏造を禁止する。
Colours are **roles** (background, primary, accent, ink), not fixed hex values.…No invented facts: prices, statistics, titles, names, dates, weather, quotes, QR codes, logos.
デフォルトでは選択された方向性ごとに各 1 枚(最大 4 枚)を並列生成し、`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(第一視覚焦点、必須の構成関係、マテリアルの位置、文字とアイデンティティ、捏造の有無)と各画像を照合してレビューを必須とし、不合格の場合は該当関係を担う 1 文のみを修正して 1 回だけ再生成する。
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外部依存関係
| Kind | Dependency / Endpoint |
|---|---|
| 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推奨統制措置と判定根拠
- scripts/: ローカルスクリプトまたはコマンドの実行: node scripts/cli.mjs …(suggest|compose|generate|search|prompt|list、メインエントリ)
- 网络端点: 外部ネットワークアクセスの宣言: 本 skill ディレクトリ内に HTTP リクエストを行うコードは一切存在しない(リスクスキャンの「ネットワークリクエスト」検出ゼロ)
- 本地工作目录: ファイルの読み書きと成果物の出力: 画像出力ディレクトリ(デフォルトは ~/Pictures/qiaomu-codex-imagegen/<日付>、またはユーザー指定の out_dir)
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…