⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v0.3.0

qiaomu-codex-imagegen

joeseesun@joeseesun⭐ 136 stars· last commit 1mo ago· 0 open issues

|

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐ 136 on GitHubGitHub ↗

Popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

乔木 Codex 生图 · qiaomu-codex-imagegen

让任何 Agent 都能调用 Codex 内置的生图能力:每次生图先给出至少四种机制不同的风格方向,你选定后再出图。 内置 24 类场景模板(48 个预设)、20 位 Mondo 海报设计师风格,以及一套防止编造事实、乱写文字的规则。

Codex 的生图工具只在 Codex 里能用。这个项目把它接出来:一个 MCP 服务、一个命令行、一个 Agent Skill,共用同一套核心。Claude Code、Codex、Cursor,或者任何能执行命令的 Agent,都能说一句"做一张小红书配图"就拿到图片文件。

Use Codex's built-in image generation from any agent through MCP, a CLI or a skill. Every request first gets at least four divergent style directions (24 templates, 48 presets, 20 Mondo artists); you pick, it composes the prompt, generates, and checks the result.

先给方案,再出图

对 Agent 说「给这期视频做一张封面」,它不会直接画,而是按下面的顺序走:

  1. 推荐方向:suggest_directions 给出 至少四个机制各异的方向,来自不同家族(文字主导、平面结构、摄影人物、产品近摄、材料空间,再加一个 Mondo 设计师方向),每个方向带风格锁、需要你补的信息和参考案例缩略图。
  2. 你来选:选一个、几个,或者说「你定」。想要更多就排除这几个再推荐。
  3. 展开提示词:compose_prompt 把变量填成完整提示词,同时给出避免项、验收条件、假设和缺失信息。带「结构替换」的预设会提示 Agent 改写,不会把冲突的句子硬拼在一起。
  4. 生成:每个选中的方向出一张,图旁边留一份 JSON,记录实际提示词,方便复现和做系列。
  5. 验收:Agent 看图,对着验收条件逐条检查;不合格就只改对应那一句再生成一次。

你已经指定了风格(「用 Mondo 风格」「T03」)或说「直接出」时,会跳过选择这一步。

能做什么

你说它做
给这期视频做一张 16:9 视频封面选 video-cover:缩略图逻辑、标题留白,用你指定的风格生成,返回文件路径和像素尺寸
做一张小红书配图,主题清晨读书选 xiaohongshu:3:4 竖版,视觉重心偏上,顶部留标题位
用 Mondo 风格做《沙丘》海报,三个设计师各来一张三个设计师风格并行生成,各自保存
把这张图的背景换成米色纸,主体不变参考图改图(图生图)
公众号头图、X 封面、朋友圈海报、书籍封面、专辑封面各有预设比例和安全区
给我几个风格 / 帮我选个风格四个以上机制不同的方向,附参考缩略图,选定后出图
找一下以前类似的案例在本地 689 条参考提示词里检索,给出缩略图与原文

样例

下面所有图片都是用这个工具调用 Codex 生成的,没有后期修图;活动、品牌、人物和文案全部是虚构的示例。每张图的提示词和参数在 docs/samples/prompts.json。

同一个主题,五个方向

主题都是「咖啡店阅读月」。suggest_directions 给出的方向机制完全不同,所以出来的不是同一张图换个滤镜:

方向机制
1 · T01 巨字与微小叙事大字是场景的墙,水边的小读者提供尺度
2 · T02 物象破框一枝咖啡树穿出细框,越界只发生一次
3 · T05 纸雕与织物地貌书页的层叠被读成山河,微小读者坐在边缘
4 · T16 巨物微缩剧场一杯拿铁放大成可进入的阅读小镇
5 · Mondo · Olly Moss两色丝网印,杯子的负空间里藏着一本书

24 个类别各一张

