Slack GIF Creator Skill
The Slack GIF Creator skill provides utilities and knowledge for creating animated GIFs optimized for Slack. It handles technical constraints, provides drawing tools, and offers animation concepts to create polished, performant GIFs for emoji and messages.When to Use
Use this skill when users request:- “Make me a GIF of X doing Y for Slack”
- “Create an animated emoji”
- “I need a custom Slack GIF”
- Animated content optimized for Slack’s requirements
Slack Requirements
Dimensions
Emoji GIFs
Emoji GIFs
Size: 128x128 pixels (recommended)Use case: Custom animated emoji in SlackBest for: Icons, reactions, small animations
Message GIFs
Message GIFs
Size: 480x480 pixelsUse case: GIFs posted in messagesBest for: Larger animations, more detailed content
Performance Parameters
- FPS: 10-30 frames per second (lower = smaller file size)
- Colors: 48-128 colors (fewer = smaller file size)
- Duration: Keep under 3 seconds for emoji GIFs
Core Workflow
Creating a GIF follows three steps:Drawing Graphics
Working with User Images
When users upload images:- Use directly: “animate this”, “split this into frames”
- Use as inspiration: “make something like this”
Drawing from Scratch
Use PIL ImageDraw primitives for all graphics:Circles and Ovals
Circles and Ovals
Polygons (Stars, Triangles, etc.)
Polygons (Stars, Triangles, etc.)
Lines
Lines
Rectangles
Rectangles
Don’t use emoji fonts (unreliable across platforms) or assume pre-packaged graphics exist. Draw everything using PIL primitives.
Making Graphics Look Good
Polished graphics require attention to detail: Use Thicker Lines- Always set
width=2or higher for outlines - Thin lines (width=1) look choppy and amateurish
- Use gradients for backgrounds (
create_gradient_background) - Layer multiple shapes for complexity
- Example: A star with a smaller star inside
- Don’t draw plain circles - add highlights, rings, or patterns
- Stars can have glows (draw larger, semi-transparent versions behind)
- Combine shapes (stars + sparkles, circles + rings)
- Use vibrant, complementary colors
- Add contrast (dark outlines on light shapes, vice versa)
- Consider overall composition
- Use combinations of polygons and ellipses
- Calculate points carefully for symmetry
- Add details (hearts can have highlight curves, snowflakes have intricate branches)
Available Utilities
GIFBuilder
Assembles frames and optimizes for Slack:Validators
Check if GIF meets Slack requirements:Easing Functions
Create smooth motion instead of linear:Easing functions make animations feel natural and professional. Use
ease_out for objects coming to rest, ease_in for objects starting to move.Frame Helpers
Convenience functions for common needs:Animation Concepts
Shake/Vibrate
Shake/Vibrate
Offset object position with oscillation:
- Use
math.sin()ormath.cos()with frame index - Add small random variations for natural feel
- Apply to x and/or y position
Pulse/Heartbeat
Pulse/Heartbeat
Scale object size rhythmically:
- Use
math.sin(t * frequency * 2 * math.pi)for smooth pulse - For heartbeat: two quick pulses then pause (adjust sine wave)
- Scale between 0.8 and 1.2 of base size
Bounce
Bounce
Object falls and bounces:
- Use
interpolate()witheasing='bounce_out'for landing - Use
easing='ease_in'for falling (accelerating) - Apply gravity by increasing y velocity each frame
Spin/Rotate
Spin/Rotate
Rotate object around center:
- PIL:
image.rotate(angle, resample=Image.BICUBIC) - For wobble: use sine wave for angle instead of linear
Fade In/Out
Fade In/Out
Gradually appear or disappear:
- Create RGBA image, adjust alpha channel
- Or use
Image.blend(image1, image2, alpha) - Fade in: alpha from 0 to 1
- Fade out: alpha from 1 to 0
Slide
Slide
Move object from off-screen to position:
- Start position: outside frame bounds
- End position: target location
- Use
interpolate()witheasing='ease_out'for smooth stop - For overshoot: use
easing='back_out'
Zoom
Zoom
Scale and position for zoom effect:
- Zoom in: scale from 0.1 to 2.0, crop center
- Zoom out: scale from 2.0 to 1.0
- Can add motion blur for drama (PIL filter)
Explode/Particle Burst
Explode/Particle Burst
Create particles radiating outward:
- Generate particles with random angles and velocities
- Update each particle:
x += vx,y += vy - Add gravity:
vy += gravity_constant - Fade out particles over time (reduce alpha)
Optimization Strategies
Only optimize when file size is too large:- Fewer frames: Lower FPS (10 instead of 20) or shorter duration
- Fewer colors:
num_colors=48instead of 128 - Smaller dimensions: 128x128 instead of 480x480
- Remove duplicates:
remove_duplicates=Truein save() - Emoji mode:
optimize_for_emoji=Trueauto-optimizes
Start with these optimizations for emoji GIFs. For message GIFs, you can use higher quality settings (more colors, higher FPS).
Philosophy
This skill provides:- Knowledge: Slack’s requirements and animation concepts
- Utilities: GIFBuilder, validators, easing functions
- Flexibility: Create animation logic using PIL primitives
- Rigid animation templates or pre-made functions
- Emoji font rendering (unreliable across platforms)
- A library of pre-packaged graphics
Dependencies
Required Python packages:Example: Creating a Pulsing Star Emoji
Related Skills
- Canvas Design: For creating static graphics that can be animated
- Algorithmic Art: For generative patterns to use in animations