Home / All Skills / Design & Motion / qiaomu-codex-imagegen
Design & Motion · joeseesun/qiaomu-codex-imagegen

qiaomu-codex-imagegen

Generate or edit images with Codex's built-in image generation from any agent, through an MCP tool or a plain CLI. For every image request it first proposes at least four divergent style directions (24 distilled templates, 48 presets, 20 Mondo poster artists), lets the user pick, expands the prompt, generates, and checks the result. Scenario craft for 视频封面, 视频海报, 小红书配图, 公众号封面, X 封面, 朋友圈海报, 书籍封面, 专辑封面, 产品海报, 人物写真, 节气海报, 展览海报, PPT 页面, 图生图. Use for 生图, 配图, 海报, 封面, "给我几个风格", "用 Codex 画一张". Excludes: editing photos with local tools, charts or diagrams from data, UI mockups, video generation, or anything that needs an API key-based image service.

L4 High-Privilege · Graded auth & full auditV1 Commit-PinnedExecute CommandNetwork AccessWrite FileDual-pass Audit
Author joeseesunGitHub joeseesun/qiaomu-codex-imagegen ↗License MIT(仓库根 LICENSE)Commit c03a1ccaf7
Control levels describe skill capabilities and suggested control measures; they do not represent quality or safety certifications, nor do they dictate usability. Usage decisions rest entirely with users and administrators. Different agent hosts apply varying constraints; do not assume hosts provide automatic protection. Third-party skill copyrights belong to their original authors. Use at your own risk.

1How It Works & Mechanism

Relay Codex's exclusive internal image generation capability via `codex app-server` (stdio JSON-RPC), adding a production-grade craftsmanship layer to ensure practical utility: 24 templates, 48 presets, 20 Mondo artists, and an anti-hallucination rule set.

SKILL.md
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.
What this does: Establishes the architecture—instead of building a separate image generation backend, it relays Codex and augments it with rules and craftsmanship to make the outputs production-ready.

Invocation entry points follow a strict priority: MCP tools first, followed by the local CLI in this directory; if neither is available, guide the user through installation while strictly prohibiting the use of code to fabricate images.

SKILL.md
**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.
What this does: Defines fallback paths and anti-cheat guardrails, preventing the agent from returning fake drawings generated via local plotting libraries.

The initial request must provide at least four mechanically divergent directions (typography-driven, graphic structure, photography, product close-up, material space, plus a Mondo artist direction), strictly prohibiting the mixing of two mechanisms in a single image.

SKILL.md
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.
What this does: Enforces a strict "propose options before generating" workflow; mechanism diversity prevents the trap of simply "applying different filters to the same image."

Posters, covers, cards, and slides must include a typography layer: provide headline and matched short copy separated by `|` via exact_short; a title-only or textless output is classified as a concept art piece rather than a poster.

SKILL.md
**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.
What this does: Sets the typography layer as a delivery threshold; copy must originate strictly from user-provided facts, requiring follow-up questions or explicit mock disclaimers if missing.

Semantic constraints on prompt variables: colors are assigned by role (background, primary, accent, ink) rather than fixed hex codes; facts and numbers must come exclusively from the user, strictly forbidding fabricated prices, statistics, names, dates, QR codes, or logos.

SKILL.md
Colours are **roles** (background, primary, accent, ink), not fixed hex values.…No invented facts: prices, statistics, titles, names, dates, weather, quotes, QR codes, logos.
What this does: Encodes hallucination prevention into the pre-generation variable layer rather than relying on post-generation remedies.

By default, execute parallel calls generating one image per selected direction (up to four); `count` is reserved solely for variations within the same direction; each generation consumes Codex user quota, strictly prohibiting test runs.

SKILL.md
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.
What this does: Controls concurrency and quota consumption, preventing continuous single-shot retries.

Post-generation review must rigorously inspect each image against the acceptance_checks printed by the tool (first-glance focal point, essential compositional relationships, material placement, text & identity, no hallucinations); on failure, modify only the single sentence carrying that relationship and regenerate once.

SKILL.md
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.
What this does: Transforms acceptance from a mere "generated" state into an active "inspected and verified item-by-item" process.

The 689 local reference prompt corpora are strictly used to learn "how a mechanism is described"; forwarding raw corpus prompts as user prompts is strictly prohibited.

SKILL.md
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.
What this does: Clearly delineates boundaries for third-party corpus usage (searchable, learnable, but never forwarded verbatim).

The delivery contract mandates reporting the absolute path, pixel dimensions, direction used (template/preset or Mondo designer), assumptions, acceptance results, and the prompt sidecar location.

SKILL.md
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.
What this does: Standardizes deliverables into a verifiable checklist and requires a sidecar file recording the actual prompt for reproducibility.

2Core Capabilities

