Pixel Face
Create and refine 32×32 pixel-art avatar faces for animated agent personas.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/pixel-face-cotal-ai/— the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Create or improve a 32×32 pixel-art persona face for the Frontier Faces demo (examples/04-frontier-faces/personas.mjs) — the animated agent avatars rendered by face-term.mjs / the browser <cotal-face> / the gallery. Use when the user asks to add a new persona/face/avatar, improve an existing one (hair, eyes, likeness, expression), make it "look more like" someone, or fix a face that "doesn't read". Drives the example's own tools (img2rows.mjs, render-png.mjs) and follows FACE-DESIGN.md; uses a multi-agent variant loop for likeness.
What this skill does
pixel-face — author & refine the Frontier Faces pixel art
A persona face is pure data in examples/04-frontier-faces/personas.mjs (one entry per
persona). The same data drives the terminal renderer (face-term.mjs), the browser element
(web/cotal-face.js), and the PNG tool — so edit personas.mjs once and it's live everywhere.
Always work from examples/04-frontier-faces/.
Where things are
personas.mjs— the entries (rows, colors, glow, mouths, expr, eyes, lines). Single source of truth.FACE-DESIGN.md— the full conventions (grid zones, color keys, eye recipe, visemes). Read it first.tools/img2rows.mjs— rough a reference photo into a 32×32rows+palette.tools/render-png.mjs— render a 7-state contact sheet (PNG) for review. This is the validator.tools/face-template.mjs— copy-me starter entry that encodes the conventions.gallery.html(all personas, original-vs-pixel) andpreview.html?p=<key>(one persona) — served viapython3 -m http.serverortools/serve-wall.mjs; for visual QA.assets/<persona-key>.<ext>— reference photos. Gitignored / local-only — never commit them.
Persona key ≠ agent name. The roster uses agent-file basenames; the face comes from each agent's
face: frontmatter: elon→musk, steve→jobs, rayan→ray (others match). Persona keys:
neon david ray sven garry jobs musk dario mira bernie michelle.
Conventions (condensed — full detail in FACE-DESIGN.md)
- Grid 32×32,
.= transparent, face centered ~col 15. Zones: hair 1–9 · brows 10–11 (drawn byexpr, notrows) · eyes 12–13 (drawn byeyes()) · nose 14–16 · mouth 18–20 (drawn bymouths) · chin 21–24 · collar 26–31. - Color keys: skin
Plight /Smid /sshadow ·Epupil ·W/wcatchlight ·Rlip ·mlip-shadow ·bbrow ·hhair ·Lcyan +Mmagenta = the cotal glow ribbon (glow: { L: 8, M: 6 }blurs them). Userng(row, c1, c2, key)(exported from personas.mjs) for runs. - Eye recipe: 2-wide iris (
E) on the iris row; row below = catchlight (W/w, OUTER corner)- lid-shadow (
s, INNER).jobsis the "alive" benchmark — match its eye, don't use flat black blocks.
- lid-shadow (
- Surprise = raised brows + open mouth, eyes stay
open(growing the iris behind glasses looks wrong). Don't reintroduce awideeye style. - The face renders at a fixed 32×16 (not scaled to the pane), so faces look the same size as long as the pane is ≥ ~32 cols.
Tools (exact)
# rough a reference photo → 32×32 rows + palette (macOS: uses sips)
node tools/img2rows.mjs --in assets/<key>.png --w 24 --h 30 [--colors 12] [--x0 4] [--y0 0]
# render a 7-state contact sheet (neutral·happy·sad·angry·surprised·talking·blink) to review
node tools/render-png.mjs --file <draft>.mjs --out /tmp/<key>.png --scale 8 # draft: export const entry = {…}
node tools/render-png.mjs --file personas.mjs --persona <key> --out /tmp/<key>.png --scale 8 # existing
A draft module must export const entry = {…} and (if it uses rng in expr/mouths)
import { rng } from '/abs/path/examples/04-frontier-faces/personas.mjs'.
After every render, Read the PNG and compare it to assets/<key>.<ext>. Iterate.
Create a new persona
- Pick a
key. If you have a photo, save it asassets/<key>.pngandimg2rowsit for a rough base; otherwise copytools/face-template.mjs. - Hand-edit a
/tmp/<key>-draft.mjs(export const entry) following the conventions above. render-png→ Read the PNG → compare to the reference → iterate until all 7 states read well.- Splice the finished entry into
personas.mjs(keep the file's style; reuse color keys). - Review in the gallery; confirm no other persona changed.
Improve an existing persona
- Read its entry in
personas.mjs+ its referenceassets/<key>.<ext>and the current render. - Edit only the in-scope rows (e.g. hair = rows 1–9). Preserve
eyes(), glasses/beard,expr,mouths,colorsof other features, and the collar/glow — change the minimum. render-pngthe draft → Read → compare → iterate (≥3 passes). Then splice the rows back intopersonas.mjsand confirm the diff is limited to that entry.
Multi-agent variant loop (use for likeness — "doesn't look like them")
When matching a real person, generate options instead of guessing:
- Spawn ~3 subagents on the main working tree (NOT git worktrees —
assets/is gitignored, so reference photos are absent from a fresh worktree). Give each: the reference path, the current entry, the conventions, and a distinct direction. - Each agent writes its OWN
/tmp/<key>-<n>.mjsdraft (never editspersonas.mjs— avoids conflicts), renders it, Reads the PNG, compares to the photo, iterates, and returns the finalrows. - You pick the best, splice it in, review in the gallery. Refine one axis per pass (e.g. head shape, then hair). This is the loop used for garry/musk.
QA bar
- Always review visually — the
render-pngcontact sheet and thegallery.htmloriginal-vs-pixel view — never blind. Judge: does it read / look like the person across all 5 expressions + blink? jobsis the reference standard. Keep faces front-facing/symmetric unless intentional.- Don't commit
assets/(reference photos stay local). Persona edits topersonas.mjsARE committable.
Related skills
UI/UX Pro Max
anthropics
Build production-grade web components and interfaces with distinctive, polished design.
React Native Best Practices
vercel-labs
Build performant React Native apps with optimization and animation guidance.
React View Transitions
vercel-labs
Animate page and component transitions using React's native View Transition API.
UI Design Guidelines Reviewer
vercel-labs
Review UI code for compliance with web interface best practices and accessibility standards.