Convert video clips to optimized GIFs with speed control, cropping, text overlays, and file size optimization. Create perfect GIFs for social media, documentation, and presentations.
npx skills add https://github.com/nicepkg/ai-workflow --skill video-to-gif
Transform video clips into high-quality, optimized GIFs perfect for social media, documentation, tutorials, and presentations. Features precise timing control, text overlays, effects, and intelligent file size optimization.
from scripts.gif_workshop import GifWorkshop
# Basic conversion
workshop = GifWorkshop("video.mp4")
workshop.to_gif("output.gif")
# With options
workshop = GifWorkshop("video.mp4")
workshop.clip(start=5, end=10) # 5-10 seconds
workshop.resize(width=480) # Resize to 480px wide
workshop.set_fps(15) # 15 frames per second
workshop.optimize(max_size_kb=500) # Max 500KB
workshop.to_gif("output.gif")
from scripts.gif_workshop import GifWorkshop
# From file
workshop = GifWorkshop("video.mp4")
# With initial settings
workshop = GifWorkshop("video.mp4", fps=15, width=480)
# By time (seconds)
workshop.clip(start=5, end=15) # 5s to 15s
# By time string
workshop.clip(start="00:01:30", end="00:01:45") # 1:30 to 1:45
# From start or to end
workshop.clip(start=10) # From 10s to end
workshop.clip(end=5) # First 5 seconds
# Multiple clips
workshop.clip_multi([
(0, 3),
(10, 15),
(20, 25)
]) # Concatenates clips
# Speed up
workshop.speed(2.0) # 2x faster
# Slow motion
workshop.speed(0.5) # Half speed
# Reverse
workshop.reverse()
# Boomerang effect (forward then reverse)
workshop.boomerang()
# Resize by width (maintain aspect)
workshop.resize(width=480)
# Resize by height
workshop.resize(height=360)
# Exact dimensions
workshop.resize(width=480, height=360)
# Crop to region
workshop.crop(x=100, y=50, width=400, height=300)
# Crop to aspect ratio
workshop.crop_to_aspect(16, 9) # 16:9
workshop.crop_to_aspect(1, 1) # Square
# Simple text overlay
workshop.add_text(
"Hello World!",
position='bottom',
fontsize=24,
color='white'
)
# Text with timing
workshop.add_text(
"Watch this!",
position='top',
start_time=0,
end_time=3 # Show for first 3 seconds
)
# Multiple text overlays
workshop.add_text("Step 1", position='top-left', start_time=0, end_time=2)
workshop.add_text("Step 2", position='top-left', start_time=2, end_time=4)
# Caption bar
workshop.add_caption_bar(
"This is a caption",
position='bottom',
background='black',
padding=10
)
# Color filters
workshop.filter('grayscale')
workshop.filter('sepia')
# Adjustments
workshop.adjust(brightness=0.1, contrast=0.2)
# Fade in/out
workshop.fade_in(duration=0.5)
workshop.fade_out(duration=0.5)
# Blur
workshop.blur(intensity=2)
# Target file size
workshop.optimize(max_size_kb=500)
# Quality settings
workshop.optimize(
quality='medium', # 'low', 'medium', 'high'
colors=128 # Color palette size (2-256)
)
# Manual FPS control
workshop.set_fps(10) # Lower FPS = smaller file
# Lossy compression
workshop.optimize(lossy=80) # 0-100, higher = more compression
# Basic export
workshop.to_gif("output.gif")
# With options
workshop.to_gif(
"output.gif",
optimize=True,
colors=256,
loop=0 # 0 = infinite loop, 1+ = loop count
)
# Export as video (for comparison)
workshop.to_video("output.mp4")
# Export frames
workshop.export_frames("frames/", format='png')
# Social media presets
workshop.preset('twitter') # 512px wide, 5MB max
workshop.preset('discord') # 256px, 8MB max
workshop.preset('slack') # 480px, 5MB max
workshop.preset('reddit') # 720px, optimized
# Quality presets
workshop.preset('high') # High quality, larger file
workshop.preset('medium') # Balanced
workshop.preset('low') # Small file, lower quality
# Special presets
workshop.preset('thumbnail') # Small preview GIF
workshop.preset('reaction') # Reaction GIF (small, fast)
| Position | Description |
|----------|-------------|
| 'top' | Top center |
| 'bottom' | Bottom center |
| 'center' | Center of frame |
| 'top-left' | Top left corner |
| 'top-right' | Top right corner |
| 'bottom-left' | Bottom left corner |
| 'bottom-right' | Bottom right corner |
# Get best frame (thumbnail)
best_frame = workshop.get_best_frame()
best_frame.save("thumbnail.png")
# Extract frame at time
frame = workshop.get_frame_at(5.5) # Frame at 5.5 seconds
frame.save("frame.png")
# Extract all frames
workshop.export_frames("frames/", format='png')
info = workshop.get_info()
print(f"Duration: {info['duration']} seconds")
print(f"Size: {info['width']}x{info['height']}")
print(f"FPS: {info['fps']}")
print(f"Frames: {info['frame_count']}")
# Apply custom function to each frame
def custom_filter(frame):
# frame is a PIL Image
return frame.rotate(5)
workshop.apply_filter(custom_filter)
# Join multiple clips
workshop.concat([
"intro.mp4",
"main.mp4",
"outro.mp4"
])
# Basic conversion
python gif_workshop.py video.mp4 -o output.gif
# With clip selection
python gif_workshop.py video.mp4 -o output.gif --start 5 --end 15
# With options
python gif_workshop.py video.mp4 -o output.gif \
--width 480 \
--fps 15 \
--speed 1.5 \
--max-size 500
# With text
python gif_workshop.py video.mp4 -o output.gif \
--text "Hello World" \
--text-position bottom
# Apply preset
python gif_workshop.py video.mp4 -o output.gif --preset twitter
| Preset | Width | FPS | Colors | Use Case |
|--------|-------|-----|--------|----------|
| reaction | 256px | 10 | 64 | Quick reactions |
| low | 320px | 12 | 128 | Basic sharing |
| medium | 480px | 15 | 256 | General use |
| high | 640px | 20 | 256 | High quality |
| max | Original | 24 | 256 | Best quality |
from scripts.gif_workshop import GifWorkshop, GifError
try:
workshop = GifWorkshop("video.mp4")
workshop.clip(start=0, end=100) # May exceed video length
workshop.to_gif("output.gif")
except GifError as e:
print(f"Error: {e}")
except FileNotFoundError:
print("Video file not found")
moviepy>=1.0.3
Pillow>=10.0.0
imageio>=2.31.0
numpy>=1.24.0
Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches, brand awareness. Triggers: marketing video, ad video, promo video, commercial, brand video, product video, explainer video, ad creative, video ad, facebook ad video, youtube ad, instagram ad, tiktok ad, promotional video, launch video
App Store and Google Play screenshot creation with exact platform specs. Covers iOS/Android dimensions, gallery ordering, device mockups, and preview videos. Use for: app store optimization, ASO, app screenshots, app preview, play store listing. Triggers: app store screenshots, aso, app store optimization, play store screenshots, app preview, app listing, ios screenshots, android screenshots, app store images, app mockup, device mockup, app gallery, store listing
Generate images using Nano Banana Pro (Gemini 3 Pro Preview). Use when creating app icons, logos, UI graphics, marketing banners, social media images, illustrations, diagrams, or any visual assets. Supports reference images for style transfer and character consistency. Triggers include phrases like 'generate an image', 'create a graphic', 'make an icon', 'design a logo', 'create a banner', 'same style as', 'keep the style', or any request needing visual content.
Generate and save images using Pollinations.ai's free, open-source API. No signup required. Supports URL-based generation, custom parameters (width, height, model, seed), and automatic file saving. Perfect for quick prototypes, marketing assets, and creative workflows.
| Create AI marketing videos for ads, promos, product launches, and brand content. product video, explainer video, ad creative, video ad, facebook ad video, youtube ad, instagram ad, tiktok ad, promotional video, launch video
Use when building App Store screenshot pages, generating exportable marketing screenshots for iOS apps, or creating programmatic screenshot generators with Next.js. Triggers on app store, screenshots, marketing assets, html-to-image, phone mockup.
Anti-AI-slop design skill for greenfield pages, audits, redesigns, and design extraction from URLs or screenshots. Use when the user asks to build a new app or landing page, wants to redesign something, invokes Hallmark by name, or uses audit/redesign/study.
Launch and supervise OpenShell gator agents. Use when starting gator on issues or PRs, checking gator sandboxes, building the gator sandbox image, restarting stuck gators, inspecting gator logs, or experimenting with gator harness/model overrides. Trigger keywords - launch gator, start gator, run gator, gator sandbox, supervised gator, gator logs, restart gator.
Take nicepkg/video-to-gif 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.