slack-gif-creator
Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives. This skill applies when users request animated GIFs or emoji animations for Slack from descriptions like "make me a GIF for Slack of X doing Y".
By composiohq · 3,606 installs
npx skills add composiohq/awesome-claude-skills --skill slack-gif-creator
Source repository · Upstream listing
Slack GIF Creator Flexible Toolkit
A toolkit for creating animated GIFs optimized for Slack. Provides validators for Slack's constraints, composable animation primitives, and optional helper utilities. Apply these tools however needed to achieve the creative vision.
Slack's Requirements
Slack has specific requirements for GIFs based on their use:
Message GIFs:
Max size: ~2MB
Optimal dimensions: 480x480
Typical FPS: 15 20
Color limit: 128 256
Duration: 2 5s
Emoji GIFs:
Max size: 64KB (strict limit)
Optimal dimensions: 128x128
Typical FPS: 10 12
Color limit: 32 48
Duration: 1 2s
Emoji GIFs are challenging the 64KB limit is strict. Strategies that help:
Limit to 10 15 frames total
Use 32 48 colors maximum
Keep designs simple
Avoid gradients
Validate file size frequently
Toolkit Structure
This skill provides three types of tools:
1. Validators Check if a GIF meets Slack's requirements
2. Animation Primitives Composable building blocks for motion (shake, bounce, move, kaleidoscope)
3. Helper Utilities Optional functions for common needs (text, colors, effects)
Complete creative freedom is available in how these tools are applied.
Core Validators
To ensure a GIF meets Slack's constraints, use these validators:
File size validator :
Dimension validator :
Complete validation :
Animation Primitives
These are composable building blocks for motion. Apply these to any object in any combination:
Shake
Bounce
Spin / Rotate
Pulse / Heartbeat
Fade
Zoom
Explode / Shatter
Wiggle / Jiggle
Slide
Flip
Morph / Transform
Move Effect
Kaleidoscope Effect
To compose primitives freely, follow these patterns:
Helper Utilities
These are optional helpers for common needs. Use, modify, or replace these with custom implementations as needed.
GIF Builder (Assembly & Optimization)
Key features:
Automatic color quantization
Duplicate frame removal
Size warnings for Slack limits
Emoji mode (aggressive optimization)
Text Rendering
For small GIFs like emojis, text readability is challenging. A common solution involves adding outlines:
To implement custom text rendering, use PIL's ImageDraw.text() which works fine for larger GIFs.
Color Management
Professional looking GIFs often use cohesive color palettes:
To work with colors directly, use RGB tuples whatever works for the use case.
Visual Effects
Optional effects for impact moments:
Easing Functions
Smooth motion uses easing instead of linear interpolation:
Available easings: linear , ease in , ease out , ease in out , bounce out , elastic out , back out (overshoot), and more in core/easing.py .
Frame Composition
Basic drawing utilities if you need them:
Optimization Strategies
When your GIF is too large:
For Message GIFs ( 2MB):
1. Reduce frames (lower FPS or shorter duration)
2. Reduce colors (128 → 64 colors)
3. Reduce dimensions (480x480 → 320x320)
4. Enable duplicate frame removal
For Emoji GIFs ( 64KB) be aggressive:
1. Limit to 10 12 frames total
2. Use 32 40 colors maximum
3. Avoid gradients (solid colors compress better)
4. Simplify design (fewer elements)
5. Use optimize for emoji=True in save method
Example Composition Patterns
Simple Reaction (Pulsing)
Action with Impact (Bounce + Flash)
Combining Primitives (Move + Shake)
Philosophy
This toolkit provides building blocks, not rigid recipes. To work with a GIF request:
1. Understand the creative vision What should happen? What's the mood?
2. Design the animation Break it into phases (anticipation, action, reaction)
3. Apply primitives as needed Shake, bounce, move, effects mix freely
4. Validate constraints Check file size, especially for emoji GIFs
5. Iterate if needed Reduce frames/colors if over size limits
The goal is creative freedom within Slack's technical constraints.
Dependencies
To use this toolkit, install these dependencies only if they aren't already present: