Create Game Assets Skill
When to Use This Skill
- User asks to generate game assets, sprites, or game art
- User wants to create UI icons, character sprites, backgrounds, or tilesets
- User mentions DALL-E or AI image generation for games
- User has a YAML asset specification file
Prerequisites
OPENAI_API_KEY environment variable must be set
- Node.js installed
- Run
npm install in the skill folder first
How It Works
- Ask user what game assets they need (characters, items, backgrounds, style)
- Create an
assets.yaml specification file based on their requirements
- Review the spec with
--dry-run to preview prompts
- Run the generator to create images via DALL-E 3
- Images are saved organized by type with metadata
Procedure
# Navigate to the skill script
cd ~/projects/ai-tools/skills/create-game-assets
# Install dependencies (first time only)
npm install
# Preview what will be generated
npx tsx src/index.ts --spec /path/to/assets.yaml --dry-run
# Generate the assets
npx tsx src/index.ts --spec /path/to/assets.yaml --output /path/to/output
Asset Specification Format
Create a YAML file like this:
project: my-game
style: pixel-art-16bit # or: hand-drawn, vector, 3d-render, realistic
outputDir: ./assets
assets:
- type: character
name: player
description: "Knight in silver armor, front view"
size: 1024x1024
variants: 2
- type: ui-icon
name: health-potion
description: "Red potion in glass bottle"
- type: background
name: forest
description: "Magical forest with glowing mushrooms"
size: 1792x1024
Asset Types
character - Players, NPCs, enemies (centered, full body)
ui-icon - Inventory items, buttons, status icons
background - Level backgrounds, title screens
tileset - Seamless tiles for game maps
Style Presets
pixel-art-16bit - Retro 16-bit pixel art
hand-drawn - Illustrated sketch style
vector - Clean flat vector graphics
3d-render - 3D rendered with soft lighting
realistic - Photorealistic textures
Output
outputDir/
├── characters/
│ ├── player-1.png
│ └── player.meta.json
├── ui-icons/
│ └── health-potion.png
└── manifest.json
Examples
User: "Generate pixel art sprites for my platformer game"
Expected behavior:
- Ask what assets they need (characters, enemies, items, backgrounds)
- Ask about art style preference (pixel-art-16bit, hand-drawn, vector, etc.)
- Ask for descriptions of each asset
- Create
assets.yaml with all specifications
- Run dry-run to preview prompts
- Generate images after user approval
User: "I need a knight character, slime enemy, and health potion for my RPG"
Expected behavior:
- Ask about preferred style
- Create
assets.yaml:
project: rpg-game
style: pixel-art-16bit
outputDir: ./assets
assets:
- type: character
name: knight
description: "Knight in silver armor with sword and shield, heroic pose"
size: 1024x1024
variants: 2
- type: character
name: slime-enemy
description: "Green slime monster with angry expression"
size: 1024x1024
- type: ui-icon
name: health-potion
description: "Red healing potion in glass bottle"
size: 1024x1024
- Show dry-run preview
- Generate after approval
User: "Use create-game-assets to generate assets from my spec.yaml"
Expected behavior:
- Read the existing spec.yaml file
- Show dry-run preview
- Generate images to specified output directory
1---2name: create-game-assets3description: Generate game assets (sprites, UI icons, backgrounds, tilesets) using DALL-E 3 from a YAML specification file. Use when user asks to create game art, generate sprites, or make game graphics.4---5
6# Create Game Assets Skill
7
8## When to Use This Skill
9
10- User asks to generate game assets, sprites, or game art
11- User wants to create UI icons, character sprites, backgrounds, or tilesets
12- User mentions DALL-E or AI image generation for games
13- User has a YAML asset specification file
14
15## Prerequisites
16
17- `OPENAI_API_KEY` environment variable must be set
18- Node.js installed
19- Run `npm install` in the skill folder first
20
21## How It Works
22
231. Ask user what game assets they need (characters, items, backgrounds, style)
242. Create an `assets.yaml` specification file based on their requirements
253. Review the spec with `--dry-run` to preview prompts
264. Run the generator to create images via DALL-E 3
275. Images are saved organized by type with metadata
28
29## Procedure
30
31```bash
32# Navigate to the skill script
33cd ~/projects/ai-tools/skills/create-game-assets
34
35# Install dependencies (first time only)
36npm install
37
38# Preview what will be generated
39npx tsx src/index.ts --spec /path/to/assets.yaml --dry-run
40
41# Generate the assets
42npx tsx src/index.ts --spec /path/to/assets.yaml --output /path/to/output
43```
44
45## Asset Specification Format
46
47Create a YAML file like this:
48
49```yaml
50project: my-game
51style: pixel-art-16bit # or: hand-drawn, vector, 3d-render, realistic
52outputDir: ./assets
53
54assets:
55 - type: character
56 name: player
57 description: "Knight in silver armor, front view"
58 size: 1024x1024
59 variants: 2
60
61 - type: ui-icon
62 name: health-potion
63 description: "Red potion in glass bottle"
64
65 - type: background
66 name: forest
67 description: "Magical forest with glowing mushrooms"
68 size: 1792x1024
69```
70
71## Asset Types
72
73- `character` - Players, NPCs, enemies (centered, full body)
74- `ui-icon` - Inventory items, buttons, status icons
75- `background` - Level backgrounds, title screens
76- `tileset` - Seamless tiles for game maps
77
78## Style Presets
79
80- `pixel-art-16bit` - Retro 16-bit pixel art
81- `hand-drawn` - Illustrated sketch style
82- `vector` - Clean flat vector graphics
83- `3d-render` - 3D rendered with soft lighting
84- `realistic` - Photorealistic textures
85
86## Output
87
88```
89outputDir/
90├── characters/
91│ ├── player-1.png
92│ └── player.meta.json
93├── ui-icons/
94│ └── health-potion.png
95└── manifest.json
96```
97
98## Examples
99
100**User**: "Generate pixel art sprites for my platformer game"
101
102**Expected behavior**:
1031. Ask what assets they need (characters, enemies, items, backgrounds)
1042. Ask about art style preference (pixel-art-16bit, hand-drawn, vector, etc.)
1053. Ask for descriptions of each asset
1064. Create `assets.yaml` with all specifications
1075. Run dry-run to preview prompts
1086. Generate images after user approval
109
110**User**: "I need a knight character, slime enemy, and health potion for my RPG"
111
112**Expected behavior**:
1131. Ask about preferred style
1142. Create `assets.yaml`:
115```yaml
116project: rpg-game
117style: pixel-art-16bit
118outputDir: ./assets
119
120assets:
121 - type: character
122 name: knight
123 description: "Knight in silver armor with sword and shield, heroic pose"
124 size: 1024x1024
125 variants: 2
126
127 - type: character
128 name: slime-enemy
129 description: "Green slime monster with angry expression"
130 size: 1024x1024
131
132 - type: ui-icon
133 name: health-potion
134 description: "Red healing potion in glass bottle"
135 size: 1024x1024
136```
1373. Show dry-run preview
1384. Generate after approval
139
140**User**: "Use create-game-assets to generate assets from my spec.yaml"
141
142**Expected behavior**:
1431. Read the existing spec.yaml file
1442. Show dry-run preview
1453. Generate images to specified output directory