01Dual entry points via 7 MCP tools and the local directory CLI (suggest_directions / compose_prompt / generate_image / search_prompts / get_prompt / build_prompt / list_catalog)
02Design system featuring 24 scenario templates × 48 presets (each equipped with style locks, replaceable variables, failure conditions, and acceptance criteria)
0313 platform scenario presets providing aspect ratios, pixel dimensions, default styles, and safe zones (including thumbnail logic and title negative space)
0466 general styles + 20 Mondo poster artist styles (including screen printing, negative space, and specialized book/album cover styles)
05Image-to-image / image editing: reference_images accepts absolute file paths for identity photos, product shots, style references, or images to edit
06Triple rule set for facts, text, and identity: default characters to silhouettes, back views, gestures, or symbols; reference photos are mandatory for consistent identity; complex charts and long copy must be typeset in post-processing
07Search and retrieval for 689 local reference prompt corpora (requires a self-built local dataset, not distributed with the repository; functions normally if absent)
08Automatic flattening of transparent areas to a white background post-generation (retainable with `transparent_background: true`), with prompt-level enforcement of opaque backgrounds

3External Dependencies

KindDependency / Endpoint
cliCodex CLI(`codex app-server --listen stdio://`;需已安装并登录、账号具备图片生成权限)
mcpMCP 客户端(Claude Code / Cursor / Codex 等注册 `scripts/mcp-server.mjs`)
env环境变量 `QIAOMU_CODEX_BIN` / `QIAOMU_CORPUS_DIR`(Codex 可执行路径与本地语料目录)

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Graded/per-use authorization, sandbox recommended
For Administrators
Approval workflow, rollback support, full audit
Evidence & Triggers (File Paths & Excerpts)
  • scripts/: Executes local scripts or commands: node scripts/cli.mjs … (suggest|compose|generate|search|prompt|list, primary entry points)
  • 网络端点: Declares external network access: Zero HTTP request code within the skill directory (zero hits in network risk scanning)
  • 本地工作目录: File I/O and artifact output: Image output directory (defaults to ~/Pictures/qiaomu-codex-imagegen/<date>, or user-specified out_dir)
Audit Notes: The audit targets the skill directory (SKILL.md + scripts/*.mjs + references/* + docs/samples + agents + evals + reports, ~88 files total). The orange rating is assigned due to "user asset egress" inherent to its declared purpose: scripts/lib/codex.mjs launches a codex app-server child process, sending user-provided topics, copy, and reference_images (identity photos, product shots, source images) to Codex's built-in image generator (backed by OpenAI accounts and quotas), falling under the same generation backend class as codex-image-to-eagle and baoyu-article-illustrator. It is not red: no reverse engineering, spoofing, guardrail bypassing, or arbitrary code execution; the skill reads no API keys directly (relies on logged-in Codex CLI credentials), scrapes no external content, and never evaluates user input via eval. Mitigating factors: the codex child process sandbox restricts writes exclusively to the output directory, approvalPolicy is never, networkAccess is false, all interactive prompts are rejected; no test generations are performed; third-party corpora remain strictly local and cannot be forwarded verbatim. Note: generation consumes user Codex quota, and prompts/reference images leave the local machine to upstream model services.

5Second-Pass Verification

  • [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 可定位值)。

6Verdict & Scenarios

  • Truly decouples Codex's proprietary image generation capability: the same core simultaneously provides MCP, CLI, and Agent Skill interfaces, accessible to any command-executing agent with clear priorities and fallback paths.
  • The "propose at least four divergent directions for user selection before generating" approach mirrors a design studio workflow, shifting image generation from "lottery prompt gambling" to structured proposal reviews.
  • Anti-hallucination and typography layers are built as hard constraints (text mode, exact_short structured copy, role-based colors, user-only facts, prohibition of fake image generation), delivering higher production readiness than comparable skills.
  • Strict quota and operational discipline: test generations are prohibited; each invocation runs in an isolated temporary session with a sandbox restricted to the output directory, approvalPolicy set to never, interactive requests rejected, and zero external dependencies (Node 18+).
  • Third-party legal compliance: due to ambiguous licensing, the 689 Xiaoxiaodong corpus items are maintained strictly as local packages and barred from raw redistribution, explicitly extracting mechanisms rather than replicating original images.
  • Best for: Users looking to batch-produce video covers, Xiaohongshu illustrations, WeChat Official Account headers, posters, book covers, PPT slides, or perform image-to-image editing within any agent (Claude Code / Codex / Cursor, etc.); especially suited for brand and content teams that value reviewing design proposals first and demand factual and typographic accuracy. Best suited for environments with an existing Codex CLI login and available quota.
    Not for: Not suitable for: editing photos with local tools, generating data-driven charts or flowcharts, UI mockups, video generation, or scenarios requiring API key-based image services (non-Codex). Avoid using in environments lacking the Codex CLI or unwilling to consume account quota.
    Install Agent-Ready
    ① Verified Mirror 2026-10-10
    Option A · Direct DownloadDownload qiaomu-codex-imagegen.tar.gz
    sha256: 30d89f420fcbc925…
    Option B · Copy Guide for Agent
    install.json
    Agents automatically download and verify mirrors from this JSON guide.
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit c03a1ccaf7.