Skill metadata
Reference: full SKILL.md
The following is the complete skill definition that Mibyan loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.
Pixel Art
Convert any image into retro pixel art, then optionally animate it into a short MP4 or GIF with era-appropriate effects (rain, fireflies, snow, embers). Two scripts ship with this skill:scripts/pixel_art.py— photo → pixel-art PNG (Floyd-Steinberg dithering)scripts/pixel_art_video.py— pixel-art PNG → animated MP4 (+ optional GIF)
When to Use
- User wants retro pixel art from a source image
- User asks for NES / Game Boy / PICO-8 / C64 / arcade / SNES styling
- User wants a short looping animation (rain scene, night sky, snow, etc.)
- Posters, album covers, social posts, sprites, characters, avatars
Workflow
Before generating, confirm the style with the user. Different presets produce very different outputs and regenerating is costly.Step 1 — Offer a style
Callclarify with 4 representative presets. Pick the set based on what the
user asked for — don’t just dump all 14.
Default menu when the user’s intent is unclear:
clarify and use the matching preset directly.
Step 2 — Offer animation (optional)
If the user asked for a video/GIF, or the output might benefit from motion, ask which scene:clarify more than twice in a row. One for style, one for scene if
animation is on the table. If the user explicitly asked for a specific style
and scene in their message, skip clarify entirely.
Step 3 — Generate
Runpixel_art() first; if animation was requested, chain into
pixel_art_video() on the result.
Preset Catalog
Named palettes live in
scripts/palettes.py (see references/palettes.md for
the complete list — 28 named palettes total). Any preset can be overridden:
Scene Catalog (for video)
Invocation Patterns
Python (import)
CLI
Pipeline Rationale
Pixel conversion:- Boost contrast/color/sharpness (stronger for smaller palettes)
- Posterize to simplify tonal regions before quantization
- Downscale by
blockwithImage.NEAREST(hard pixels, no interpolation) - Quantize with Floyd-Steinberg dithering — against either an adaptive N-color palette OR a named hardware palette
- Upscale back with
Image.NEAREST
- Copies the base frame each tick (static background)
- Overlays stateless-per-frame particle draws (one function per effect)
- Encodes via ffmpeg
libx264 -pix_fmt yuv420p -crf 18 - Optional GIF via
palettegen+paletteuse
Dependencies
- Python 3.9+
- Pillow (
pip install Pillow) - ffmpeg on PATH (only needed for video — Mibyan installs package this)
Pitfalls
- Pallet keys are case-sensitive (
"NES","PICO_8","GAMEBOY_ORIGINAL"). - Very small sources (<100px wide) collapse under 8-10px blocks. Upscale the source first if it’s tiny.
- Fractional
blockorpalettewill break quantization — keep them positive ints. - Animation particle counts are tuned for ~640x480 canvases. On very large images you may want a second pass with a different seed for density.
mono_green/mono_amberforcecolor=0.0(desaturate). If you override and keep chroma, the 2-color palette can produce stripes on smooth regions.clarifyloop: call it at most twice per turn (style, then scene). Don’t pepper the user with more picks.
Verification
- PNG is created at the output path
- Clear square pixel blocks visible at the preset’s block size
- Color count matches preset (eyeball the image or run
Image.open(p).getcolors()) - Video is a valid MP4 (
ffprobecan open it) with non-zero size
Attribution
Named hardware palettes and the procedural animation loops inpixel_art_video.py
are ported from pixel-art-studio
(MIT). See ATTRIBUTION.md in this skill directory for details.
