/claude-for-swe-teams:muxfrom claude-for-swe-teams
Mux video integration for ABA courses. Use when working with video uploads, playback, asset management, or connecting Mux videos to course lessons. Covers the Mux Python SDK, signed playback tokens, lesson frontmatter fields, and the video player pipeline.
Ships in claude-for-swe-teams. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Mux hosts all course video content. Videos use signed playback (JWT tokens) — there are no public playback IDs.
Mux Dashboard (upload) → asset_id + playback_id
↓
Lesson frontmatter (courses/<slug>/<module>/<lesson>.md)
↓
course_loader.py (parses frontmatter → Lesson dataclass)
↓
lesson.py → mux.py (signs JWT tokens) → <mux-player> element
Set in .env (shared) or .env.local (dev override):
| Variable | Purpose |
|---|---|
MUX_TOKEN_ID | API authentication (username) — for asset queries |
MUX_TOKEN_SECRET | API authentication (password) — for asset queries |
MUX_SIGNING_KEY_ID | JWT signing key ID — for playback tokens |
MUX_SIGNING_SECRET_KEY | Base64-encoded RSA private key — for playback tokens |
The first pair is for server-side API calls (listing assets, fetching duration). The second pair is for signing playback tokens that the browser sends to Mux.
utils/mux.py)Three functions — all return None gracefully when env vars are missing:
get_mux_tokens(playback_id) → {"playback": token, "thumbnail": token, "storyboard": token} — signs JWT tokens for the <mux-player> elementsign_mux_token(playback_id, audience, expiry, extra_claims) → single JWT token (internal, called by get_mux_tokens)fetch_asset_duration(asset_id) → duration in minutes (rounded, min 1) — calls Mux Assets APIEach lesson .md file in courses/<course-slug>/ uses YAML frontmatter:
---
title: "Lesson Title"
duration: 3
playback_id: "abc123..."
asset_id: "xyz789..."
---
Optional markdown content below.
| Field | Type | Required | Description |
|---|---|---|---|
title | string | yes | Display title |
duration | int | no | Duration in minutes. Auto-fetched from Mux if asset_id is set |
playback_id | string | no | Mux signed playback ID — drives the video player |
asset_id | string | no | Mux asset ID — used for duration fetching |
Duration resolution order (in utils/course_loader.py):
duration in frontmatter → use itasset_id in frontmatter → call fetch_asset_duration(), write result back to frontmatterpages/lesson.py)The _video_player() function checks lesson.playback_id:
get_mux_tokens() to sign JWT tokens, renders <mux-player> with playback-id, playback-token, thumbnail-token, storyboard-tokenThe <mux-player> web component script is loaded via utils/config.py:
Script(src="https://cdn.jsdelivr.net/npm/@mux/mux-player", defer=True)
Use uv run python for all ad-hoc Mux scripts. The mux_python SDK is a project dependency.
uv run python -c "
import mux_python, os
from dotenv import load_dotenv
load_dotenv('.env.local', override=True)
load_dotenv('.env')
config = mux_python.Configuration()
config.username = os.getenv('MUX_TOKEN_ID')
config.password = os.getenv('MUX_TOKEN_SECRET')
client = mux_python.ApiClient(config)
assets_api = mux_python.AssetsApi(client)
resp = assets_api.list_assets(limit=100)
for a in resp.data:
meta = a.meta
title = meta._title if meta else '(no title)'
playback = [(p.id, p.policy) for p in (a.playback_ids or [])]
dur = round(a.duration, 1) if a.duration else '?'
print(f'{a.id} | {title} | {dur}s | {playback}')
"
Key gotcha: Asset titles live in meta._title (the private attribute), not in passthrough or a top-level title field. The meta object is an AssetMetadata — use attribute access, not dict .get().
Videos are titled with the pattern: c<course>-<module>_<lesson>-<slug>
Example: c4-3_2-mcp = course 4, module 3, lesson 2, slug "mcp"
asset_id and playback_id for each videoplayback_id and asset_id to each lesson's frontmatterduration with actual video duration (rounded to nearest minute, min 1)uv run main.py and navigating to a lesson pageWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub shawhint/claude-for-swe-teams --plugin claude-for-swe-teams5 skills in this plugin
/fasthtmlExpert FastHTML (python-fasthtml) assistant. Use when the user is building, reviewing, or asking about a FastHTML web application — including components, routing, HTMX integration, forms, database, styling, auth, or deployment. FastHTML is a Python hypermedia framework, not FastAPI./frontend-designCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics./lesson-helperOther plugins' skills for the same job