.qwen/skills/desktop-pet/SKILL.md
Create pixel-art chibi desktop pet companions for Qwen Code's floating pet window.
Given any character name, generate a complete pet package with animated spritesheet
and place it in ~/.qwen/pets/ where Qwen Code auto-discovers it.
pip3 install Pillow). Check before running the script:python3 -c "from PIL import Image; print('OK')" 2>/dev/null || echo "Pillow not installed — run: pip3 install Pillow"
Ask the user who they want as their desktop pet if not already specified. Then research the character's visual appearance:
Use web search if needed. For well-known characters (F1 drivers, popular anime, etc.), rely on training knowledge.
Define 8–12 colors for the character. All colors must be distinct and work at small pixel scale (3× = 9 px details).
| Color Role | Example (F1 Driver) | Example (Anime) |
|---|---|---|
outfit | Team color [255,135,32] | Uniform [30,30,50] |
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 |
shoe | Dark grey/black | Shoe color |
Run the generation script. Always resolve the path relative to the skill's base directory:
python3 <skill_dir>/scripts/gen_spritesheet.py \
--output ~/.qwen/pets/<character_id>/spritesheet.webp \
--config '{"colors":{...},"features":{...}}'
Atlas format: 1536×1872 px, RGBA, 8 cols × 9 rows, 192×208 px cells.
Animation rows:
| 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) |
pet.jsonWrite 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 characterls -lh ~/.qwen/pets/<character_id>/
open ~/.qwen/pets/<character_id>/spritesheet.webp
features.headgear)cap · helmet · hat · hood · crown · horns · ears · halo · headband · none
features.hair_style)short · long · spiky · ponytail · bald
features.extras list)glasses · scarf · tail · wings · number (set features.number) · logo · sweat_drop
{
"colors": {
"outfit": [255, 135, 32],
"outfit_dark": [220, 110, 20],
"outfit_light": [255, 170, 80],
"hair": [120, 80, 40],
"accent": [30, 30, 30]
},
"features": {
"headgear": "cap",
"number": "81",
"extras": ["logo"]
}
}
{
"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",
"hair_style": "spiky",
"extras": ["glasses"]
}
}
{
"colors": {
"outfit": [220, 170, 100],
"outfit_dark": [180, 130, 70],
"outfit_light": [240, 200, 140],
"hair": [220, 170, 100]
},
"features": {
"headgear": "ears",
"extras": ["tail"]
}
}