agentleFS
ervarezaervareza/agent-skill-pixel-art/skills/pixel-art/SKILL.md

pixel-art

Skill11 starsChanged 4 months agoMITView on GitHub

Use this skill whenever the user wants to create, edit, audit, or export 2D pixel art assets. This includes: generating sprite sheets, character walk cycles, tilesets, autotile maps, UI elements, particle effects, isometric art, or any retro-style low-resolution raster graphics. Triggers include: any mention of 'pixel art', 'sprite', 'tileset', 'autotile', '16x16', '32x32', 'retro game art', 'game sprites', 'sprite sheet', 'palette', 'NES colors', 'PICO-8', 'GameBoy palette', 'isometric', 'particle effect', 'pixel UI', or requests to produce game-ready PNG assets with strict color limits and no anti-aliasing. Also use when auditing existing pixel art for quality issues (orphan pixels, semi-transparent artifacts, palette violations), resizing sprites, extracting palettes, mirroring frames, adding outlines, generating noise textures, creating dithered gradients, or exporting animated GIFs. Do NOT use for vector art, SVG illustrations, 3D models, photo editing, or high-resolution digital painting.

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use auto-review-loop-minimax, idea-discovery-robot and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Yusong-EnceladusSkill

    auto-review-loop-minimax

    Autonomous multi-round research review loop using MiniMax API. Use when you want to use MiniMax instead of Codex MCP for external review. Trigger with "auto review loop minimax" or "minimax review".

    Also in 3 projects that use this

  • Yusong-EnceladusSkill

    idea-discovery-robot

    Workflow 1 adaptation for robotics and embodied AI. Orchestrates robotics-aware literature survey, idea generation, novelty check, and critical review to go from a broad robotics direction to benchmark-grounded, simulation-first ideas. Use when user says \"robotics idea discovery\", \"机器人找idea\", \"embodied AI idea\", \"机器人方向探索\", \"sim2real 选题\", or wants ideas for manipulation, locomotion, navigation, drones, humanoids, or general robot learning.

    Also in 3 projects that use this

  • +10 more from Yusong-Enceladus

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 8 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create game-ready 2D pixel art assets — sprites, tilesets, autotiles, UI elements, particle effects, and isometric art — with strict …

    line 9
  2. Distinctive:

    Before generating ANY pixel art, select a style preset.

    line 48
  3. Distinctive:

    No preference → Default Modern Pixel at 32×32

    line 66
  4. Distinctive:

    Pixel-perfect: Every pixel is intentional.

    line 74
  5. Distinctive:

    Palette adherence: Every pixel color MUST be from the declared palette

    line 75
  6. Distinctive:

    Use value noise with cosine interpolation for natural color variation:

    line 145
  7. Very specific:

    Use modulo coordinates: img.putpixel((x % W, y % H), color)

    line 162
  8. Distinctive:

    Test: Place 2×2 instances side-by-side.

    line 164
  9. Very specific:

    Import PNGs with Texture2D filter mode set to Nearest

    line 377
  10. Very specific:

    Use AnimatedSprite2D with atlas from atlas_pack.py JSON metadata

    line 378
  11. Distinctive:

    Import atlas JSON metadata as tile source

    line 388
  12. Very specific:

    Use go.property for palette switching at runtime

    line 389
  13. Very specific:

    Use atlas_pack.py with --cols 3 for RPG Maker format

    line 394

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “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

2D Pixel Art Asset Creation

Create game-ready 2D pixel art assets — sprites, tilesets, autotiles, UI elements, particle effects, and isometric art — with strict pixel-grid alignment, palette enforcement, quality auditing, and game engine export.

Core Pipeline: Design Brief → Style Selection → Spec Lock → Generate Assets → Quality Audit → Post-process → Pack & Export

[!CAUTION]

🚨 Global Execution Discipline (MANDATORY)

  1. PALETTE FIRST — Select or extract a palette BEFORE generating any pixel. Every pixel MUST use only colors from the locked palette.
  2. SPEC LOCK RE-READ — Before generating EACH asset, re-read the palette and size constraints. AI memory drifts during long sessions.
  3. SEQUENTIAL GENERATION — Generate assets one at a time. Finish, audit, fix, then move to next.
  4. NO ANTI-ALIASING — Every pixel must be fully opaque (alpha=255) or fully transparent (alpha=0). Zero exceptions.
  5. AUDIT BEFORE EXPORT — Never export an asset that hasn't passed quality_audit.py.

Scripts Available

ScriptWhat it does
scripts/init_workspace.pyCreates project directories and asset manifest
scripts/quality_audit.pyAudits a PNG for anti-aliasing, orphan pixels, palette violations, grid alignment
scripts/batch_audit.pyAudits ALL PNGs in a directory at once for mass QA
scripts/palette_remap.pyRemaps image colors to a target palette using nearest-color matching
scripts/palette_extract.pyExtracts the color palette from an existing image with frequency analysis
scripts/atlas_pack.pyPacks multiple sprite frames into a single sprite sheet with JSON metadata
scripts/export_indexed.pyConverts RGBA PNGs to indexed 8-bit PNGs with optional color reduction
scripts/sprite_resize.pyResizes pixel art with nearest-neighbor ONLY (no blurring)
scripts/sprite_mirror.pyMirrors sprites horizontally or vertically (single or batch)
scripts/gif_export.pyConverts sprite sheets or frame directories to animated GIFs
scripts/outline_generator.pyAdds 1px outline around opaque pixels for readability
scripts/dither.pyGenerates ordered dithered gradients using Bayer matrix
scripts/noise_generator.pyGenerates procedural noise textures for terrain

Always run scripts with --help first to see usage.


Style Presets

Before generating ANY pixel art, select a style preset. This determines canvas size, color budget, and shading technique.

StyleCanvas SizeColors Per SpriteShadingUse Case
NES Classic16×16 / 32×323-4 (excl. transparency)Flat / 2-toneClassic 8-bit console
SNES Retro32×32 / 64×648-152-tone / 3-tone16-bit era games
Modern Pixel32×32 / 64×6416-313-tone / cel-shadedContemporary indie
Minimalist8×8 / 16×162-4Flat onlyUltra-simple, game jams
Dense Detail64×64 / 128×12824-48Dithered / texturedRich, detailed worlds
High-Res Pixel256×256 / 512×51264-96Full shadingIllustration-grade
Cinematic Pixel1024×1024+128-256Full shading + ditherPrint/billboard quality

Recommendation logic:

  • User says "NES", "8-bit", "retro" → NES Classic at 16×16
  • User says "SNES", "16-bit" → SNES Retro at 32×32
  • User says "indie", "modern" → Modern Pixel at 32×32 or 64×64
  • User says "detailed", "boss", "large" → Dense Detail at 64×64+
  • User says "HD pixel art" → High-Res Pixel at 256×256+
  • No preference → Default Modern Pixel at 32×32

Pixel Art Generation Guidelines

Core Principles

  • Pixel-perfect: Every pixel is intentional; no sub-pixel rendering
  • Palette adherence: Every pixel color MUST be from the declared palette
  • Readable silhouette: Assets must be recognizable at target size
  • Consistent lighting: Light source top-right across ALL assets in a project
  • Edge quality: Outlines (if used) must be consistent width and color

Shading & Depth Techniques

TechniqueWhen to UseHow
Flat shadingMinimalist, ≤16×16Single color per surface
2-tone shadingNES style, 16×16-32×32Base + 1 shadow
3-tone shadingSNES/Modern, 32×32+Base + shadow + highlight
Dithered shadingRetro texture, limited paletteBayer pattern for smooth gradients
Cel shadingClean modern styleHard shadow edges, flat color regions
Selective outlineAny styleDark outline on light areas, light on dark

Shading direction (top-right light, bottom-left shadow):

Highlight (top-right edges)
    ╲
     ┌──────┐
     │ BASE │
     │      │
     └──────┘
              ╲
        Shadow (bottom-left edges)

Per-Sprite Color Budget

