No slash command · from iki
Generates character reference images for the Iki pipeline: front reference, role-separated part PNGs, 30° turned reference, full-body and waving references. Not for general image requests.
Ships in iki. 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.
The image leg of the Iki character pipeline. The iki-character skill owns what to draw — the part prompts, their filenames and their pitfalls. This skill owns how it gets drawn: the scripts, the model they run on, and what to do when Codex is not there.
They sit beside this SKILL.md. Resolve their absolute paths from the loaded
skill's directory; Claude Code also exposes that directory as
${CLAUDE_SKILL_DIR}. Codex does not need that environment variable.
| Command | Draws |
|---|---|
gen-images.sh --check | nothing — runs the preflight alone and prints the model the jobs would use |
gen-images.sh [--ref <png>] <work_dir> "<prompt>::<out.png>" ... | a batch, up to five jobs at once. Without --ref, from the prompt alone: the front reference. With it, every job sees it: the parts |
gen-turn-reference.sh <reference.png> <work_dir> | <work_dir>/reference-30.png: the same character with the head turned 30° (the iki-character-loop's style check) |
gen-full-reference.sh <reference.png> <work_dir> [outfit] | <work_dir>/reference-full.png: the same character drawn full body, head to toe, from the bust — only for a full-body character; [outfit] names the bottoms, socks and shoes the bust cannot show |
gen-wave-reference.sh <reference-full.png> <work_dir> | <work_dir>/reference-wave.png: the full-body reference with the right hand raised in a wave — only for a full body that gets a pose forearm; what forearm_pose.png is drawn against |
All four shell out to codex exec with Codex's built-in image_generation
tool, write into <work_dir> (which must already exist) and keep each job's
transcript in <work_dir>/.gen-logs/: gen-images.sh under the job's output
path (.gen-logs/variants/face-b.png.stdout), so two batches may run in one
workdir at once as long as their output paths differ, and each reference
script under its reference's name (.gen-logs/reference-30.stdout). Billed, minutes per image — confirm
the user is OK spending before the first job. Run them as background Bash jobs
and let the completion notice say when a batch is done; do not sleep-poll.
Run gen-images.sh --check using that absolute script path. It stops on the three things
that mean Codex cannot draw on this machine at all:
codex CLI not found in PATHcodex not logged in — run: codex logincodex image_generation feature is off — run: codex features enable image_generationOn any of them, do not retry. Tell the user and offer the two ways on: set
Codex up (install the Codex CLI, codex login with a ChatGPT plan, the command
the message names) and run again, or the hand-off below. A generation script
stops with the same three messages before its first job; treat them the same
way there.
Jobs run on gpt-6-luna at model_reasoning_effort=low. The model only has
to call the image tool, so a bigger one buys nothing but cost — and left to
itself, Codex runs whatever ~/.codex/config.toml names, usually a large
reasoning model. To use another one:
CODEX_IMAGE_MODEL=<slug> gen-images.sh …CODEX_IMAGE_MODEL from the shell profile, or
set it under "env" in Claude Code's settings.jsonCODEX_IMAGE_MODEL= line in codex.shModels are account-gated: a slug the plan does not carry fails the job with a
400 in its log, with no fallback to another model. That is when to override.
Every part is drawn against one reference, so the set reads as one character:
parts drawn from a style string alone drift (a photoreal iris on a flat
cel-shaded face). Draw it without --ref, into the workdir. The skeleton
below is the framing the part prompts and the rig assume, as bob and
the long-haired character were drawn:
Front-facing bust portrait of an ORIGINAL anime
<character>(not any existing character),<STYLE>, soft muted grey-blue plain background, square image. Head perfectly front-facing and level, looking straight at the viewer, shoulders squared. Hair:<hairstyle and colour>, bangs ending ABOVE the eyebrows so both eyes and brows are fully clear.<eye colour>eyes, gentle closed-mouth smile, small delicate anime nose. Visible neck. Simple outfit:<outfit>. Single character, upper chest up, no text, no watermark.
Draw it again if the head came out turned or tilted, the bangs cover an eye or a brow, or the neck is hidden: every part inherits it. A reference the user supplies replaces the draw. Never use a licensed model's art as one (the iki-character pitfalls).
Only for a full-body character (the iki-character skill's full-body.md),
and drawn FROM the front reference once that one is final:
gen-full-reference.sh <workdir>/reference.png <workdir> writes
<workdir>/reference-full.png, the same character head to toe on a 1:3
portrait, arms hanging in a slight A-pose. A full body alone would not do:
drawn whole, the face is a fraction of the image, too small to draw the face
parts or score the face against. So the front reference stays the master,
and this one is drawn from it with it attached.
The optional third argument is one sentence naming what the bust cannot show:
the bottoms, socks and shoes. The bust has no lower body, and unnamed the
model invents it (a tee-only bust came back with a yellow skirt and loafers).
full-body.md Step 0 writes the sentence to <workdir>/outfit.txt; pass it
as "$(cat <workdir>/outfit.txt)". The prompt also keeps the hair as drawn:
tied hair (a ponytail, a bun, a braid) keeps its length and place, and only
loose hair the bust's frame cuts off continues down.
Draw it again if the head, the outfit or the colours drifted from the front reference, an arm touches the torso, the legs have no gap between them, or a foot or the crown is cut by the image's edge: the body and the arm parts inherit it.
It drives the body and arm parts, where the body is placed on the tall canvas, and the critic's body score. The front reference stays the face's: the face and hair parts, the face layout, the turned reference and the face score.
Only for a full body that gets a pose forearm (forearm_pose.png, the
iki-character skill's full-body.md), and drawn FROM reference-full.png
once that one is final: gen-wave-reference.sh <workdir>/reference-full.png <workdir> writes <workdir>/reference-wave.png, the same figure with its right
hand (on the viewer's left) raised in a wave. It is one more billed image, and
the pose forearm is drawn against it because it shows the raised forearm
itself — the sleeve's cuff, the skin, the line and the hand's pose at the
figure's proportions — where arm.png's reference shows a hanging arm the
model tends to redraw hanging, and reference-full.png shows no raised
forearm at all. It is also the critic's target for the pose forearm.
Draw it again if the raised hand's thumb faces out (away from the body), the
upper arm left the torso, or the outfit drifted from reference-full.png.
When it does not come back usable, reference-full.png stands in as the
pose forearm's reference.
You cannot check quota up front. codex login status reports
authentication only — identical output before and after the limit is hit — and
--check cannot see it either. A refused job exits non-zero with You've hit your usage limit and a reset time in its log, so on a big set fire one job and
read it before firing the rest. Out of quota, report the reset time; the
hand-off below is the other way on.
The model is told not to save anything: the scripts take each image from where
the image tool stores it, ~/.codex/generated_images/<session>/, and copy it to
its path (the job's log notes [gen] collected …) — the first one, when
the model drew more than once. A job that runs past ten minutes
(CODEX_IMAGE_TIMEOUT, in seconds) is stopped, on a machine that has
timeout; what it had drawn by then is still collected, and it is marked
[fail] only when that is nothing. Asked to save it itself,
gpt-6-luna answered with the path without copying, or wrote the image back
out as base64 chunks. A job marked [fail] leaves an older file at its path as
it was; read its log. When the log ends in [gen] copy failed, the image was
drawn and only the copy failed: copy it from the path that line names rather
than paying to draw it again. Otherwise the job drew nothing — retry that job
alone. The script exits non-zero when any job failed.
Anything that returns transparent, role-separated PNGs works; the prompts are
the substance, the driver is not. When Codex cannot draw here, or the user would
rather use another tool, write <workdir>/prompts.md and stop:
reference.png for the turned and full-body references and the face and hair
parts, reference-full.png for a full body's body.png and arm.png, and
reference-wave.png for its forearm_pose.png — and
the prompt verbatim with <STYLE> filled in: for the turned reference, the
prompt inside gen-turn-reference.sh; for the full-body reference, the one
inside gen-full-reference.sh, with the outfit sentence in place of its
default outfit line; for the waving reference, the one inside
gen-wave-reference.sh (attach reference-full.png).Tell the user where the file is and wait. When they say the images are in
place, check every path is there and a PNG (file <path>), then continue from
the step that needed them.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub zeikar/iki --plugin iki4 skills in this plugin
/iki-characterGenerate a renderable, auto-rigged Iki character (`.iki`) from one gesture — draw a front reference, then role-separated transparent part PNGs against it with the iki-create-image skill (eyeless, noseless face base, nose, sclera, iris, a keyed open mouth and its interior (or a closed + open mouth pair for a style that cannot fold), lash, brow, front and back hair, torso, an optional cheek blush, an optional front side lock beside the ear, and for an optional full body a body from the neck to the shoes and one arm, drawn against a full-body reference), compose them into canvas-aligned role layers with the `compose_layers_from_parts` MCP tool, then `auto_rig_from_layers` to emit a rigged `.iki` that blinks, gazes, lip-syncs, turns, nods and tilts its head with swaying hair, and emotes with its brows — drawn full body, also raises and bends its arms and turns its body, and with a pose forearm waves — and that declares head motions (Nod, Shake, Tilt) and, with a pose forearm, a Wave, and up to six default expressions (smile, laugh, angry, sad, surprised, shy; shy needs the blush), each with a description a host picks by. Use whenever the user asks to "make/generate/create an Iki character" from scratch (no existing art); for one finished picture the user already has, use iki-import-illustration instead./iki-character-loopDrive a generator/critic loop that refines a rigged Iki character (`.iki`) until it matches a reference illustration. Draws a reference with the iki-create-image skill, then alternates the iki-character-artist agent (draws, composes, tunes, rigs) with the iki-character-critic agent (scores a rubric, emits typed findings) until the critic says ship and the user has nothing to add, or a cap is hit. The iki-character-appeal-critic judges the renders for appeal without the reference each round. Use when a generated character is renderable but not good-looking enough, or when the user asks to iterate a character toward a target look.Other plugins' skills for the same job