agentleFS
freemafreema/ai-skills/skills/pixellab-api/SKILL.md

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

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
  1. Very specific:

    Add to project .env: PIXELLAB_API_KEY=your-token

    line 33
  2. Distinctive:

    Seed parameter: not exposed in helper yet — edit script if you need reproducibility

    line 216
  3. Distinctive:

    Asset format: all output is PNG with transparency

    line 217
  4. Distinctive:

    Animate best practice: use the "south" facing idle frame as first_frame for best results

    line 218
  5. Very specific:

    Always outline: "lineless" preference — matches PixelDen art style

    line 219

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

NeedTool
Animate existing sprite (walk/attack/idle)pixellab.sh animate
Generate UI elements (buttons, bars, frames)pixellab.sh generate-ui
General pixel art from text descriptionpixellab.sh generate
Match style of existing game assetspixellab.sh style
Edit/modify existing sprite with textpixellab.sh edit
Remove sprite backgroundpixellab.sh remove-bg
Rotate sprite to different directionpixellab.sh rotate
Smart pixel-art resizepixellab.sh resize

Use PixelLab MCP instead for: characters with directional views, Wang tilesets, sidescroller tilesets, map objects.

Setup

  1. Get API key from https://pixellab.ai/account
  2. Add to project .env: PIXELLAB_API_KEY=your-token
  3. Copy tools/pixellab.sh to your project's scripts/ directory
  4. Make executable: chmod +x scripts/pixellab.sh

Reference Files

TopicReference
Full endpoint docsapi-v2-endpoints.md
Workflow examplesworkflows.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" 8

Output: 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" 64x64

Style-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" 48x48

Rotate 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 north

Edit 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

CommandTypeWait time
animateSync10-30s (returns directly)
rotateSync5-15s
resizeSync5-15s
remove-bgSync5-10s
generateAsync30-90s (auto-polls)
generate-uiAsync30-90s (auto-polls)
editAsync30-90s (auto-polls)
styleAsync30-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 dimensionResults
≤42px64 images
43-85px16 images
86-170px4 images
>170px1 image

Animation Frame Guidelines

FramesBest for
4Simple loops (idle breathing, bobbing)
8Standard movement (walk, run)
12-16Complex 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: true is 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.