--- name: slack-gif-creator description: Builds a custom animated GIF sized for Slack, either a small emoji or a message GIF, by writing a short Python script that draws the frames and then checking the file against size, dimension and frame-rate limits. Use when a user says "make a Slack emoji GIF of...", "animate our logo for a celebration", "I need a reaction GIF for the channel", or "my GIF is too big for Slack". --- # Slack GIF Creator Produces a short looping animation that uploads to Slack on the first try. Everything is drawn from code, so the result matches the request instead of the nearest stock clip, and the file is verified before it is handed over. ## When to use this - A custom emoji, reaction or celebration GIF for a team channel. - Animating a simple logo, shape, text or icon. - Shrinking an existing GIF that Slack rejects. - Do not use for photorealistic video or long clips; GIF is the wrong format for those. ## Procedure 1. **Confirm the target.** Ask: emoji or message GIF, the idea in one sentence, any brand colors, text to include, and whether it must loop. Defaults: emoji is 128x128 pixels, under 64 KB where possible; message GIF is about 480x480 or smaller, under 2 MB. 2. **Plan the animation on paper.** Write a one-line storyboard: start state, motion, end state. Pick 10 to 24 frames at 10 to 20 frames per second. Fewer, bolder frames compress better. Choose a flat palette of at most 16 to 32 colors and a solid or transparent background. 3. **Check the tools.** Use Python with the Pillow imaging library. If it is missing, ask before installing it. A numeric library is optional. Do not download clip art or external assets. 4. **Write the drawing code inline.** One function draws a frame from a progress value `t` between 0 and 1. Use shapes (circles, rounded rectangles, polygons, lines) and text. Apply easing (ease-in-out for most motion, a small overshoot for bounces) rather than linear movement. For loops, make the last frame flow into the first. 5. **Render and save.** Build the frame list, save with a short per-frame duration, loop forever, disposal set so frames do not smear, and palette optimization on. Save into the working folder with a descriptive name. 6. **Validate in code.** Re-open the file and print: dimensions, frame count, total duration, file size, and number of colors. Compare against the limits from step 1. 7. **Shrink if needed**, in this order, rechecking after each: reduce colors, drop every other frame while doubling its duration, remove gradients and anti-aliased fine detail, reduce dimensions, shorten the animation. 8. **Look at it.** Export a contact sheet of the first, middle and last frames and inspect it for clipped shapes, unreadable text and a jump at the loop point. Fix and re-render once if anything is off. ## Output format ``` File: Type: Size: x, frames, s, KB, colors Limits check: pass | fail - Loop: Script: ``` Keep the generator script so the user can change colors, text or speed. ## Guardrails - Do not reproduce copyrighted characters or logos the user does not own. Offer an original shape-based alternative. - Keep text short (one to three words) and large; tiny text is unreadable at emoji size. - Avoid rapid full-frame flashing; it is an accessibility problem. Keep any flicker below three flashes per second. - If the limits cannot be met without ruining the design, say which one failed and offer the best version plus a simpler one. - Do not claim the GIF uploads cleanly; report measured numbers instead. - Slack's limits can change. If the user quotes a different limit, use theirs and say so. - Prefer high contrast against both light and dark Slack themes; test the look on a white and a dark background. - Use a transparent background for emoji unless the design needs a fill, and check the edges do not show a halo. - Do not add sound, metadata or hidden content; the output is a plain GIF. - Name files in lowercase with hyphens, since emoji names are derived from them.