From ai-video
Host, stream, and deliver video using Mux — upload videos, generate playback URLs, monitor performance, create live streams, and add video to Shopify stores or websites. Use when hosting video infrastructure, embedding product videos, creating streaming experiences, monitoring video analytics, or delivering video at scale. Triggers: "mux", "mux video", "video hosting", "video streaming", "video embed", "video CDN", "video upload API".
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-video:mux-videoThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Host, stream, and deliver professional video using Mux's developer-friendly video API.
Host, stream, and deliver professional video using Mux's developer-friendly video API.
export MUX_TOKEN_ID="your-token-id"
export MUX_TOKEN_SECRET="your-token-secret"
curl -X POST "https://api.mux.com/video/v1/assets" \
-u "$MUX_TOKEN_ID:$MUX_TOKEN_SECRET" \
-H "Content-Type: application/json" \
-d '{
"input": "https://example.com/my-video.mp4",
"playback_policy": ["public"],
"mp4_support": "standard"
}'
# Step 1: Create upload URL
curl -X POST "https://api.mux.com/video/v1/uploads" \
-u "$MUX_TOKEN_ID:$MUX_TOKEN_SECRET" \
-H "Content-Type: application/json" \
-d '{"cors_origin": "https://your-site.com", "new_asset_settings": {"playback_policy": ["public"]}}'
# Step 2: PUT the video file to the returned upload_url (from client)
// HLS playback URL format
const playbackId = "your-playback-id";
const hlsUrl = `https://stream.mux.com/${playbackId}.m3u8`;
// Thumbnail
const thumbnailUrl = `https://image.mux.com/${playbackId}/thumbnail.jpg`;
const thumbnailWithTimestamp = `https://image.mux.com/${playbackId}/thumbnail.jpg?time=5`;
// Animated GIF preview
const gifUrl = `https://image.mux.com/${playbackId}/animated.gif`;
<!-- Via CDN -->
<script src="https://cdn.jsdelivr.net/npm/@mux/mux-player@2"></script>
<mux-player
playback-id="your-playback-id"
metadata-video-title="Hair Transformation Tutorial"
metadata-viewer-user-id="user-123"
accent-color="#d4a853"
autoplay="muted"
loop
muted
></mux-player>
Add Mux video to Shopify product pages:
{# In product template or section #}
{% if product.metafields.custom.mux_playback_id %}
<script src="https://cdn.jsdelivr.net/npm/@mux/mux-player@2"></script>
<mux-player
playback-id="{{ product.metafields.custom.mux_playback_id.value }}"
metadata-video-title="{{ product.title | escape }} — Demo Video"
accent-color="{{ settings.color_accent }}"
style="width: 100%; aspect-ratio: 16/9;"
></mux-player>
{% endif %}
curl "https://api.mux.com/video/v1/assets/{asset_id}" \
-u "$MUX_TOKEN_ID:$MUX_TOKEN_SECRET"
Response includes: status, duration, resolution, aspect_ratio, playback_ids
# Get video views
curl "https://api.mux.com/data/v1/metrics/video_views/breakdown?dimension=asset_id&timeframe=7:days" \
-u "$MUX_TOKEN_ID:$MUX_TOKEN_SECRET"
# Get playback quality metrics
curl "https://api.mux.com/data/v1/metrics/video_quality_score/overall?timeframe=7:days" \
-u "$MUX_TOKEN_ID:$MUX_TOKEN_SECRET"
# Create live stream
curl -X POST "https://api.mux.com/video/v1/live-streams" \
-u "$MUX_TOKEN_ID:$MUX_TOKEN_SECRET" \
-H "Content-Type: application/json" \
-d '{
"playback_policy": ["public"],
"new_asset_settings": {"playback_policy": ["public"]},
"reconnect_window": 60
}'
# Response includes stream_key for OBS/streaming software
# And playback_id for embedding the live stream
# Custom thumbnail (time in seconds)
https://image.mux.com/{playback_id}/thumbnail.jpg?time=3&width=1280&height=720
# Storyboard (sprite of thumbnails for scrubbing)
https://image.mux.com/{playback_id}/storyboard.jpg
# Animated GIF preview
https://image.mux.com/{playback_id}/animated.gif?start=2&end=8&fps=15&width=320
mux_playback_id as a product metafield for product demo videosCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub vincent-laroche/hairsolutionsco-ai-toolkit --plugin ai-video