TL;DR

agent-sprite-forge — Codex Skill mã nguồn mở MIT — biến một dòng prompt thành sprite sheet PNG trong suốt + animation GIF game-ready. Pipeline hoàn toàn trong Codex: prompt design → gpt-image-2 → sprite sheet → cleanup → transparent PNG → GIF, agent còn tự review và fine-tune tới khi sạch. Không cần Canva tẩy nền, không cần API ảnh riêng. Đây là ứng dụng đầu tiên gây chú ý của bộ đôi Codex + gpt-image-2 (Images 2.0) mà OpenAI release 21/04/2026.

agent-sprite-forge banner — Agent Skills for turning prompts into 2D GIFs and sprite sheets

What's new

Tác giả @0x0funky ban đầu chỉ test xem Codex's built-in Image2 có gen nổi 2D sprite không. Kết quả bất ngờ: Image2 tạo được sprite sheet nhân vật khá ổn ngay từ prompt đơn. Từ đó, tác giả ship luôn một Codex Skill gói trọn pipeline:

  • Thiết kế prompt có cấu trúc (pose, grid, perspective, style)
  • Gọi image gen của Codex (gpt-image-2) sinh sheet raw
  • Agent tự review, regen nếu frame xấu
  • Python post-processor (Pillow + numpy) tách frame, xoá nền, xuất PNG trong suốt + GIF

Cách invoke đúng một dòng trong Codex CLI:

$generate2dsprite Create a 3x3 idle for an ultimate earth titan

Tác giả còn kể thêm: các video ôn tập 90 phút cho trung tâm dạy học của vợ giờ cũng do agent lo — một học kỳ xong trong 10 phút.

Why it matters

Trước đây workflow sprite kiểu này ăn 3–4 tool: Midjourney/SD cho ảnh → Photoshop/remove.bg tẩy nền → Aseprite căn frame → ImageMagick ghép GIF. Mỗi bước là một context switch. agent-sprite-forge nén tất cả vào một Codex session + một prompt. Đây là định nghĩa thực sự của cụm từ bị lạm dụng “agentic workflow”: tác tử lên kế hoạch → tác tử gen → tác tử review → tác tử fix — con người chỉ mô tả thứ mình muốn.

Quan trọng hơn, đây là tín hiệu cho thấy ngành game indie và content education có thể đóng gói pipeline production rất gọn, ngay trên máy cá nhân, chỉ với subscription ChatGPT.

Technical facts

Hạng mụcChi tiết
Enginegpt-image-2 (Images 2.0, OpenAI, release 21/04/2026)
RuntimeCodex CLI / Codex desktop, Skill đặt ở ~/.codex/skills/generate2dsprite
DependenciesPython 3, Pillow, numpy (install qua requirements.txt)
Trigger$generate2dsprite [prompt]
Output per runraw-sheet.png, raw-sheet-clean.png, sheet-transparent.png, per-frame PNG, animation.gif, pipeline-meta.json
Asset typesCharacter, creature, spell cast/projectile/impact, FX sheet, multi-direction walk, combat bundle
LicenseMIT

gpt-image-2 bên dưới có vài điểm đáng ghi: text rendering ~99% accuracy đa ngôn ngữ, resolution tới 2K, aspect ratio 3:1 → 1:3, batch 8 ảnh coherent (chính batch coherent này là thứ khiến sprite sheet khả thi — mỗi frame phải nhất quán character).

Goku Kamehameha sprite frame do agent-sprite-forge tạo  Naruto Rasengan 2x3 cast sheet do agent-sprite-forge tạo

Comparison

gpt-image-2 vừa ra 12 giờ đã leo #1 mọi category trên Image Arena với 1,512 điểm, dẫn +242 điểm so với Google Nano Banana 2 — biên độ kỷ lục trên bảng xếp hạng.

Tiêu chígpt-image-2Nano Banana 2Midjourney v8
Giá/ảnh 1024²$0.006 → $0.211~$0.02Flat subscription
Tốc độTrung bình (thinking mode chậm)1–3sTrung bình
Text rendering~99% đa ngôn ngữKháYếu
Batch coherent8 ảnhKhông chính thứcKhông
Codex integrationNativePhải gọi ngoàiKhông API

Với sprite sheet, điểm cốt tử là batch coherent + text accuracy (khi cần label frame). gpt-image-2 thắng ở cả hai.

Use cases

  • Indie game dev: sprite + GIF cho prototype trong phút, bỏ qua pipeline Aseprite/Photoshop.
  • Content creator & giáo viên: như demo của tác giả, nguyên học kỳ giáo trình 90 phút sinh trong 10 phút/tập.
  • Storyboard & manga: 8 panel character-consistent từ một prompt.
  • Marketing asset: IG 1:1, Twitter 3:1, LinkedIn wide, FB OG trong một call; localize đa ngôn ngữ với text đúng.
  • UI mockup: prototype trong Codex desktop mà không rời workspace code.

Limitations & pricing

  • Knowledge cutoff của gpt-image-2 là December 2025 — không vẽ chính xác vật phẩm/brand mới hơn.
  • Logo cụ thể tái tạo “inconsistent” — không thay thế designer cho brand work.
  • Thinking mode có latency cao, không phù hợp real-time app.
  • API public dự kiến đầu 05/2026; hiện dùng qua Codex/ChatGPT subscription.
  • Pricing API: image input $8/M tokens ($2 cached), output $30/M tokens. High quality 1024² khoảng $0.211/ảnh — không rẻ nếu bulk.
  • agent-sprite-forge cần Codex CLI và Python local; xuất nhiều frame tốn ổ cứng.
  • DALL-E 2 & DALL-E 3 retire 12/05/2026 — pipeline cũ phải migrate.

What's next

OpenAI nói Images 2.0 sẽ sang Enterprise + Edu “soon”. API public rộng rãi đầu tháng 5/2026. Hệ sinh thái Codex Skills đang bùng nổ — awesome-agent-skills đã cán 1000+ skill, và agent-sprite-forge có thể là template cho hàng loạt skill gen asset: 3D prop, UI kit, storyboard video, infographic data-driven.

Muốn thử? Clone repo, copy skill vào ~/.codex/skills/, rồi gõ một dòng prompt. Hết.

Nguồn: agent-sprite-forge (GitHub), ChatGPT Images 2.0 — OpenAI, Introducing gpt-image-2 — OpenAI Community, Build Fast with AI breakdown.