Desktop Pet Creator
Create pixel-art chibi desktop pet companions for OpenWork's Tauri pet window.
Given any character name, generate a complete pet package with animated spritesheet
and place it in ~/.qwen/pets/ where OpenWork auto-discovers it through the
scoped Tauri asset protocol.
Workflow
Step 1: Identify the Character
Ask the user who they want as their desktop pet if not already specified.
Then research the character's visual appearance:
- Team/organization colors (e.g., McLaren papaya orange, Ferrari red)
- Outfit/uniform (racing suit, school uniform, armor, etc.)
- Distinguishing features (hair color/style, accessories, number, helmet)
- Personality traits (for animation style — energetic, calm, goofy, serious)
- Iconic items (steering wheel, lightsaber, guitar, etc.)
Use web search if needed to gather visual reference. For well-known characters
(F1 drivers, popular anime, etc.), rely on training knowledge.
Step 2: Design the Color Palette
Define 8-12 colors for the character:
| Color Role |
Example (F1 Driver) |
Example (Anime Character) |
| Primary outfit |
Team color (papaya) |
Uniform color (navy) |
| Outfit dark |
Darker shade |
Darker shade |
| Outfit light |
Lighter shade |
Lighter shade |
| Skin |
Warm skin tone |
Skin tone |
| Skin dark |
Shadow skin |
Shadow skin |
| Hair |
Character hair color |
Character hair color |
| Accent |
Number/logo color |
Eye color / accessory |
| Shoe |
Dark grey/black |
Character shoe color |
Important: All colors must be distinct and work at small pixel scale (3x = 9px details).
Step 3: Generate the Spritesheet
Use the template script at scripts/gen_spritesheet.py as a starting point.
The script generates a 1536×1872 pixel RGBA spritesheet (8 columns × 9 rows,
192×208 px cells) — the exact format OpenWork expects.
Run it like this:
python3 <skill_dir>/scripts/gen_spritesheet.py \
--output ~/.qwen/pets/<character_id>/spritesheet.webp \
--config '{"name":"...","colors":{...},"features":{...}}'
Or copy and customize the script for characters that need unique visual elements
not covered by the parameterized version.
The 9 animation rows are:
| Row |
State |
Description |
| 0 |
idle |
Breathing + blinking (8 frames) |
| 1 |
running-right |
Running to the right (8 frames) |
| 2 |
running-left |
Running to the left (8 frames) |
| 3 |
waving |
Waving at user (8 frames) |
| 4 |
jumping |
Jumping celebration (8 frames) |
| 5 |
failed |
Sad/collapsed on error (8 frames) |
| 6 |
waiting |
Idle tapping (8 frames) |
| 7 |
running |
Generic running (8 frames) |
| 8 |
review |
Thinking/examining (8 frames) |
Step 4: Create pet.json
Write the manifest to ~/.qwen/pets/<character_id>/pet.json:
{
"id": "<character_id>",
"displayName": "<Display Name>",
"description": "<Short description — who is this character?>",
"spritesheetPath": "spritesheet.webp"
}
Rules:
id: lowercase, no spaces, URL-safe (e.g., piastri, satoru, goku)
displayName: The name shown in the UI (e.g., "Piastri", "五条悟", "悟空")
description: One short sentence describing the character
Step 5: Verify and Activate
Confirm the files exist:
ls -lh ~/.qwen/pets/<character_id>/
Open the spritesheet in Preview for the user to check:
open ~/.qwen/pets/<character_id>/spritesheet.webp
Tell the user to activate:
Reopen OpenWork → Settings → Appearance → Desktop pet, then select
. Selection opens a live preview.
Character Design Guidelines
Chibi Proportions
- Head: ~40% of total height (big head = cute)
- Body: ~30% of total height
- Legs: ~25% of total height
- Scale: Each "pixel" in the art = 3×3 actual pixels (scale=3)
- Character center: approximately (96, 124) within the 192×208 cell
Drawing Order (back to front)
- Legs (behind body)
- Body / outfit
- Arms
- Head shape
- Hair (back layer)
- Hair (front/top layer)
- Face features (eyes, mouth, expression)
- Accessories (hat, helmet, glasses, etc.)
- Foreground details (number, logo, badge)
Animation Tips
- Idle: subtle Y bob (0 to -2px) + blink every 3rd-4th frame
- Running: alternating leg offset (±4px), body tilt (±2px), arm swing
- Waving: one arm raised high, alternating frames
- Jumping: Y offset curve (0 → -30 → 0), arms up
- Failed: body tilt increases, then collapse to sitting pose
- Happy expression: curved eyes (∧ shape), blush marks on cheeks
- Sad expression: straight eyebrows, downturned mouth
Headgear Variants
The template supports several headgear types. Set via features.headgear:
cap — baseball cap with brim (default for F1 drivers)
helmet — full racing helmet with visor
none — no headgear (just hair)
hat — generic hat
hood — hooded outfit
crown — royal crown
horns — devil/dragon horns
ears — animal ears (cat, dog, etc.)
halo — angel halo
headband — ninja/sports headband
Special Features
Set via features.extras (list):
glasses — round or rectangular glasses
scarf — neck scarf
tail — animal tail
wings — small wings on back
number — chest number (set features.number to the number string)
logo — chest badge/logo area
sweat_drop — anime sweat drop (in waiting/failed states)
Example Characters
F1 Driver (e.g., Piastri, Norris, Verstappen)
{
"colors": {
"outfit": [255, 135, 32],
"outfit_dark": [220, 110, 20],
"outfit_light": [255, 170, 80],
"hair": [120, 80, 40],
"number": [30, 30, 30]
},
"features": {
"headgear": "cap",
"number": "81",
"extras": ["logo"]
}
}
Anime Character (e.g., Gojo Satoru)
{
"colors": {
"outfit": [30, 30, 50],
"outfit_dark": [20, 20, 35],
"outfit_light": [60, 60, 80],
"hair": [230, 230, 250],
"accent": [100, 180, 255]
},
"features": {
"headgear": "none",
"extras": ["glasses"]
}
}
Animal (e.g., Shiba Inu)
{
"colors": {
"outfit": [220, 170, 100],
"outfit_dark": [180, 130, 70],
"outfit_light": [240, 200, 140],
"hair": [220, 170, 100],
"accent": [255, 255, 255]
},
"features": {
"headgear": "ears",
"extras": ["tail"]
}
}
Troubleshooting
- Pet not showing: Reopen Settings → Appearance so OpenWork rescans
~/.qwen/pets/; confirm pet.json points to a file inside the same pet folder
- Colors look wrong: Check that RGB values are tuples, not hex strings
- Spritesheet too large: Must be under 5MB (webp lossless usually ~8-50KB)
- Animation jittery: Ensure all 8 frames per row are visually distinct but not jarring
1---2name: desktop-pet-23description: Create pixel-art desktop pet companions for OpenWork/Qwen Code. Generates a customized chibi spritesheet (1536×1872, 8×9 grid) for any character the user names — F1 drivers, anime characters, celebrities, fictional characters, animals, etc. Use when the user says "桌面宠物", "desktop pet", "想要XXX当桌宠", "换个宠物" or similar.4---56# Desktop Pet Creator78Create pixel-art chibi desktop pet companions for OpenWork's Tauri pet window.9Given any character name, generate a complete pet package with animated spritesheet10and place it in `~/.qwen/pets/` where OpenWork auto-discovers it through the11scoped Tauri asset protocol.1213## Workflow1415### Step 1: Identify the Character1617Ask the user who they want as their desktop pet if not already specified.18Then research the character's visual appearance:1920- **Team/organization colors** (e.g., McLaren papaya orange, Ferrari red)21- **Outfit/uniform** (racing suit, school uniform, armor, etc.)22- **Distinguishing features** (hair color/style, accessories, number, helmet)23- **Personality traits** (for animation style — energetic, calm, goofy, serious)24- **Iconic items** (steering wheel, lightsaber, guitar, etc.)2526Use web search if needed to gather visual reference. For well-known characters27(F1 drivers, popular anime, etc.), rely on training knowledge.2829### Step 2: Design the Color Palette3031Define 8-12 colors for the character:3233| Color Role | Example (F1 Driver) | Example (Anime Character) |34| -------------- | -------------------- | ------------------------- |35| Primary outfit | Team color (papaya) | Uniform color (navy) |36| Outfit dark | Darker shade | Darker shade |37| Outfit light | Lighter shade | Lighter shade |38| Skin | Warm skin tone | Skin tone |39| Skin dark | Shadow skin | Shadow skin |40| Hair | Character hair color | Character hair color |41| Accent | Number/logo color | Eye color / accessory |42| Shoe | Dark grey/black | Character shoe color |4344**Important:** All colors must be distinct and work at small pixel scale (3x = 9px details).4546### Step 3: Generate the Spritesheet4748Use the template script at `scripts/gen_spritesheet.py` as a starting point.49The script generates a **1536×1872 pixel RGBA spritesheet** (8 columns × 9 rows,50192×208 px cells) — the exact format OpenWork expects.5152**Run it like this:**5354```bash55python3 <skill_dir>/scripts/gen_spritesheet.py \56 --output ~/.qwen/pets/<character_id>/spritesheet.webp \57 --config '{"name":"...","colors":{...},"features":{...}}'58```5960Or copy and customize the script for characters that need unique visual elements61not covered by the parameterized version.6263**The 9 animation rows are:**6465| Row | State | Description |66| --- | ------------- | --------------------------------- |67| 0 | idle | Breathing + blinking (8 frames) |68| 1 | running-right | Running to the right (8 frames) |69| 2 | running-left | Running to the left (8 frames) |70| 3 | waving | Waving at user (8 frames) |71| 4 | jumping | Jumping celebration (8 frames) |72| 5 | failed | Sad/collapsed on error (8 frames) |73| 6 | waiting | Idle tapping (8 frames) |74| 7 | running | Generic running (8 frames) |75| 8 | review | Thinking/examining (8 frames) |7677### Step 4: Create pet.json7879Write the manifest to `~/.qwen/pets/<character_id>/pet.json`:8081```json82{83 "id": "<character_id>",84 "displayName": "<Display Name>",85 "description": "<Short description — who is this character?>",86 "spritesheetPath": "spritesheet.webp"87}88```8990Rules:9192- `id`: lowercase, no spaces, URL-safe (e.g., `piastri`, `satoru`, `goku`)93- `displayName`: The name shown in the UI (e.g., "Piastri", "五条悟", "悟空")94- `description`: One short sentence describing the character9596### Step 5: Verify and Activate97981. Confirm the files exist:99100 ```bash101 ls -lh ~/.qwen/pets/<character_id>/102 ```1031042. Open the spritesheet in Preview for the user to check:105106 ```bash107 open ~/.qwen/pets/<character_id>/spritesheet.webp108 ```1091103. Tell the user to activate:111 > Reopen **OpenWork → Settings → Appearance → Desktop pet**, then select112 > **<Display Name>**. Selection opens a live preview.113114## Character Design Guidelines115116### Chibi Proportions117118- **Head**: ~40% of total height (big head = cute)119- **Body**: ~30% of total height120- **Legs**: ~25% of total height121- **Scale**: Each "pixel" in the art = 3×3 actual pixels (scale=3)122- **Character center**: approximately (96, 124) within the 192×208 cell123124### Drawing Order (back to front)1251261. Legs (behind body)1272. Body / outfit1283. Arms1294. Head shape1305. Hair (back layer)1316. Hair (front/top layer)1327. Face features (eyes, mouth, expression)1338. Accessories (hat, helmet, glasses, etc.)1349. Foreground details (number, logo, badge)135136### Animation Tips137138- **Idle**: subtle Y bob (0 to -2px) + blink every 3rd-4th frame139- **Running**: alternating leg offset (±4px), body tilt (±2px), arm swing140- **Waving**: one arm raised high, alternating frames141- **Jumping**: Y offset curve (0 → -30 → 0), arms up142- **Failed**: body tilt increases, then collapse to sitting pose143- **Happy expression**: curved eyes (∧ shape), blush marks on cheeks144- **Sad expression**: straight eyebrows, downturned mouth145146### Headgear Variants147148The template supports several headgear types. Set via `features.headgear`:149150- `cap` — baseball cap with brim (default for F1 drivers)151- `helmet` — full racing helmet with visor152- `none` — no headgear (just hair)153- `hat` — generic hat154- `hood` — hooded outfit155- `crown` — royal crown156- `horns` — devil/dragon horns157- `ears` — animal ears (cat, dog, etc.)158- `halo` — angel halo159- `headband` — ninja/sports headband160161### Special Features162163Set via `features.extras` (list):164165- `glasses` — round or rectangular glasses166- `scarf` — neck scarf167- `tail` — animal tail168- `wings` — small wings on back169- `number` — chest number (set `features.number` to the number string)170- `logo` — chest badge/logo area171- `sweat_drop` — anime sweat drop (in waiting/failed states)172173## Example Characters174175### F1 Driver (e.g., Piastri, Norris, Verstappen)176177```json178{179 "colors": {180 "outfit": [255, 135, 32],181 "outfit_dark": [220, 110, 20],182 "outfit_light": [255, 170, 80],183 "hair": [120, 80, 40],184 "number": [30, 30, 30]185 },186 "features": {187 "headgear": "cap",188 "number": "81",189 "extras": ["logo"]190 }191}192```193194### Anime Character (e.g., Gojo Satoru)195196```json197{198 "colors": {199 "outfit": [30, 30, 50],200 "outfit_dark": [20, 20, 35],201 "outfit_light": [60, 60, 80],202 "hair": [230, 230, 250],203 "accent": [100, 180, 255]204 },205 "features": {206 "headgear": "none",207 "extras": ["glasses"]208 }209}210```211212### Animal (e.g., Shiba Inu)213214```json215{216 "colors": {217 "outfit": [220, 170, 100],218 "outfit_dark": [180, 130, 70],219 "outfit_light": [240, 200, 140],220 "hair": [220, 170, 100],221 "accent": [255, 255, 255]222 },223 "features": {224 "headgear": "ears",225 "extras": ["tail"]226 }227}228```229230## Troubleshooting231232- **Pet not showing**: Reopen Settings → Appearance so OpenWork rescans233 `~/.qwen/pets/`; confirm `pet.json` points to a file inside the same pet folder234- **Colors look wrong**: Check that RGB values are tuples, not hex strings235- **Spritesheet too large**: Must be under 5MB (webp lossless usually ~8-50KB)236- **Animation jittery**: Ensure all 8 frames per row are visually distinct but not jarring