When you tell Claude Code or Codex to "create an avatar from this image", the official agent guide prescribes a disciplined seven-step pipeline with mandatory self-checks. Understanding it helps you get better results and know when to intervene.
Before starting: vision check
Reading pixel coordinates from images needs strong vision. The guide tells the agent to run a calibration test first — an image with numbered markers that the agent must read and score. If the score fails, a good agent stops and tells you its coordinates will likely be off. Recommended setups: Claude Code with Claude Opus 5.5, or Codex with GPT-6.1 Sol; a good agent names its model and warns when it is not on the list.
The seven steps
- Create the project — a script copies your image to
projects/<name>/source.pngwith a skeleton rig file. - Survey the image — the agent renders a coordinate grid over the full image and writes down the face centre, chin, neck, shoulders, and which optional parts exist (hand near face, hair buns, hanging accessories, long hair). Hats, glasses and held objects are reported as "will move rigidly".
- Draft the rig — part by part, always from zoomed grids of each region, never estimated from the full image: the head ellipse (covering all hair, pivot at the neck), eye openings traced inside the lashes, the mouth line, cheek centres, one polyline per swaying hair lock, chest and shoulder ellipses. A validator plus overlay renders let the agent see its own draft on top of the image and fix offsets before proceeding.
- Build layers — a Python tool cuts the image into animation layers (base, hair mask, eye layers) guided by the rig. The agent then inspects the hair mask and eye layers pixel by pixel.
- Review motion — the avatar is rendered in fixed poses: rest, half and closed eyes, mouth open, ±30° turns, look up/down, tilts, the angry/sad/surprised expressions and a hair-sway sequence. The agent looks at every frame: closed eyes fully closed, no mesh tears, mouth opening without stretching the chin, hair swaying while clothing stays still. Failures loop back — adjust, rebuild, render — capped at three rounds.
- Drawn variants — the optional but high-impact step: masks and prompts for closed eyes, vowel mouths and expression eyes, generated by Codex image generation (asking your permission first, since the image is uploaded) or by any generator you prefer. A build script cuts accepted drawings into sprites.
- Hand over — the agent tells you how to open the project, which parts it is least sure about, what the rig cannot represent, and when to ask for a rebuild.
What a good agent refuses to do
- Estimate coordinates from the full image without zoomed grids
- Skip the overlay or pose checks, or report success without looking at the rendered frames
- Commit, upload or copy your image anywhere (the sole exception: variant generation, only with your agreement)
- Modify the bundled samples or reference data to make an image work
Experimental extras
The guide also covers optional garment cloth simulation (skirts with seams, tiers and wind), planted legs with weight shift, and hanging arms — each experimental, each with its own overlay checks and pose reviews. These need illustrations that actually show those parts.
What this means for you
- If your agent skips the vision check or admits no grids were used, expect a sloppy rig.
- Artwork quality limits the rig: transparent background and an unobstructed face pay off more than any prompt.
- Three failed review rounds is the documented stopping point — that is when a human should look at the frames.