StyleMax Colors (excl. transparency)
NES Classic3
Minimalist3
SNES Retro15
Modern Pixel31
Dense Detail47
High-Res Pixel95

🧱 Tile Generation Standards (MANDATORY)

Tiles are the most common asset type and the easiest to make look "fake". ALL 9 rules must be satisfied for EVERY tile.

1. Canvas & Format

  • Default size: match project canvas (16×16 / 32×32 / 64×64)
  • Format: RGB (no transparency for ground tiles), RGBA for overlays
  • Palette: Strict quantization to declared palette

2. NO Obvious Geometric Patterns ⛔

The #1 cause of "fake-looking" tiles. Forbidden in repeatable terrain:

❌ Anti-pattern✅ Replace with
Centered cross / star / plusRandom off-center features
4 equal quadrantsVoronoi 8-15 irregular cells
Regular sine wavesLow-frequency value noise
Horizontal stripe layersDiagonal/random color blobs
Symmetric corner motifsSingle asymmetric accent
Straight diagonal cracksRandom walk segments

3. Multi-Tier Color Distribution

Each pixel sampled by probability:

  • 70% main color (palette base)
  • 15% dark accent (-1 palette step)
  • 10% light accent (+1 palette step)
  • 5% emphasis color (rare highlight/feature)

4. Low-Frequency Value Noise (Required for natural tiles)

Use value noise with cosine interpolation for natural color variation:

import math, random
def cos_lerp(a, b, t):
    f = (1 - math.cos(t * math.pi)) / 2
    return a * (1 - f) + b * f

nodes = [[random.uniform(-1, 1) for _ in range(gw)] for _ in range(gh)]
# CRITICAL: wrap edges for seamless tiling
for row in nodes: row[gw-1] = row[0]
nodes[gh-1] = list(nodes[0])
# Cosine-lerp at each pixel for smooth noise

Recommended scales: Main blob 8-16px per node, detail 3-6px per node, combine 2 octaves.

5. Seamless Tiling (4-Edge Wrap) ⛔

Tiles MUST repeat without visible seams:

  • Use modulo coordinates: img.putpixel((x % W, y % H), color)
  • Wrap noise nodes: last row/col equals first
  • Test: Place 2×2 instances side-by-side; no visible borders

6. Sparse Feature Points (≤1% of pixels)

Cracks, veins, moss, droplets:

  • Random-walk paths for cracks (short, never straight)
  • Scattered points (not clustered, not aligned)
  • Total feature pixels ≤1% of canvas area

7. Low-Noise Visual Coherence

Terrain tiles must feel calm and continuous:

  • No salt-and-pepper noise or snow-like white speckles
  • No white/near-white for ground tiles (use warm ochre, muted gray instead)
  • Prefer broad color regions over per-pixel randomness
  • Keep hard pixel edges; do not blur or anti-alias

8. Edge Color Continuity

Edges within ±1 palette step of interior:

  • ❌ Black border around tile (creates grid effect when tiled)
  • ❌ Drastically different color in 1-pixel border
  • ✅ Same color distribution on edges as interior

9. Mandatory Tile Validation

Before declaring done:

  • 2×2 grid → no visible seams
  • Adjacent tiles → color transition feels natural
  • No symmetric features (rotate 90° / flip → looks different)
  • Quantized to exact palette
  • Feature density ≤1%
  • No visible white speckle noise at game scale

Sprite Templates

Character Sprites

TemplateFacingActionsFrames/ActionRecommended Size
character_simpleside-onlyidle, walk3-416×16, 32×32
character_4dir4-dirwalk4 per direction32×32, 64×64
character_rpg4-diridle, walk, attack, hurt, die3-6 per action32×32, 64×64
character_platformerside-onlyidle, run, jump, attack, hurt3-6 per action32×32, 64×64
character_full4-diridle, walk, run, jump, fall, attack, hurt, die, cast3-8 per action64×64, 128×128

Common Actions & Frame Counts