类别与预设样例机制与文字
T01 巨字与微小叙事预设 T01-1 旧刊慢场大字是场景的墙,微小行动提供尺度;静止水平面被一条斜线打破。文字:exact_short:标题 + 副标题 + 信息行
T02 物象破框预设 T02-1 清透巨叶框线建立秩序,实体穿过框线制造一次明确的越界。文字:exact_short
T03 中央光隙预设 T03-1 清润春生两侧巨大色域夹出中央通道,通道尽头的微小焦点表现希望。文字:exact_short
T04 东方水墨编辑预设 T04-1 清透墨枝水墨是空间与版式的一部分,宋体大字、透明色域和留白互相穿插。文字:exact_short
T05 纸雕与织物地貌预设 T05-1 纸雕田垄主题被转译成有材料厚度的地貌,微小物象为抽象层叠提供故事。文字:exact_short
T06 民艺撞色招贴预设 T06-1 粗印民艺两枚朴拙图符以冷暖强色对话,手写线把图像区和跳跃资讯区缝合。文字:exact_short:标题 + 活动名 + 时间地点 + 亮点
T07 童画与硬排版预设 T07-1 蜡笔展览粗重现代字与松软儿童笔触互相挤压,细框提供第三种秩序。文字:exact_short
T08 摄影与花境拼贴预设 T08-1 柔彩花境刊头、摄影焦点、手绘前景、底栏构成连续层次,照片与插画必须相互遮挡。文字:exact_short
T09 克制棚拍肖像预设 T09-1 柔灰专注一主一辅的柔光塑造骨相,动作支撑与皮肤细节决定可信度。文字:none:纯肖像无字
T10 环境自然肖像预设 T10-1 暮阳天台人物真实地处在环境中,动作先成立,光与景深再分离主体。文字:none:纯肖像无字
T11 婚礼与仪式肖像预设 T11-1 晴天珍珠身份稳定是底座;薄纱、妆发和单一光线建立仪式感。文字:none:纯肖像无字
T12 食品触感近摄预设 T12-2 暖纸酥香放大可食用的断面与真实触感,信息退到留白而不覆盖食物。文字:exact_short
T13 饮品微距风味预设 T13-2 气泡切面液体或果肉切面变成放大景观,气泡与水光体现风味而非替代产品事实。文字:exact_short
T14 植物手绘产品广告预设 T14-1 清透水彩真实产品与平面手绘并置,水彩路径环抱并贴附载体而非均匀铺花。文字:exact_short
T15 科技轨道产品主视觉预设 T15-1 清透未来产品是稳定中心,环形波纹和局部光线共同指向它。文字:exact_short
T16 巨物微缩剧场预设 T16-1 食品小镇巨物真正承担可进入的空间功能,微型人物的动作必须回应它。文字:exact_short
T17 建筑制图编辑预设 T17-1 圆规素纸真实结构件与有依据的几何线共享轴线,文字保持疏远而精密。文字:exact_short:竖排标题
T18 旅行与酒店框景预设 T18-1 温润拱窗框景把观看者带入第二空间,说明围绕入口组织。文字:exact_short
T19 文博材质巨像预设 T19-1 粗陶暗腔材料孔隙与巨大的暗腔制造尺度,洁净空场和疏远文字维持静穆。文字:exact_short
T20 会议与人物信息系统预设 T20-1 清爽斜带重复单元共享节奏,一组定向斜切将照片与信息连接。文字:exact_short:四位虚构嘉宾的姓名与头衔
T21 九宫格日常手账预设 T21-1 绒线注释统一矩阵中保留不同镜头密度,手绘标记必须回应格内内容。文字:exact_short
T22 模块化演示视觉预设 T22-1 淡块作品集标题与数据先建立信息层级,图形按页的叙事功能进入共同网格。文字:exact_short:标题 + 四项目录
T23 科普与商品信息卡预设 T23-1 友好研究卡每组图形只解释一个命题,图与文的换位节拍代替装饰密度。文字:exact_short:标题 + 三条步骤
T24 日签与编辑纪念预设 T24-1 城市晨光日期是锚点,实体照片是核心,一道问候跨过照片和纸面。文字:exact_short:标题 + 一句寄语

