/game-assets:codex-visualfrom game-assets
Generates consistent 2D art (sprites, icons, pixel-art tilesets, sheets, breathing idles) by routing all visual work through a single project art bible (ART_DIRECTION.md).
Ships in game-assets. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Image generation is stateless, so a project's look drifts as it grows. This skill routes visual work through one canonical project spec.
Read /ART_DIRECTION.md. Missing / Status: PENDING → PHASE 1 first, whatever was asked.
Status: LOCKED → start from the request:
| You want | Go to |
|---|---|
| A look for a new project; "lock the art style" | PHASE 1 → 2 |
| "Generate / edit a sprite, icon, tileset or key art": one sprite, icon, key art or background | job shape → PHASE 3 |
A pixel-art tileset or pixel sprites: snap to the grid and palette, audit_pixel.py | PHASE 3; reference/pixel-grid.md |
| A matching set — icons, pickups, variants; one more for a shipped set | PHASE 3S |
| "Make a GIF / an idle loop", a walk, an attack; "the animation jitters" | PHASE 3A; reference/animation-route.md |
A breathing idle loop from one still (breathe.py); jitter, cut feet, a boiling idle | reference/animation-faults.md §1a |
| How many frames fit a sheet: the four locks, grid → cell, the style floors | reference/job-shape.md |
| A transparent PNG; "a fringed cut-out"; which key colour | reference/codex-runtime.md §5 |
| "Off-centre", "one is smaller"; a crosshair template | reference/geometry-gate.md |
| "The assets don't match / the style drifted" | PHASE 4 |
| A source image for image-to-3D; the views a generated mesh's texture is repainted from | reference/image-to-3d-input.md; repaint: mesh-texture-paint |
| A 2D character or scene to cut into layers (PSB, Live2D, parallax) | reference/layered-2d-source.md |
| A review sheet (8-view QA, clips, before/after), gated; its pre-review | reference/review-sheets.md; reference/pre-review.md |
| Read a screenshot; compare two images | reference/codex-runtime.md §7 |
Any codex exec image work by hand (bare codex hangs; exit 0 proves nothing) | Step 0; reference/codex-runtime.md §1–4 |
| Which model rendered it; size and quality limits | reference/image-model.md |
This skill decides no art. Style, dimensionality (2D / 2.5D / 3D), the generation engine, asset formats, palette and folder layout all live in the project's
/ART_DIRECTION.md, chosen with the user; the skill provides only the method. Reference images a user shows you are inspiration to characterize a target, never artwork to copy or ship.
| Path | Role |
|---|---|
/ART_DIRECTION.md | Single source of truth (art bible). Read before EVERY generation. |
/ArtDirection/refs/ | User-supplied reference images. |
/ArtDirection/candidates/ | Bootstrap explorations. |
/ArtDirection/anchors/ · anchors/sets/ | Locked reference image(s) fed via -i; sets/ = per-set anchors (an approved first member). |
/ArtDirection/manifest.md | Registry of every generated asset. |
skill scripts/ | Key: pick_key.py · key_unmix.py. Sets: slice_grid.py · normalize_set.py · audit_set.py. Animation: sheet_to_frames.py · audit_frames.py · audit_identity.py · frames_to_anim.py · breathe.py. Pixel: pixel_snap.py · audit_pixel.py. 3D source: turnaround_to_views.py · audit_3d_source.py. Review: contact_sheet.py · prereview.py · overview_sheet.py (reference/overview-sheets.md) · embed.py. Call: codex_generate.py |
| project asset dir | Shippable art, at the path the spec defines (e.g. Assets/… for Unity). |
<repo> = the project root, as an absolute path.
command -v codex && codex --version
Missing → stop and ask the user to install it; never auto-install. Generation needs no
OPENAI_API_KEY: $imagegen — codex's bundled image skill, typed literally —
uses the ChatGPT login (codex login status).
Golden rule — always
codex exec(barecodex "..."hangs; the Bash tool cannot drive a TUI), and never trust its exit code: it is 0 when the model was rejected and when no image was made.scripts/codex_generate.py --prompt-file P --out DEST -i <anchor>makes the call and proves it (model probe, scratch dir, the original from its own session, real size). By hand:reference/codex-runtime.md§1–4.
-m <slug> or config model =: the default for
generation, the strongest for PHASE 2 and PHASE 4. A pinned slug that errors is the usual sudden
failure: pass -m explicitly, check codex exec --help, record a project pin in
ART_DIRECTION.md.-m does not choose it. Read which one rendered from
the file itself (reference/image-model.md §1). It takes a prompt and reference paths,
nothing else, renders a fixed ~1,572,864-pixel budget and has no native transparency
(§2–4 there).Three shapes, three priorities; the wrong one makes a sheet unusable. Locks, grid → cell and the
style floors for each: reference/job-shape.md.
| Shape | Priority | Path |
|---|---|---|
| Static single — key art, hero, boss, background | quality | one generation at the full pixel budget, style anchor via -i, plus the family anchor if one exists → PHASE 3 |
| Static set — icons, pickups, avatars, variants | quality, then consistency | 2x2 or 3x3 per sheet (627 / 418 px cells); more members → more sheets chained to the first; then slice_grid.py + normalize → PHASE 3S |
| Animation — loop, one-shot, transformation, UI feedback | stability | frames → grid → cell px → style floor → split; key → sheet_to_frames.py --register (never slice_grid.py) → gate → onion skin + GIF → Unity handoff → PHASE 3A |
$imagegen is weak at true pixel art; pixel work needs
a pixelation post-process, another engine or hand-authoring
(reference/image-model.md §7).ArtDirection/refs/. Analyze them (reference/codex-runtime.md §7).ArtDirection/candidates/ unless the user pinned one (reference/image-model.md §7).codex exec "描述每張的風格差異" -i optionA.png …); the user
picks or asks for another round./ART_DIRECTION.md)ArtDirection/anchors/master.png.reference/codex-runtime.md §7).Status: LOCKED, version and every section of reference/art-direction-schema.md.manifest.md./ART_DIRECTION.md. If PENDING → Phase 1.$imagegen — STYLE PREAMBLE verbatim + the
asset request on a flat key colour, anchor via -i, original copied to DEST
(reference/codex-runtime.md §9); pixel via post-process — snap to the spec's grid and
palette, then audit_pixel.py (reference/pixel-grid.md); transparency — key_unmix.py,
never a binary key (reference/codex-runtime.md §5); another engine — the
spec's recipe.ls -la "$DEST" && file "$DEST", then a manifest.md row (date, path,
type, size, spec version, one-line prompt); an animation is one row for the set
(reference/animation-scripts.md §4).Three SCOPES of consistency, each owned by one mechanism; they stack in one call:
| Scope — "must match…" | Mechanism | How |
|---|---|---|
| Global style (the project) | style anchor | -i anchors/master.png on EVERY gen |
| Within a set (its siblings) | grid one-shot | the whole set as ONE gridded image → one context, no drift |
| Across sets / over time (shipped work) | reference-chaining | ALSO -i the prior approved sheet — a FIXED promoted anchor, never the previous output |
| guarantee (size and centre) | normalize + gate | slice_grid.py / normalize_set.py, then audit_set.py |
The canonical call: style anchor + family anchor (chain) + grid layout, in ONE generation, then slice + normalize.
cols=ceil(√N), rows=ceil(N/cols), leftover
cells blank or repeated, the static-set floors (reference/job-shape.md), a related family's anchor chained. Too
many members? Split, chain every later sheet to the first, normalize all to one target.Style anchor, then family anchor; locks 1–3; capture → key → slice → gate → promote. The call:
reference/image-model.md §6.
One cell wrong? Re-gen the whole sheet — never patch one cell: a repair request re-renders the whole canvas (
reference/animation-faults.md§3, with the local splice).
PHASE 3S's stack, but the cells are moments of one character, seated by silhouette afterwards
(never centred per cell; never slice_grid.py). Shape → prompt with the four locks → anchors →
generate, key_unmix.py, sheet_to_frames.py --report → --register → audit_frames.py and
frames_to_anim.py --onion --bg → frames + frames.json + previews. A boiling idle, or an idle
loop from one still: breathe.py. Every step: reference/animation-route.md.
reference/codex-runtime.md §7, strongest agent model.version + changelog; flag older assets in the manifest as
re-gen candidates. Version the palette; never edit it silently.reference/image-to-3d-input.md); conversion:
comfyui-asset-generation; its texture repainted from these views: mesh-texture-paint;
a character's route: game-character-pipeline.comfyui-asset-generation; a still → a transparent loop from a video:
sprite-from-video.Related: game-character-pipeline, comfyui-asset-generation, art-asset-registry.
Outputs here are engine-neutral files: a normalised PNG, or the frames, frames.json and a
GIF/APNG/WebP preview — Unity plays none of those three formats. The engine plugin today is
unity-dev:
AnimationClip / AnimatorController, loop vs one-shot playback, UI Image frame animation):
unity-2d-spritesunity-3d-modelsunity-game-uireference/animation-faults.md (opens in a new tab)reference/animation-route.md (opens in a new tab)reference/animation-scripts.md (opens in a new tab)reference/animation-sheets.md (opens in a new tab)reference/art-direction-schema.md (opens in a new tab)reference/codex-runtime.md (opens in a new tab)reference/geometry-gate.md (opens in a new tab)reference/identity-audit.md (opens in a new tab)reference/image-model.md (opens in a new tab)reference/image-to-3d-input.md (opens in a new tab)reference/job-shape.md (opens in a new tab)reference/layered-2d-source.md (opens in a new tab)reference/overview-sheets.md (opens in a new tab)reference/pixel-grid.md (opens in a new tab)reference/pre-review.md (opens in a new tab)reference/review-sheets.md (opens in a new tab)scripts/audit_3d_source.py (opens in a new tab)scripts/audit_frames.py (opens in a new tab)scripts/audit_identity.py (opens in a new tab)scripts/audit_pixel.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2d-art, pixel-art, sprite-generation, art-direction, asset-pipeline
Other plugins' skills for the same job
10 skills in this plugin
/art-asset-registryTrack generated 2D/3D assets in one ledger: which prompt made each file, approvals, what's stale./blender-character-rigHand-built Blender rig, fallback to the default character-autorig: mascot bodies, pack-skeleton fit./blender-retargetPut stock or purchased clips on a rigged character in Blender: retarget, clip library, weight repair./character-autorigRig a humanoid with a licensed Auto-Rig Pro in one command: its AI plus mesh markers, gates.npx claudepluginhub tipoli5890/game-studio --plugin game-assets