ActionFramesFPSDescription
idle2-46-8Standing breathing / subtle motion
walk4-68-12Slow-paced walking cycle
run6-812-16Fast running cycle
jump4-612-16Jump ascent + peak
fall2-412-16Falling / descent
attack4-612-16Melee / ranged attack
hurt2-38-12Taking damage reaction
die4-66-10Death animation
cast4-68-12Magic / skill casting
interact2-48-12Opening chest / picking up
climb4-68-12Ladder / wall climbing
crouch2-38-12Crouching / sneaking
roll4-612-16Dodge roll
swim4-68-12Swimming cycle

Frame naming: <asset>_<action>_<frame>.png (e.g., player_idle_0.png, player_walk_3.png)

Other Asset Templates

CategoryTemplates
Tilestile_basic (single), tile_autotile_9 (9-slice), tile_autotile_47 (bitmask), tile_animated (N frames)
Itemsitem_single (1 icon), item_animated (spinning coin, floating potion, 4-8 frames)
UIui_button_3state (normal/hover/pressed), ui_9slice (scalable panel), ui_bar (health/mana)
Effectseffect_burst (one-shot, 4-8 frames), effect_loop (fire/smoke/aura, 4-8 frames)
Backgroundsbg_parallax_layer (wide, horizontally tileable), bg_full (full screen 16:9 or 4:3)

Banned Features Blacklist

The following are FORBIDDEN in generated pixel art:

Banned FeatureReason
Anti-aliasingBreaks pixel-perfect aesthetic
Sub-pixel renderingNot possible at pixel scale
Gradient fillsUse dithering instead
Partial opacity (1-254 alpha)Pixel art = fully opaque or fully transparent
Blur effectsBreaks crisp edges
Bezier curvesPixels are axis-aligned
Vector scaling artifactsMust be pixel-perfect at declared size
Colors outside declared paletteViolates palette consistency

Decision Tree

