用于创建针对 Slack 优化的动画 GIF 的知识和工具集。提供约束条件、验证工具和动画概念。当用户请求为 Slack 创建动画 GIF 时使用,例如"为 Slack 制作一个 X 做 Y 的 GIF"。
npx skills add https://github.com/LeastBit/Claude_skills_zh-CN --skill slack-gif-creator
一个提供工具和知识的工具包,用于创建针对 Slack 优化的动画 GIF。
尺寸:
参数:
from core.gif_builder import GIFBuilder
from PIL import Image, ImageDraw
# 1. 创建构建器
builder = GIFBuilder(width=128, height=128, fps=10)
# 2. 生成帧
for i in range(12):
frame = Image.new('RGB', (128, 128), (240, 248, 255))
draw = ImageDraw.Draw(frame)
# 使用 PIL 基础图形绘制你的动画
# (圆形、多边形、线条等)
builder.add_frame(frame)
# 3. 保存并优化
builder.save('output.gif', num_colors=48, optimize_for_emoji=True)
如果用户上传了图片,请考虑他们想要:
使用 PIL 加载和处理图片:
from PIL import Image
uploaded = Image.open('file.png')
# 直接使用,或仅作为颜色/风格的参考
从零开始绘制图形时,使用 PIL ImageDraw 基础图形:
from PIL import ImageDraw
draw = ImageDraw.Draw(frame)
# 圆形/椭圆
draw.ellipse([x1, y1, x2, y2], fill=(r, g, b), outline=(r, g, b), width=3)
# 星形、三角形、任何多边形
points = [(x1, y1), (x2, y2), (x3, y3), ...]
draw.polygon(points, fill=(r, g, b), outline=(r, g, b), width=3)
# 线条
draw.line([(x1, y1), (x2, y2)], fill=(r, g, b), width=5)
# 矩形
draw.rectangle([x1, y1, x2, y2], fill=(r, g, b), outline=(r, g, b), width=3)
不要使用: Emoji 字体(在不同平台上表现不一致)或假设此技能中有预打包的图形。
图形应该看起来精致有创意,而不是简陋。以下是方法:
使用较粗的线条 - 轮廓和线条始终设置 width=2 或更高。细线(width=1)看起来粗糙且业余。
添加视觉深度:
create_gradient_background)让形状更有趣:
注意颜色搭配:
对于复杂形状(心形、雪花等):
要有创意和注重细节!好的 Slack GIF 应该看起来精致,而不是像占位图形。
core.gif_builder)组装帧并为 Slack 优化:
builder = GIFBuilder(width=128, height=128, fps=10)
builder.add_frame(frame) # 添加 PIL Image
builder.add_frames(frames) # 添加帧列表
builder.save('out.gif', num_colors=48, optimize_for_emoji=True, remove_duplicates=True)
core.validators)检查 GIF 是否符合 Slack 要求:
from core.validators import validate_gif, is_slack_ready
# 详细验证
passes, info = validate_gif('my.gif', is_emoji=True, verbose=True)
# 快速检查
if is_slack_ready('my.gif'):
print("准备就绪!")
core.easing)平滑运动而非线性:
from core.easing import interpolate
# 进度从 0.0 到 1.0
t = i / (num_frames - 1)
# 应用缓动
y = interpolate(start=0, end=400, t=t, easing='ease_out')
# 可用:linear, ease_in, ease_out, ease_in_out,
# bounce_out, elastic_out, back_out
core.frame_composer)常用需求的便捷函数:
from core.frame_composer import (
create_blank_frame, # 纯色背景
create_gradient_background, # 垂直渐变
draw_circle, # 圆形辅助函数
draw_text, # 简单文字渲染
draw_star # 五角星
)
用振荡偏移对象位置:
math.sin() 或 math.cos() 配合帧索引有节奏地缩放对象大小:
math.sin(t * frequency * 2 * math.pi) 实现平滑脉动对象下落并弹起:
interpolate() 配合 easing='bounce_out' 实现落地效果easing='ease_in' 实现下落(加速)效果围绕中心旋转对象:
image.rotate(angle, resample=Image.BICUBIC)逐渐出现或消失:
Image.blend(image1, image2, alpha)将对象从屏幕外移动到指定位置:
interpolate() 配合 easing='ease_out' 实现平滑停止easing='back_out'缩放和定位以实现缩放效果:
创建向外辐射的粒子:
x += vx,y += vyvy += gravity_constant仅在被要求减小文件大小时,实施以下几种方法:
num_colors=48 而不是 128remove_duplicates=Trueoptimize_for_emoji=True 自动优化# 表情符号最大优化
builder.save(
'emoji.gif',
num_colors=48,
optimize_for_emoji=True,
remove_duplicates=True
)
本技能提供:
本技能不提供:
关于用户上传的说明:本技能不包含预构建的图形,但如果用户上传了图片,请使用 PIL 加载和处理它 - 根据他们的请求判断是直接使用还是仅作为灵感参考。
发挥创意!组合各种概念(弹跳 + 旋转、脉动 + 滑动等)并充分利用 PIL 的全部功能。
pip install pillow imageio numpy
Analyzes meeting transcripts and recordings to uncover behavioral patterns, communication insights, and actionable feedback. Identifies when you avoid conflict, use filler words, dominate conversations, or miss opportunities to listen. Perfect for professionals seeking to improve their communication and leadership skills.
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".
Analyzes your recent Claude Code chat history to identify coding patterns, development gaps, and areas for improvement, curates relevant learning resources from HackerNews, and automatically sends a personalized growth report to your Slack DMs.
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack.
A skill that creates new Claude skills and automatically shares them on Slack using Rube for seamless team collaboration and skill discovery.
Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include "automate Slack app", "control VS Code", "interact with Discord app", "test this Electron app", "connect to desktop app", or any task requiring automation of a native Electron application.
Prepare meeting materials with Notion context and Codex research; use when gathering context, drafting agendas/pre-reads, and tailoring materials to attendees.
Interactive daily standup/meeting update generator. Use when user says 'daily', 'standup', 'scrum update', 'status update', 'what did I do yesterday', 'prepare for meeting', 'morning update', or 'team sync'. Pulls activity from GitHub, Jira, and Claude Code session history. Conducts 4-question interview (yesterday, today, blockers, discussion topics) and generates formatted Markdown update.
Take leastbit/slack-gif-creator from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip.
Without those the skill loads but fails at the first command.