video-to-gif
Convert a video to multiple GIF variants with different quality/size tradeoffs. Generates a comparison set so the user can visually pick the best result.
What this skill does
# Skill: Video to GIF Convert a video file into multiple GIF variants with different parameters, so the user can visually compare and pick the best one. > **Prerequisite**: FFmpeg and uv must be installed. gifsicle is optional (enables lossy compression variants). --- ## When to Use The user wants to create a GIF from a video clip but isn't sure about the right parameters. GIF quality involves tradeoffs between: - **File size** — smaller is better for sharing/embedding - **Color accuracy** — fewer colors = smaller but may cause banding - **Smoothness** — higher FPS = smoother but larger - **Resolution** — wider = sharper detail but larger Rather than guessing, this skill generates multiple variants and lets the user decide. --- ## Default Workflow When the user provides a video file: ```bash uv run --python 3.12 /path/to/skills/video-to-gif/scripts/video_to_gif.py <input.mp4> ``` This generates GIFs in `<input>_gifs/` directory with the **full** preset (18 variants): - 3 FPS options: 10, 15, 20 - 3 widths: 480px, 640px, 800px - 2 color counts: 128, 256 Output includes a sorted comparison table showing file size, FPS, width, and colors for each variant. --- ## Presets | Preset | Variants | Best For | |--------|----------|----------| | `full` | ~18 | General use — broad exploration of the parameter space | | `minimal` | ~4 | Quick comparison — just a few key tradeoff points | | `lossy` | ~12 | Smallest files — includes gifsicle lossy compression levels | | `quality` | ~12 | Best visuals — higher res, includes bayer dithering | ```bash # Quick comparison with fewer variants uv run --python 3.12 .../video_to_gif.py input.mp4 --presets minimal # Include lossy compression (requires gifsicle) uv run --python 3.12 .../video_to_gif.py input.mp4 --presets lossy # Higher quality focus uv run --python 3.12 .../video_to_gif.py input.mp4 --presets quality ``` --- ## Common Options | Flag | Default | Description | |------|---------|-------------| | `-o`, `--output-dir` | `<input>_gifs/` | Output directory for all GIF variants | | `--start` | none | Start time in seconds (trim source) | | `--end` | none | End time in seconds (trim source) | | `--presets` | `full` | Preset config: full, minimal, lossy, quality | | `--fps` | preset | Override FPS values (e.g., `--fps 10 15 20`) | | `--width` | preset | Override width values (e.g., `--width 480 640`) | | `--colors` | preset | Override color counts (e.g., `--colors 128 256`) | | `--lossy` | preset | Gifsicle lossy levels (e.g., `--lossy 0 30 80`) | --- ## Examples ```bash # Convert first 10 seconds of a video uv run --python 3.12 .../video_to_gif.py demo.mp4 --end 10 # Extract a specific segment uv run --python 3.12 .../video_to_gif.py demo.mp4 --start 5 --end 15 # Custom parameter sweep uv run --python 3.12 .../video_to_gif.py demo.mp4 --fps 12 15 --width 480 800 --colors 256 # Lossy compression comparison (needs gifsicle) uv run --python 3.12 .../video_to_gif.py demo.mp4 --lossy 0 30 60 100 ``` --- ## How to Choose After running, open the output directory and compare: 1. **Start with the smallest files** — check if quality is acceptable 2. **Look for color banding** — if visible, try 256 colors or bayer dithering (quality preset) 3. **Check smoothness** — if too choppy, go up to 15 or 20 FPS 4. **Check clarity** — if text is unreadable, go up to 640 or 800px width The sweet spot for most screen recordings is usually around **640px, 15fps, 256 colors**. --- ## Important Notes - Widths larger than the source video resolution are automatically skipped. - The script uses FFmpeg's two-pass palette generation for optimal GIF quality (much better than single-pass). - Lossy compression via gifsicle can reduce file size by 30-70% with minimal visual impact at level 30-60. - For very long clips, consider trimming with `--start`/`--end` first — GIFs over 10 seconds can get very large.
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.