Export sprites to PNG, GIF, or spritesheet formats with JSON metadata for game engines. Use when the user wants to "export", "save", "output", "render", "generate", "create file", mentions file formats like "PNG", "GIF", "animated GIF", "spritesheet", "sprite sheet", "texture atlas", "tile sheet", or game engine integration with "Unity", "Godot", "Phaser", "Unreal", "GameMaker". Trigger on layout terms ("horizontal", "vertical", "grid", "packed", "strip"), scaling ("2x", "4x", "upscale", "pixel-perfect"), file operations ("save as", "export to", "output to"), metadata formats ("JSON", "XML", "metadata", "atlas data"), and delivery terms ("for web", "for game", "for Twitter", "for itch.io", "optimized").
Exports pixel art sprites to PNG, GIF, or spritesheets with JSON metadata for game engines. Triggers when users mention "export", "save", file formats (PNG, GIF, spritesheet), game engines (Unity, Godot), or layout/scaling terms.
/plugin marketplace add willibrandon/pixel-plugin/plugin install pixel-plugin@pixel-pluginThis skill is limited to using the following tools:
examples.mdexport-formats.mdThe Pixel Art Exporter Skill enables exporting pixel art sprites from Aseprite to various formats optimized for different use cases. This includes single images (PNG), animated GIFs, spritesheets, and JSON metadata for game engines.
Core Capabilities:
Export Formats Supported:
This Skill works with the pixel-mcp server tools to produce production-ready assets for web, games, and applications.
Invoke this Skill when the user:
Example Triggers:
For static sprites or single frames:
Get Sprite Information First
Use mcp__aseprite__get_sprite_info to understand:
- Current dimensions
- Number of frames
- Available layers
- Color mode and transparency settings
Export PNG with Transparency
Use mcp__aseprite__export_png:
- file_path: Absolute path (e.g., "/path/to/output/sprite.png")
- frame_number: Specific frame (0-indexed) or omit for current frame
- layer: Specific layer name or omit for merged output
- scale: Scaling factor (1, 2, 4, etc.) - default is 1
Export Options
Example Workflow:
1. Get sprite info to verify dimensions and frame count
2. Export PNG: mcp__aseprite__export_png with desired frame and scale
3. Confirm file creation and report dimensions to user
For animations intended for web or presentations:
Verify Animation Setup
Use mcp__aseprite__get_sprite_info to check:
- Frame count (needs 2+ frames)
- Frame durations (timing information)
- Animation tags (if specific tag requested)
- Sprite dimensions
Export GIF
Use mcp__aseprite__export_gif:
- file_path: Output path (e.g., "/path/to/animation.gif")
- animation_tag: Optional - specific tag name to export
- loop: true (infinite loop) or false (play once)
- scale: Upscaling factor if needed
GIF Optimization Considerations
Example Workflow:
1. Verify sprite has multiple frames
2. Export GIF with appropriate loop setting
3. Report file size and frame count to user
4. Suggest optimization if file is large (>1MB)
For game engines and texture atlases:
Understand Layout Requirements
Layout Types:
Export Spritesheet
Use mcp__aseprite__export_spritesheet:
- file_path: Output PNG path (e.g., "/path/to/spritesheet.png")
- layout: "horizontal", "vertical", "grid", or "packed"
- animation_tag: Optional - export specific animation only
- scale: Upscaling factor
- padding: Pixels between frames (default 0, common: 1-2)
- include_json: true to generate metadata file
JSON Metadata Structure
When include_json: true, creates a .json file with:
{
"frames": [
{
"filename": "frame_0.png",
"frame": {"x": 0, "y": 0, "w": 32, "h": 32},
"spriteSourceSize": {"x": 0, "y": 0, "w": 32, "h": 32},
"sourceSize": {"w": 32, "h": 32},
"duration": 100
}
],
"meta": {
"app": "Aseprite",
"version": "1.3.x",
"format": "RGBA8888",
"size": {"w": 256, "h": 32},
"scale": "1"
}
}
Layout Selection Guidelines
Example Workflow:
1. Ask user about target platform if not specified
2. Recommend layout based on use case
3. Export spritesheet with JSON metadata
4. Report texture dimensions and frame count
5. Provide integration code sample for their engine
For game engine integration:
Metadata Formats by Engine
Unity:
Godot:
Phaser:
Generic/Custom:
Export with Metadata
Always include JSON when exporting for game engines:
- Set include_json: true in export_spritesheet
- JSON file created with same name as PNG (different extension)
- Contains frame positions, durations, and sprite metadata
Metadata Usage Examples
Parsing in JavaScript (Phaser):
this.load.atlas('sprite', 'spritesheet.png', 'spritesheet.json');
this.add.sprite(x, y, 'sprite', 'frame_0.png');
Parsing in C# (Unity):
// Import spritesheet.png with Multiple sprite mode
// Use JSON to set sprite rectangles in Sprite Editor
Pixel-perfect upscaling for high-resolution displays:
When to Scale
Scaling Best Practices
Apply Scaling
Add scale parameter to any export:
- mcp__aseprite__export_png: scale: 2
- mcp__aseprite__export_gif: scale: 4
- mcp__aseprite__export_spritesheet: scale: 2
Resolution Recommendations
1. Get sprite info to verify single frame
2. Export PNG at 2x scale with transparency
3. Optimize PNG with compression tools if needed
4. Provide HTML/CSS example for display
1. Verify animation has multiple frames and tags
2. Export spritesheet with "grid" layout
3. Include JSON metadata (include_json: true)
4. Set appropriate padding (1-2 pixels)
5. Scale if needed (typically 1x for engines)
6. Provide code snippet for target engine
1. If multiple layers, export each separately
2. Use PNG format with transparency
3. Scale to multiple sizes (16x16, 32x32, 64x64)
4. Batch export all sizes
5. Organize in output directory structure
1. Verify frame timing is appropriate (100-200ms typical)
2. Export GIF with loop: true
3. Scale to 2x or 4x for visibility
4. Check file size (optimize if >2MB)
5. Suggest hosting platforms if needed
1. Verify tiles are uniform size (e.g., 16x16, 32x32)
2. Export as grid spritesheet
3. Set padding to 0 or 1 (depends on engine)
4. Include JSON for tile coordinates
5. Provide tile size and grid dimensions
Export Settings:
Import Steps:
Code Example:
SpriteRenderer renderer = GetComponent<SpriteRenderer>();
renderer.sprite = sprites[frameIndex];
Export Settings:
Import Steps:
Code Example:
$AnimatedSprite.play("run")
$AnimatedSprite.speed_scale = 1.0
Export Settings:
Import Steps:
Code Example:
this.load.atlas('player', 'spritesheet.png', 'spritesheet.json');
this.anims.create({
key: 'run',
frames: this.anims.generateFrameNames('player', {
prefix: 'frame_',
suffix: '.png',
start: 0,
end: 7
}),
frameRate: 10,
repeat: -1
});
Export Settings:
JSON Structure:
{
"frames": [
{"x": 0, "y": 0, "w": 32, "h": 32, "duration": 100}
],
"meta": {
"frameWidth": 32,
"frameHeight": 32,
"frameCount": 8
}
}
Integration Pattern:
Specifications:
When to Use:
Specifications:
Limitations:
When to Use:
Horizontal Layout:
[Frame0][Frame1][Frame2][Frame3]...
Vertical Layout:
[Frame0]
[Frame1]
[Frame2]
[Frame3]
...
Grid Layout:
[Frame0][Frame1][Frame2][Frame3]
[Frame4][Frame5][Frame6][Frame7]
[Frame8][Frame9][Frame10][Frame11]
Packed Layout:
[Frame0][Frame2][Frame5]
[Frame1][Frame3][Frame6]
[Frame4][Frame7]
Standard Frame Format:
{
"filename": "frame_0.png",
"frame": {"x": 0, "y": 0, "w": 32, "h": 32},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x": 0, "y": 0, "w": 32, "h": 32},
"sourceSize": {"w": 32, "h": 32},
"duration": 100
}
Fields Explained:
filename: Logical frame identifierframe: Position and size in spritesheet (pixels)rotated: Whether frame is rotated 90° (packed layouts)trimmed: Whether transparent pixels were removedspriteSourceSize: Position within original canvas if trimmedsourceSize: Original canvas size before trimmingduration: Frame duration in millisecondsMeta Information:
{
"app": "Aseprite",
"version": "1.3.x",
"format": "RGBA8888",
"size": {"w": 256, "h": 128},
"scale": "1",
"frameTags": [
{"name": "idle", "from": 0, "to": 3, "direction": "forward"},
{"name": "run", "from": 4, "to": 11, "direction": "forward"}
]
}
Scenario: User wants just one frame as PNG
1. mcp__aseprite__get_sprite_info (verify frame exists)
2. mcp__aseprite__export_png:
- file_path: "/output/frame.png"
- frame_number: 0 (or user-specified)
- scale: 1 (or user-specified)
3. Confirm export with dimensions
Scenario: User wants animated GIF of entire sprite
1. mcp__aseprite__get_sprite_info (verify frames > 1)
2. mcp__aseprite__export_gif:
- file_path: "/output/animation.gif"
- loop: true
- scale: 2
3. Report frame count and file size
Scenario: User wants spritesheet for Unity/Godot
1. mcp__aseprite__get_sprite_info (check dimensions and frames)
2. Ask about target engine if not specified
3. mcp__aseprite__export_spritesheet:
- file_path: "/output/spritesheet.png"
- layout: "grid"
- include_json: true
- padding: 1
- scale: 1
4. Provide integration instructions for target engine
Scenario: User wants to export just one animation (e.g., "run")
1. mcp__aseprite__get_sprite_info (verify tag exists)
2. mcp__aseprite__export_spritesheet or export_gif:
- animation_tag: "run"
- Other settings as appropriate
3. Confirm only tagged frames exported
Scenario: User wants multiple scales (1x, 2x, 4x)
1. Export PNG/spritesheet at scale: 1
2. Export PNG/spritesheet at scale: 2
3. Export PNG/spritesheet at scale: 4
4. Organize files: sprite_1x.png, sprite_2x.png, sprite_4x.png
5. Report all outputs with dimensions
Scenario: User wants individual layers as separate files
1. mcp__aseprite__get_sprite_info (get layer names)
2. For each layer:
- mcp__aseprite__export_png:
- layer: "LayerName"
- file_path: "/output/layerName.png"
3. Report all exported layers
Workflow: Create → Export
1. User creates sprite with Pixel Art Creator Skill
2. Automatically offer export options when creation complete
3. Suggest appropriate format based on sprite type (static vs animated)
4. Use this Skill to handle export
Workflow: Animate → Export
1. User creates animation with Pixel Art Animator Skill
2. When animation complete, offer export formats:
- GIF for web/social
- Spritesheet for games
3. Use this Skill for export with animation metadata
Workflow: Optimize → Export
1. User applies professional techniques (dithering, palette optimization)
2. Export with optimized settings:
- Preserve palette for GIF export
- Use appropriate compression for PNG
3. This Skill handles format-specific optimization
Problem: Invalid or inaccessible output path
Solution:
1. Verify directory exists (create if needed using Bash)
2. Check write permissions
3. Use absolute paths, not relative
4. Suggest valid path if user provides invalid one
Problem: User requests frame/tag that doesn't exist
Solution:
1. Use get_sprite_info to verify available frames and tags
2. List available options to user
3. Ask user to clarify which frame/tag they want
4. Don't attempt export until valid selection made
Problem: Export will create very large file (GIF >5MB, PNG >10MB)
Solution:
1. Calculate approximate size based on dimensions and frame count
2. Warn user before export if size exceeds thresholds
3. Suggest alternatives:
- Reduce scale factor
- Export fewer frames
- Use spritesheet instead of GIF
- Optimize palette
Problem: User requests feature not supported by format (e.g., GIF transparency)
Solution:
1. Explain format limitation clearly
2. Suggest alternative format or approach
3. Proceed with export noting the limitation
4. Examples:
- GIF binary transparency → suggest PNG for partial alpha
- GIF 256-color limit → suggest palette optimization first
Problem: Non-integer scale or excessive scaling
Solution:
1. Only accept integer scale factors (1, 2, 3, 4, etc.)
2. Warn if scale >4 (may create very large files)
3. Explain pixel-perfect scaling benefits
4. Suggest appropriate scale for user's use case
Export completed successfully when:
Report to User:
✓ Export complete: /path/to/output.png
- Format: PNG with transparency
- Dimensions: 64x64 (2x scale from 32x32 original)
- Frames: 1 (static image)
- File size: ~8KB
[For spritesheets, also include:]
- Layout: Grid (4x2)
- Frame dimensions: 32x32 each
- Total frames: 8
- JSON metadata: /path/to/output.json
- Integration: Ready for Unity/Godot import
[Provide relevant integration code snippet if applicable]
Post-Export Guidance:
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.