Logo Universal Imagegen

Universal Imagegen

Cộng đồng
SnowSky1
universal-imagegen

Bring the Codex imagegen workflow, prompt engineering, use-case taxonomy, edit invariants, and prompt library to any general-purpose agent, then generate or edit raster images through a configurable Images API. Supports OpenAI-compatible services and Qwen-Image deployments exposed through compatible gateways.

Tổng quan

Nhà phát hànhSnowSky1
Kho mãuniversal-imagegen-agent
Tên kỹ nănguniversal-imagegen
Sao
232
Bản fork
12
Tệp đi kèm
55
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 55 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được SnowSky1 công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Universal Imagegen trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/SnowSky1/universal-imagegen-agent/tree/main
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SnowSky1/universal-imagegen-agent.git \
  .claude/skills/universal-imagegen
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Universal Imagegen trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Universal Imagegen ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Universal Imagegen không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Universal Image Generation Skill

Adapted on 2026-09-24 from the OpenAI Codex imagegen skill. The unmodified source snapshot is preserved under upstream/imagegen/.

Runtime contract

This skill does not assume a host-specific built-in image tool.

  • Preferred execution: the npm/pnpm-installed imagegen-agent CLI.
  • If the global command is unavailable and package execution is allowed, use npx -y universal-imagegen-agent or pnpm dlx universal-imagegen-agent as the command prefix.
  • Reuse the bundled Codex-derived prompt library and workflow regardless of which compatible image model serves the request.
  • Machine-readable execution: always add --json.
  • Safe validation: run with --dry-run before a costly or destructive retry.
  • Credentials: read from environment variables only. Never ask a user to paste a complete API key into chat and never pass a key on the command line.
  • API portability: model, base URL, headers, and API-key environment variable are configurable. Do not assume one provider's model catalog.
  • Open models: Qwen-Image and similar deployments can be used when exposed through the bundled OpenAI-compatible interface. For native Diffusers, ComfyUI, SGLang, or another protocol, add a provider adapter rather than changing the agent-facing workflow.
  • Output safety: do not overwrite existing files unless the user explicitly authorizes replacement and --force is supplied.

Installation

Install the CLI and this skill together:

bash
npm install --global universal-imagegen-agent
imagegen-agent install-skill

Or install only the skill without keeping a global package:

bash
npx universal-imagegen-agent install-skill

Restart or reload the host agent after installation. The installer defaults to $CODEX_HOME/skills/universal-imagegen, or ~/.codex/skills/universal-imagegen when CODEX_HOME is unset. Use --target for another compatible agent's skill directory.

Intent decision

Classify the request independently along two axes:

  1. Intent:
    • generate: create a new image; reference images guide style, composition, mood, or subject.
    • edit: preserve an existing image while changing specified parts.
  2. Execution:
    • one asset;
    • multiple variants of one prompt (--n);
    • many distinct jobs (batch with one JSONL record per asset).

Assume generate unless the user explicitly asks to modify an existing image. For edits, label each input image by index and role in the prompt.

Workflow

  1. Determine whether the output is a preview or a project deliverable.
  2. Collect the primary request, exact in-image text, constraints, avoid list, input images, and required output path.
  3. Check configuration with imagegen-agent config --json.
  4. Structure the prompt using the schema below without inventing unrelated objects, brands, slogans, characters, palettes, or narrative details.
  5. For an edit, state invariants as change only X; keep Y unchanged.
  6. Run the intended request with --dry-run --json.
  7. Execute the real request only when configuration and paths are correct.
  8. Inspect every output for subject, composition, exact text, edit invariants, unwanted artifacts, and alpha-channel requirements.
  9. Iterate with one targeted change at a time.
  10. Report output paths, effective model/provider, and final prompt.

Prompt schema

Use only the useful lines:

text
Use case: <taxonomy slug>
Asset type: <where the asset will be used>
Primary request: <user's request>
Input images: <Image 1: role; Image 2: role>
Scene/backdrop: <environment>
Subject: <main subject>
Style/medium: <photo, illustration, 3D, etc.>
Composition/framing: <viewpoint, crop, placement>
Lighting/mood: <lighting and mood>
Color palette: <palette notes>
Materials/textures: <surface details>
Text (verbatim): "<exact text>"
Constraints: <must keep and must avoid>
Avoid: <negative constraints>

If the user prompt is already specific, normalize it without adding creative requirements. If it is generic, add only details that materially improve composition, intended use, or production quality.

Taxonomy

Generate:

  • photorealistic-natural
  • product-mockup
  • ui-mockup
  • infographic-diagram
  • scientific-educational
  • ads-marketing
  • productivity-visual
  • logo-brand
  • illustration-story
  • stylized-concept
  • historical-scene

Edit:

  • text-localization
  • identity-preserve
  • precise-object-edit
  • lighting-weather
  • background-extraction
  • style-transfer
  • compositing
  • sketch-to-render

CLI recipes

Configuration:

bash
imagegen-agent config --json

Generate:

bash
imagegen-agent generate "A minimal ceramic mug product photo" \
  --use-case product-mockup \
  --composition "wide composition with usable negative space" \
  --constraints "no logos; no text; no watermark" \
  --out output/imagegen/mug.png \
  --json

Edit:

bash
imagegen-agent edit \
  --image input.png \
  --prompt "Replace only the background with a warm sunset" \
  --constraints "keep the product, its edges, framing, and labels unchanged" \
  --out output/imagegen/sunset.png \
  --json

Batch:

bash
imagegen-agent batch jobs.jsonl \
  --out-dir output/imagegen/batch \
  --concurrency 4 \
  --json

Transparent output

Request an actually transparent background and use PNG or WebP. API capability varies by provider and model. If native transparency is unsupported, explain the limitation and ask before switching models or using chroma-key extraction. Never silently change the selected model.

Text and edits

  • Put exact text in quotes and request verbatim rendering with no extra text.
  • Spell difficult words character by character when accuracy is critical.
  • Preserve edit invariants on every iteration.
  • A mask guides generation but does not guarantee pixel-perfect boundaries.
  • For multi-image edits, image order is meaningful.

Boundaries

Use direct SVG, HTML/CSS, canvas, or repository-native editing instead when the task is deterministic vector work, a small change to an editable source asset, or an extension of an established icon/logo system.

References

  • references/prompting.md: runtime-neutral prompting guidance.
  • references/integration.md: configuration and agent integration.
  • references/sample-jobs.jsonl: batch examples.
  • upstream/imagegen/: complete original skill snapshot.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Universal Imagegen làm được gì?

Bring the Codex imagegen workflow, prompt engineering, use-case taxonomy, edit invariants, and prompt library to any general-purpose agent, then generate or edit raster images through a configurable Images API. Supports OpenAI-compatible services and Qwen-Image deployments exposed through compatible gateways.

Vì sao nên dùng Universal Imagegen trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Universal Imagegen là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Universal Imagegen trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/SnowSky1/universal-imagegen-agent/tree/main. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Universal Imagegen?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Universal Imagegen với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Universal Imagegen với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Universal Imagegen có miễn phí không?

Có. Kỹ năng này được SnowSky1 phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