场景样例

视频封面 16:9竖屏封面 9:16
--preset video-cover --style saul-bass,标题压在左侧留白--preset video-vertical --style kilian-eng,标题在上部安全区
公众号头图 2.35:1小红书 3:4
--preset wechat-cover,标题在右侧天空T12 食品近摄 + xiaohongshu 尺寸

改图

原图改后
一支铅笔--ref 原图,提示词:保持同一支铅笔,背景换成暖米色纸张,加柔和阴影

这些样例是怎么做出来的

  • 每个类别都走完整流程:推荐方向、填变量、生成、对着参考案例验收。
  • 第一版不合格,重做了:最初我只给了标题甚至不给文字,出来的是干净的概念图,不是海报;并排对照参考案例后,补全了副标题、信息行和角标这一层文字,才有现在的完成度。肖像(T09–T11)按方法论保持无字。
  • 第一版还暴露了一个工具缺陷:约四分之一的图带透明通道,在看图软件里显示成黑边。现在提示词会要求背景不透明,保存后检测到透明区域会自动压平到白底(transparent_background: true 可保留)。
  • 图内文字:标题和主要文案已逐张核对;小字号的信息行仍可能有细微瑕疵,正式使用请放大检查。
  • 肖像是 AI 生成的虚构人物,不对应真实个人。

安装

前置条件:

  • Node.js 18+(node --version)
  • 已安装并登录的 Codex CLI(codex --version 能运行)
  • Codex 账号可使用图片生成(先在 Codex 里手动生成一张试试)

1. 作为 Skill 安装(任何支持 Agent Skills 的工具)

npx skills add joeseesun/qiaomu-codex-imagegen

Skill 会让 Agent 知道怎么选场景、风格、怎么写描述,并通过下面的 MCP 或自带 CLI 出图。

2. 注册 MCP(推荐,Agent 直接调用工具)

Claude Code:

