How to make a Codex Pet
Three ways in, from 10 seconds to a weekend.
1. Use a built-in pet 10 sec
Type /pet in the Codex composer, or open Settings → Appearance → Pets. From there you can wake, hide or refresh pets.
2. Hatch one with the hatch-pet skill 5 min
- Install the skill:
$skill-installer hatch-pet - Reload skills: open the command menu (⌘K on Mac, CtrlK on Windows) and choose Force Reload Skills.
- Ask for a pet:
or$hatch-pet create a tiny desk goblin$hatch-pet turn my dog into a Codex pet.
The skill draws the animation rows, assembles the sheet, validates it, makes previews and packages the folder for you.
3. Make one by hand a weekend
Design one character
Full body, front facing, readable at about 100 px tall. Use a small palette and a bold outline. Keep the same species, markings, colours and props in every frame: drift between frames is the most common reason a pet looks wrong.
Animate 9 rows
idle (6 frames), running-right (8), running-left (8), waving (4), jumping (5), failed (8), waiting (6), running (6), review (6). See states.txt for what each one means.
Assemble the atlas
1536 × 1872 px, 8 columns × 9 rows, each cell 192 × 208 px. Transparent background. Leave unused cells fully transparent. No grid lines, labels, gutters or drop shadows: the app slices the sheet by math, so anything extra shows up on screen. Save as spritesheet.webp (PNG also works).
Write pet.json
{
"id": "desk-goblin",
"displayName": "Desk Goblin",
"description": "A tiny goblin who guards your terminal.",
"spritesheetPath": "spritesheet.webp"
}
Or build it with the pet.json maker.
Install it
Make a folder named after your pet and put both files in it:
# macOS / Linux
mkdir -p ~/.codex/pets/desk-goblin
cp pet.json spritesheet.webp ~/.codex/pets/desk-goblin/
# Windows (PowerShell)
mkdir $env:USERPROFILE\.codex\pets\desk-goblin
copy pet.json, spritesheet.webp $env:USERPROFILE\.codex\pets\desk-goblin\
If you set CODEX_HOME, use $CODEX_HOME/pets/ instead. Then open Settings → Pets, press Refresh (or restart Codex) and pick your pet.
Common mistakes
- Sheet is not exactly 1536 × 1872 (or 1536 × 2288 for v2).
- Grid lines, labels or a coloured background left in the export.
- Folder name and
iddon't match. Keep them the same. - Only one of the two files is in the folder.
- Soft, blurry AI edges. Clean them up so every pixel is either solid or transparent.
- Character changes between frames (new colours, missing tail, different size).
Good tools
- Aseprite: the standard paid pixel editor, with animation timelines.
- Pixelorama and LibreSprite: free and open source.
- Piskel: free, runs in the browser.
- AI image tools are fine for a first draft. Always clean up the result by hand.
- Then run it through our spritesheet checker.