User task → What type of pixel art?
    ├─ Single sprite/icon (≤64×64)
    │     1. Select style preset (see table above)
    │     2. Read palettes/*.json to pick a color palette
    │     3. Create the sprite as a PNG at the target resolution
    │     4. Run: python scripts/quality_audit.py <image> --json
    │     5. Fix any reported issues, re-audit until clean
    │
    ├─ Character sprite sheet (walk cycle, attack, etc.)
    │     1. Select style preset and character template
    │     2. Read references/sprite_conventions.md + references/animation_principles.md
    │     3. Create individual frames as separate PNGs
    │     4. Run: python scripts/atlas_pack.py --frames-dir <dir> --output sheet.png --cols 4 --json
    │     5. Run: python scripts/quality_audit.py sheet.png --json
    │     6. Optional: python scripts/gif_export.py --sheet sheet.png --frame-width W --frame-height H --fps 8 --output preview.gif --json
    │
    ├─ 8-way character sheet (from 5 directions)
    │     1. Draw 5 directions: S, SW, W, NW, N
    │     2. Run: python scripts/sprite_mirror.py --input-dir ./east_frames/ --output-dir ./west_frames/ --axis horizontal --json
    │     3. Pack all directions into atlas
    │
    ├─ Tileset / Autotile map
    │     1. Read the Tile Generation Standards section above (9 mandatory rules)
    │     2. Read references/tileset_rules.md for grid and autotile conventions
    │     3. Create tiles following the 9 rules
    │     4. Run: python scripts/quality_audit.py <tileset> --json
    │     5. Preview: open templates/tilemap_preview.html
    │
    ├─ Isometric art
    │     1. Read references/isometric_guide.md for projection, stacking, depth
    │     2. Use 2:1 pixel ratio (64×32 diamonds for standard tiles)
    │     3. Consistent lighting: top-right source
    │
    ├─ UI elements (health bars, buttons, dialogs)
    │     1. Read references/ui_elements.md for 9-slice, bar styles, button states
    │     2. Create at target resolution, use 9-slice for scalable panels
    │
    ├─ Particle effects (explosion, fire, smoke)
    │     1. Read references/particle_effects.md for spawn patterns and timing
    │     2. Create frame-by-frame, pack into atlas
    │
    ├─ Palette remap (recolor existing art)
    │     1. Run: python scripts/palette_remap.py --image <input> --palette palettes/<name>.json --output <out> --json
    │
    ├─ Extract palette from reference art
    │     1. Run: python scripts/palette_extract.py --image <ref> --max-colors 16 --output palettes/custom.json --json
    │
    ├─ Resize for export
    │     1. Run: python scripts/sprite_resize.py --input <img> --output <out> --scale 2 --json
    │
    ├─ Add outline for readability
    │     1. Run: python scripts/outline_generator.py --input <img> --output <out> --color "#1A1A2E" --json
    │
    ├─ Generate terrain texture
    │     1. Run: python scripts/noise_generator.py --width 64 --height 64 --palette palettes/pico-8.json --output terrain.png --json
    │
    └─ Batch QA before release
          1. Run: python scripts/batch_audit.py --dir <sprites_folder> --grid 16 --max-colors 16 --json

Palette References

Palette JSON files live in palettes/. Each file contains name, colors array (hex strings), and max_colors:

Available palettes: pico-8.json (16), gameboy.json (4), nes.json (56), snes.json (64), endesga-32.json (32), resurrect-64.json (64), sweetie-16.json (16), db32.json (32), cga.json (4), commodore-64.json (16), lospec-500.json (32)

Palette selection guide:

PaletteColorsBest For
PICO-816Game jams, tiny games, fantasy console
Sweetie-1616Cute/chibi, pastel worlds
GameBoy4Monochrome retro
DB3232General indie (most versatile)
Endesga-3232Vibrant colorful worlds
Resurrect-6464Complex detailed environments
NES56Classic 8-bit console hardware
SNES6416-bit era games
CGA4PC retro
Commodore-6416C64-style games

Template Reference

The templates/ directory contains interactive HTML tools:

  • templates/sprite_sheet.html — Sprite sheet viewer with animation playback, zoom, frame navigation
  • templates/tilemap_preview.html — Tilemap painter: select tiles, paint on grid, random fill
  • templates/palette_viewer.html — Palette comparison tool with swatch display and color picker

Further Reading

  • Sprite Conventions — Frame sizes, animation timing, directional layouts
  • Animation Principles — 12 Disney principles applied to pixel art
  • Tileset Rules — Grid sizes, Wang autotile bitmasks, terrain transitions
  • Isometric Guide — 2:1 projection, tile stacking, depth sorting
  • Color Theory — Palette design, contrast ratios, hue ramps
  • UI Elements — Health bars, buttons, dialog boxes, 9-slice panels
  • Particle Effects — Explosions, fire, smoke, sparkles, magic VFX

Troubleshooting

ProblemCauseFix
Blurry after resizeUsed bilinear/bicubicUse sprite_resize.py (nearest-neighbor only)
Visible seams in tilesetTiles don't wrapFollow Tile Generation Standards rule 5
Colors look wrong in-gameExported as RGBAUse export_indexed.py
Animation looks choppyNot enough framesMin 4 frames for walk, read animation_principles.md
Sprite hard to seeNo outline, low contrastUse outline_generator.py
Too many colorsNo palette enforcementRun palette_remap.py before export
Tiles look fakeGeometric patternsFollow Tile Generation Standards rule 2
Colors drift between assetsMemory driftRe-read palette before EACH asset

Engine-Specific Tips

Godot 4

  • Import PNGs with Texture2D filter mode set to Nearest
  • Use AnimatedSprite2D with atlas from atlas_pack.py JSON metadata
  • Tileset: import to TileSet resource, set tile size to match grid

Unity

  • Set texture import as Point (no filter), Sprite Mode: Multiple
  • Slice with Automatic or Grid mode matching your frame dimensions
  • Set Pixels Per Unit to match your tile size (16 for 16×16 tiles)

Defold

  • Set texture sampling to Nearest
  • Import atlas JSON metadata as tile source
  • Use go.property for palette switching at runtime

RPG Maker MV/MZ

  • Tile size: 48×48 (RPG Maker standard)
  • Sprite sheets: 12 frames per character (3 frames × 4 directions)
  • Use atlas_pack.py with --cols 3 for RPG Maker format

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.