Skip to main content
skill CX Codex

add-assets — Claude Code skill: pixel art sprites for Phaser

Swaps the circles and rectangles in a 2D game for pixel art sprites of characters, enemies and items. Useful once the prototype plays fine but looks like a wireframe.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add PlayableIntelligence/game-creator --skill add-assets -a claude-code
Open on GitHub

What add-assets does

The skill walks a Phaser project looking for anything that draws entities as geometry: generateTexture(), fillCircle(), fillRect(), fillEllipse(), plus shapes drawn inline in scenes. It then presents a table of planned sprites — entity, archetype, grid, frame count — and only after that writes code.

Sprites are generated in code, so no external image files are involved. You get src/core/PixelRenderer.js with renderPixelArt() and renderSpriteSheet(), a shared palette in src/sprites/palette.js, and sprite data files: player.js, enemies.js, items.js, and projectiles.js when the game has them. Grids run from 8x8 for tiny pickups to 32x48 for named personalities, and the palette is picked to match the game's existing scheme — DARK, BRIGHT or RETRO.

This one is Phaser-focused, so a Three.js project needs add-3d-assets instead, and gameplay work belongs to add-feature. After the swap, check your physics: if a sprite is a different size than the shape it replaced, the hitbox needs setCircle() or setSize(), otherwise collisions start lying to you.

What it helps with

  • get geometric shapes out of a playable prototype
  • give every enemy and pickup a distinct look
  • add a walk animation without sourcing art
  • turn a named personality into the player character
  • fix hitboxes after sprite sizes change

Example prompts for the agent

  • /add-assets examples/asteroid-dodge
  • /add-assets examples/nick-land-dodger
  • replace the shapes with real art in this project

How to install add-assets

1Skills CLI (Vercel)

npx skills add PlayableIntelligence/game-creator --skill add-assets -a claude-code

2Manually: put the files in place

~/.claude/skills/add-assets/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/add-assets/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about add-assets

How do I install add-assets in Claude Code?

Run npx skills add PlayableIntelligence/game-creator --skill add-assets -a claude-code. The skill lands in ~/.claude/skills/add-assets/SKILL.md.

What does add-assets do?

It finds entities drawn as geometric shapes and replaces them with code-generated pixel art sprites. Characters, enemies and items each get their own visual identity, with animation where frames are needed.

Does it work for 3D games?

No. It targets Phaser; 3D models go through add-3d-assets, and gameplay changes through add-feature.

Source text

SKILL.md · MIT
---
name: add-assets
description: Replace geometric shapes with pixel art sprites — recognizable characters, enemies, and items with optional animation. Use when the user says "add sprites", "replace the shapes with real art", "add pixel art", "make the characters look real", or "add game assets". For 3D games, use add-3d-assets instead. Do NOT use for 3D models (use add-3d-assets) or gameplay changes (use add-feature).
argument-hint: "[path-to-game]"
license: MIT
metadata:
  author: OpusGameLabs
  version: 1.3.0
  tags: [game, assets, sprites, pixel-art, characters, 2d]
---

## Performance Notes

- Take your time to do this thoroughly
- Quality is more important than speed
- Do not skip validation steps

# Add Assets

Replace basic geometric shapes (circles, rectangles) with pixel art sprites for all game entities. Every character, enemy, item, and projectile gets a recognizable visual identity — all generated as code, no external image files needed.

## Instructions

Analyze the game at `$ARGUMENTS` (or the current directory if no path given).

First, load the game-assets skill to get the full pixel art system, archetypes, and integration patterns.

### Step 1: Audit

- Read `package.json` to identify the engine (Phaser or Three.js — this skill is Phaser-focused)
- Read `src/core/Constants.js` to understand entity types, colors, and sizes
- Read all entity files (`src/entities/*.js`) and find every `generateTexture()`, `fillCircle()`, `fillRect()`, or `fillEllipse()` call that creates an entity sprite
- Read scene files to check for inline shape drawing used as game entities
- List every entity that currently uses geometric shapes

### Step 2: Plan

Present a table of sprites to create:

| Entity | Archetype | Grid | Frames | Description |
|--------|-----------|------|--------|-------------|
| Player (personality) | Personality | 32x48 | 1-4 | Caricature of [name], scale 4 |
| Player (generic) | Humanoid | 16x16 | 4 | ... |
| Enemy X | Flying | 16x16 | 2 | ... |
| Pickup | Item | 8x8 | 1 | ... |

If the game features a real person or named personality, default to the **Personality** archetype for the player character. This uses a 32x48 grid at scale 4 (128x192px rendered, ~35% of canvas height) — large enough to recognize the personality at a glance.