claude mcp add --scope user qiaomu-codex-imagegen -- node /绝对路径/qiaomu-codex-imagegen/scripts/mcp-server.mjs
`

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • SKILL.md8.0 KBupstream ↗
    ---
    name: qiaomu-codex-imagegen
    description: |
      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.
    license: MIT
    metadata:
      version: 0.3.0
      author: 向阳乔木 (https://x.com/vista8)
    ---
    
    # Qiaomu Codex ImageGen
    
    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.
    
    ## How to call it
    
    1. **MCP tools present** (`suggest_directions`, `compose_prompt`, `generate_image`, `search_prompts`, `get_prompt`, `build_prompt`, `list_catalog`; in Claude Code `mcp__qiaomu-codex-imagegen__*`): use them.
    2. **No MCP**: run the CLI from this skill's folder: `node scripts/cli.mjs suggest|compose|generate|search|prompt|list` (see `--help`).
    3. Neither available: tell the user to install (README). Requires the Codex CLI, logged in. Never fake an image with code.
    
    ## The workflow: suggest, choose, compose, generate, check
    
    ### 1. Intake (no tool call yet)
    
    Extract: **topic**, **deliverable** (what it is for), ratio, **text mode**, facts that must be exact, references and the role of each (`identity` person, `product` real packaging, `style`, `layout`), must-keep, must-avoid.
    
    - Text mode: `none` (no text), `exact_short` (only the short text you list), `typeset_later` (text-free base with room for the title).
    - **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. So for these deliverables use `exact_short` and give a complete short copy set: `headline` plus `copy` as lines separated by `|`. Take the lines from the user's facts. If they gave none, ask, or write clearly fictional sample lines and say so; never invent real prices, dates of real events, names, statistics.
    - `none` fits portraits and photos (T09–T11), product macros that carry no information, and base images the user will typeset. Keep every string short and read the result: models misspell, especially long Chinese.
    - Ask only blocking questions, at most three: a missing subject, a real person's identity reference, or facts that must appear. Fill low-risk gaps with a stated default.
    
    ### 2. Suggest at least four divergent directions
    
    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.
    
    Present them to the user briefly, one numbered item each:
    
    - name and template id,
    - **one concrete sentence of what this topic would look like in that mechanism** (write it yourself from `mechanism` and the topic, not a copy of the lock text),
    - what you still need from them (subject, data, reference photo),
    - look at one `references[].image` thumbnail per direction when available, so your sentence matches the real look.
    
    Then ask which to make: one, several, "all", or "你定". Offer to exclude these and propose more (`exclude`).
    
    **Skip the question** when the user already fixed the style ("用 Mondo 风格", "T03", "就这个风格") or said to go ahead ("直接出", "你定"). For "你定", pick the two best-fitting directions from different families and say which and why.
    
    ### 3. Compose the prompt
    
    For each chosen template direction call `compose_prompt` with concrete variables:
    
    - Map the topic to **one visible silhouette, action or relation**, and say how it connects to the topic. At most one main symbol and one cross-over action.
    - Colours are **roles** (background, primary, accent, ink), not fixed hex values. Material belongs where the preset puts it; do not overlay noise on everything.
    - No invented facts: prices, statistics, titles, names, dates, weather, quotes, QR codes, logos.
    - `missing_required` non-empty → ask for exactly that. `weak_variables` → they still hold generic defaults, fill them first.
    - Preset with `structural_override` → rewrite the prompt by hand: delete the base sentences the override replaces, keep no conflicting structure, then send the result as `raw_prompt` with the `避免:…` line.
    - Typographic templates with no text: tell the user the base image only satisfies the style after the title is typeset.
    - Give `copy` as `|`-separated lines; when strings include dates or numbers, list them all so the whitelist matches exactly (or pass a full `text_rule`).
    
    Mondo directions skip this step: `generate_image { prompt, style: <artist>, preset: <video-cover|poster|…> }`.
    
    Full rules and the canonical agent instruction: [references/design-system/agent-guide.md](references/design-system/agent-guide.md).
    
    ### 4. Generate
    
    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. Say that it takes 30–180 s and spends Codex quota. `out_dir` goes inside the user's project when they name one; `reference_images` take absolute paths (identity photo, product shot, style reference, or the image to edit).
    
    Series: lock template, type hierarchy, colour roles, texture placement and cross-over action; change one or two of scene, narrative focus, hue, module span. Pass the first image as `reference_images` for the rest.
    
    ### 5. Check and deliver
    
    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. State pass or the specific failed relation.
    
    **With the local corpus pack installed, compare against the references:** put the result next to one or two `references[].image` of the same template (`suggest_directions` lists them). If yours is plainly less designed (bare subject, no typographic hierarchy, no secondary layer), that is a failure too: complete the copy set or the missing layer and regenerate once.
    
    On failure change only the sentence that carries that relation and regenerate once; do not stack "more premium" adjectives. Transparent regions in a result are flattened onto white automatically (`transparent_background: true` keeps them). Deliver absolute paths, the direction used, and the sidecar `.json` (exact prompt) next to each image. Only say "generated" for images you actually produced and looked at.
    
    ## Rules
    
    - Each generation spends the user's quota: no test generations, `count` above 3 only if asked.
    - People: prefer silhouettes, back views, hands or symbols unless a face is asked for. Identity consistency needs an identity reference photo; without one say the person is fictional. Never make deceptive material with a real person's likeness.
    - Facts and numbers come only from the user; complex charts and long copy are typeset afterwards, not drawn by the model.
    - 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.
    - Simple route: `prompt` + `preset` + `style` (66 styles, 20 Mondo artists) when the user want
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/joeseesun-qiaomu-codex-imagegen.md

// REPO STATS

136 stars
0 open issues
Last commit: 1mo ago