技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
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 fo…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
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.
suggest_directions, compose_prompt, generate_image, search_prompts, get_prompt, build_prompt, list_catalog; in Claude Code mcp__qiaomu-codex-imagegen__*): use them.node scripts/cli.mjs suggest|compose|generate|search|prompt|list (see --help).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.
none (no text), exact_short (only the short text you list), typeset_later (text-free base with room for the title).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.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:
mechanism and the topic, not a copy of the lock text),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.
For each chosen template direction call compose_prompt with concrete variables:
missing_required non-empty → ask for exactly that. weak_variables → they still hold generic defaults, fill them first.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.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.
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.
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.
count above 3 only if asked.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.prompt + preset + style (66 styles, 20 Mondo artists) when the user wants a quick image without the direction step.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. On failure give the tool's error and the one fix to try (Codex login, shorten the prompt, check the reference path).
templates.json, routing.json; filled examplesreferences/styles.json (66 styles), mondo-artists.json (20), presets.json (13 scenarios)Copyright (c) 向阳乔木. X https://x.com/vista8, GitHub https://github.com/joeseesun/. Template library distilled from public-area samples of https://vip.xiaoxiaodong.ai/open-source; Mondo material from qiaomu-mondo-poster-design (MIT).