Skip to main content

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

Size: 128x128 pixels (recommended)Use case: Custom animated emoji in SlackBest for: Icons, reactions, small animations
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
Start with 10 FPS and 48 colors for emoji GIFs. This keeps file sizes small while maintaining smooth animation.

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:
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=2 or higher for outlines
  • Thin lines (width=1) look choppy and amateurish
Add Visual Depth
  • Use gradients for backgrounds (create_gradient_background)
  • Layer multiple shapes for complexity
  • Example: A star with a smaller star inside
Make Shapes Interesting
  • 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)
Pay Attention to Colors
  • Use vibrant, complementary colors
  • Add contrast (dark outlines on light shapes, vice versa)
  • Consider overall composition
Complex Shapes
  • Use combinations of polygons and ellipses
  • Calculate points carefully for symmetry
  • Add details (hearts can have highlight curves, snowflakes have intricate branches)
Be creative and detailed! A good Slack GIF should look polished, not like placeholder graphics.

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

Offset object position with oscillation:
  • Use math.sin() or math.cos() with frame index
  • Add small random variations for natural feel
  • Apply to x and/or y position
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
Object falls and bounces:
  • Use interpolate() with easing='bounce_out' for landing
  • Use easing='ease_in' for falling (accelerating)
  • Apply gravity by increasing y velocity each frame
Rotate object around center:
  • PIL: image.rotate(angle, resample=Image.BICUBIC)
  • For wobble: use sine wave for angle instead of linear
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
Move object from off-screen to position:
  • Start position: outside frame bounds
  • End position: target location
  • Use interpolate() with easing='ease_out' for smooth stop
  • For overshoot: use easing='back_out'
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)
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)
Combine concepts for unique effects: bouncing + rotating, pulsing + sliding, fade + zoom. Use PIL’s full capabilities creatively.

Optimization Strategies

Only optimize when file size is too large:
  1. Fewer frames: Lower FPS (10 instead of 20) or shorter duration
  2. Fewer colors: num_colors=48 instead of 128
  3. Smaller dimensions: 128x128 instead of 480x480
  4. Remove duplicates: remove_duplicates=True in save()
  5. Emoji mode: optimize_for_emoji=True auto-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
It does NOT provide:
  • Rigid animation templates or pre-made functions
  • Emoji font rendering (unreliable across platforms)
  • A library of pre-packaged graphics
If users upload an image, use PIL to load and work with it. Interpret based on their request whether they want it used directly or just as inspiration.

Dependencies

Required Python packages:

Example: Creating a Pulsing Star Emoji

  • Canvas Design: For creating static graphics that can be animated
  • Algorithmic Art: For generative patterns to use in animations