pixellab-api
Skill5 starsChanged 19 days agoMITView on GitHub
Generate pixel art assets via the PixelLab REST API v2 — animations, UI elements, sprites, and image editing. Complements the pixellab MCP server with endpoints not available through MCP. Triggers on: "animate a sprite", "generate pixel-art UI", "rotate/edit a sprite", or when a PixelLab task needs the REST API rather than MCP.
- Reads credentials
In this repository19 other files it gives its agents.
- code-reviewSkill
- context-guardSkill
- graylog-searchSkill
- html-slide-deckSkill
- image-generationSkill
- implement-specSkill
- jiraSkill
- lighthouseSkill
- mac-maintenanceSkill
- mysql-schema-designSkill
- phaser-gamedevSkill
- pixelart-cleanupSkill
- pixellabSkill
- product-hunt-launchSkill
- promo-videoSkill
- publish-report-artifactSkill
- seo-blogSkill
- seo-optimizationSkill
- usage-statuslineSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
Add to project .env: PIXELLAB_API_KEY=your-token
- Distinctive: line 216
Seed parameter: not exposed in helper yet — edit script if you need reproducibility
- Distinctive: line 217
Asset format: all output is PNG with transparency
- Distinctive: line 218
Animate best practice: use the "south" facing idle frame as first_frame for best results
- Very specific: line 219
Always outline: "lineless" preference — matches PixelDen art style
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PixelLab API v2 — Direct Pixel Art Generation
Generate pixel art assets via PixelLab REST API v2 — animations, UI elements, sprites, editing, and more. Complements the PixelLab MCP server with endpoints not available through MCP.
When to use this skill
| Need | Tool |
| Animate existing sprite (walk/attack/idle) | pixellab.sh animate |
| Generate UI elements (buttons, bars, frames) | pixellab.sh generate-ui |
| General pixel art from text description | pixellab.sh generate |
| Match style of existing game assets | pixellab.sh style |
| Edit/modify existing sprite with text | pixellab.sh edit |
| Remove sprite background | pixellab.sh remove-bg |
| Rotate sprite to different direction | pixellab.sh rotate |
| Smart pixel-art resize | pixellab.sh resize |
Use PixelLab MCP instead for: characters with directional views, Wang tilesets, sidescroller tilesets, map objects.
Setup
- Get API key from https://pixellab.ai/account
- Add to project
.env:PIXELLAB_API_KEY=your-token - Copy
tools/pixellab.shto your project'sscripts/directory - Make executable:
chmod +x scripts/pixellab.sh
Reference Files
| Topic | Reference |
| Full endpoint docs | api-v2-endpoints.md |
| Workflow examples | workflows.md |
Tool: scripts/pixellab.sh
Helper script that wraps all PixelLab API v2 endpoints. Reads PIXELLAB_API_KEY from .env.
Handles base64 encoding, async job polling, and saves output PNGs automatically.
Commands
# Animate a static sprite (SYNC — most useful for game dev)
./scripts/pixellab.sh animate <sprite.png> "<action>" [frame_count] [outdir]
# Generate pixel art from text (ASYNC — polls automatically)
./scripts/pixellab.sh generate "<description>" [WxH] [outdir]
# Generate UI elements (ASYNC)
./scripts/pixellab.sh generate-ui "<description>" [WxH] [palette] [outdir]
# Edit existing sprite (ASYNC)
./scripts/pixellab.sh edit <sprite.png> "<description>" [outdir]
# Generate matching style (ASYNC)
./scripts/pixellab.sh style <ref-sprite.png> "<description>" [WxH] [outdir]
# Rotate sprite direction (SYNC)
./scripts/pixellab.sh rotate <sprite.png> <from-dir> <to-dir> [outpath]
# Smart resize (SYNC)
./scripts/pixellab.sh resize <sprite.png> <WxH> [description] [outpath]
# Remove background (SYNC)
./scripts/pixellab.sh remove-bg <sprite.png> [outpath]
# Poll async job manually
./scripts/pixellab.sh poll <job-id> [outdir]Quick Examples
Animate existing character sprite
# 8-frame walk animation from static south-facing sprite
./scripts/pixellab.sh animate public/assets/games/frost-hold/player-south.png \
"walking forward" 8
# Attack animation
./scripts/pixellab.sh animate public/assets/games/frost-hold/player-south.png \
"attacking with sword, slash animation" 8
# Casting spell
./scripts/pixellab.sh animate public/assets/games/frost-hold/player-south.png \
"casting ice spell, magical frost blast" 8Output: public/assets/test-api/animate-player-south/frame-{0..7}.png
Generate UI elements
# Button states
./scripts/pixellab.sh generate-ui \
"pixel art medieval stone button with gold trim, normal and pressed states side by side" \
256x128 "brown and gold"
# Health bar frame
./scripts/pixellab.sh generate-ui \
"pixel art health bar frame, ornate metal border, empty inside, horizontal" \
256x64 "red and silver"
# Inventory slot
./scripts/pixellab.sh generate-ui \
"pixel art inventory grid slot, dark stone background, subtle border" \
64x64 "dark grey and brown"Generate game items / icons
# Multiple icon variants (64x64 generates 16 results)
./scripts/pixellab.sh generate "pixel art golden trophy cup, game achievement icon" 64x64
# Weapon sprites
./scripts/pixellab.sh generate "pixel art flaming sword, fantasy RPG weapon" 64x64Style-matched generation
# Generate new enemy matching existing game style
./scripts/pixellab.sh style \
public/assets/games/frost-hold/player-south.png \
"ice goblin enemy, aggressive stance" 48x48Rotate missing directions
# Generate east-facing from south-facing
./scripts/pixellab.sh rotate \
public/assets/games/crystal-td/golem.png south east
# Generate north-facing
./scripts/pixellab.sh rotate \
public/assets/games/crystal-td/golem.png south northEdit existing sprite
# Add equipment to character
./scripts/pixellab.sh edit player.png "add a red cape and iron helmet"
# Recolor
./scripts/pixellab.sh edit enemy.png "change color to ice blue, frost theme"Sync vs Async Endpoints
| Command | Type | Wait time |
animate | Sync | 10-30s (returns directly) |
rotate | Sync | 5-15s |
resize | Sync | 5-15s |
remove-bg | Sync | 5-10s |
generate | Async | 30-90s (auto-polls) |
generate-ui | Async | 30-90s (auto-polls) |
edit | Async | 30-90s (auto-polls) |
style | Async | 30-90s (auto-polls) |
Async commands poll every 10s with a 120s timeout. Use poll command to resume if needed.
Output Behavior
- Sync commands: save directly to output path
- Async commands: poll until complete, then save all result images
- Default output:
public/assets/test-api/<command>-<name>/ - Custom output: pass outdir/outpath as last argument
- Multiple results: generate/generate-ui often return multiple variants (4-64 depending on size)
Image Size → Result Count (generate/generate-ui)
| Max dimension | Results |
| ≤42px | 64 images |
| 43-85px | 16 images |
| 86-170px | 4 images |
| >170px | 1 image |
Animation Frame Guidelines
| Frames | Best for |
| 4 | Simple loops (idle breathing, bobbing) |
| 8 | Standard movement (walk, run) |
| 12-16 | Complex actions (attack combos, spell casting) |
Frame count must be even. Max 256x256 per frame. Pixel budget: width x height x frames ≤ 524,288.
Tips
- Describe actions, not poses: "walking forward" > "left foot forward right foot back"
no_background: trueis always set by the helper — sprites come transparent- Seed parameter: not exposed in helper yet — edit script if you need reproducibility
- Asset format: all output is PNG with transparency
- Animate best practice: use the "south" facing idle frame as first_frame for best results
- Always
outline: "lineless"preference — matches PixelDen art style
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