Choose the palette that best matches the game's existing color scheme:
- **DARK** — gothic, horror, dark fantasy
- **BRIGHT** — arcade, platformer, casual
- **RETRO** — NES-style, muted tones

Grid sizes range from 8x8 (tiny pickups) through 16x16 (standard entities) to 32x48 (personality characters). Named characters always use the Personality archetype to ensure the meme hook — recognizing the person — lands immediately.

### Step 3: Implement

1. Create `src/core/PixelRenderer.js` — the `renderPixelArt()` and `renderSpriteSheet()` utility functions
2. Create `src/sprites/palette.js` — the shared color palette
3. Create sprite data files in `src/sprites/`:
   - `player.js` — player idle + walk frames
   - `enemies.js` — all enemy type sprites and frames
   - `items.js` — pickups, gems, hearts, etc.
   - `projectiles.js` — bullets, fireballs, bolts (if applicable)
4. Update each entity constructor:
   - Replace `fillCircle()` / `generateTexture()` with `renderPixelArt()` or `renderSpriteSheet()`
   - Add Phaser animations for entities with multiple frames
   - Adjust physics body dimensions if sprite size changed (`setCircle()` or `setSize()`)
5. For static items (gems, pickups), add a bob tween if not already present

### Step 4: Verify

- Run `npm run build` to confirm no errors
- Check that collision detection still works (physics bodies may need size adjustments)
- List all files created and modified
- Remind the user to run the game and check visuals
- Suggest running `/game-creator:qa-game` to update visual regression snapshots since all entities look different now

## Example Usage

### Standard game
```
/add-assets examples/asteroid-dodge
```
Result: Audits all entities using geometric shapes → creates `src/sprites/` with player, asteroids, and gem pixel art → replaces `fillCircle()`/`fillRect()` with `renderPixelArt()` → collision bounds adjusted.

### Personality game (from tweet)
```
/add-assets examples/nick-land-dodger
```
Result: Detects named personality → uses 32x48 Personality archetype at scale 4 → recognizable caricature as player character → enemies and items get themed pixel art.

## Troubleshooting

### Sprites appear but are wrong size
**Cause:** Pixel art dimensions don't match original hitbox.
**Fix:** Keep sprite dimensions close to the original fillRect/fillCircle size. Adjust collision bounds if needed.

### Sprites don't appear
**Cause:** Canvas texture not created before first render frame.
**Fix:** Generate textures in scene preload() or create(), not in update().

## Next Step

Tell the user:

> Your game entities now have pixel art sprites instead of geometric shapes! Each character, enemy, and item has a distinct visual identity.
>
> **Files created:**
> - `src/core/PixelRenderer.js` — rendering engine
> - `src/sprites/palette.js` — shared color palette
> - `src/sprites/player.js`, `enemies.js`, `items.js` — sprite data
>
> Run the game to see the new visuals. If you have Playwright tests, run `/game-creator:qa-game` to update the visual regression snapshots.

© OpusGameLabs · MIT · PlayableIntelligence/game-creator

Similar skills

Everything for Game dev and 3D: Unity, Unreal, Godot, Blender →

From the same set27

game-qa A skill that turns the agent into a QA engineer for browser games: visual regression, gameplay checks, performance and accessibility via Playwright. Useful when writing or debugging game tests. CX Codex +1 1,100installs game-3d-assets Finds, generates, and integrates GLB/GLTF models into Three.js browser games to replace primitive cubes and spheres. CX Codex +1 1,100installs threejs-game Locks in a project layout and four core modules for building 3D browser games with Three.js. Useful when the agent scaffolds a scene and game loop from scratch. CX Codex +1 1,100installs add-audio This skill adds background music and sound effects to a browser game using the Web Audio API. No audio files, no npm packages — everything is synthesized in the browser. CX Codex +1 1,000installs add-feature Adds gameplay mechanics to Three.js or Phaser browser games. It helps implement power-ups, combo systems, or double jumps while keeping the core architecture intact. CX Codex +1 977installs review-game Audits an existing game project for architecture, performance, code quality and monetization readiness. Read-only, no edits. CX Codex +1 954installs add-3d-assets Swaps primitives like BoxGeometry for actual GLB models: animated characters, houses, trees, barrels. Useful when your Three.js game still looks like a pile of boxes. CX Codex +1 938installs qa-game Sets up Playwright automated tests for web games, covering boot sequences, scene transitions, visual regressions, and FPS. Useful for verifying game mechanics without manual runs. CX Codex +1 931installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor