
Hwc Media Content
Handles the full lifecycle of media in Hotwire apps: file upload previews with blob URLs, video and audio playback controls, progress tracking that persists across sessions, and integrations with libraries like WaveSurfer, Swiper, and Blurhash. You'd reach for this when building anything from a simple image uploader to a full audio player with markers and lyrics sync. The skill emphasizes browser native APIs first (Picture-in-Picture, MediaSession, IntersectionObserver) and has strong opinions about resource cleanup in disconnect(). It deliberately excludes transport and form concerns, pushing those to neighboring skills. The reference library covers eight specific patterns, so you're working from real examples rather than generic advice.
- skills.sh installs
- 213
- GitHub stars
- 153
- last updated
- Aug 21, 2026
Install
$ npx -y skills add thehotwireclub/hotwire_club-skills --skill hwc-media-content --agent claude-codeInstalls into .claude/skills of the current project.
Files
Media & Rich Content
Implement media-centric Hotwire features with Stimulus and Turbo Frames.
Core Workflow
- Identify media mode: upload/preview, playback controls, progress persistence, or embedded library integration.
- Keep media state in Stimulus values; bridge third-party APIs through value callbacks and targets.
- Use browser-native APIs first (
URL.createObjectURL, Picture-in-Picture, IntersectionObserver, MediaSession). - Clean up all allocated resources in
disconnect()(observers, blob URLs, player instances, timers). - Persist only intentional client state (for example playback progress) and reconcile on load.
Guardrails
- Revoke blob URLs after image/file preview rendering.
- Prefer feature detection for browser APIs (PiP/Web Share/MediaSession).
- Avoid mixing transport concerns; media rendering belongs here, stream orchestration belongs in real-time skill.
- Keep frame updates incremental for time-based UI (lyrics, carousels, progress widgets).
Load References Selectively
Open only the file needed for the current request.
Sponsors
Details
- Repository
- github.com/thehotwireclub/hotwire_club-skills
- Categories
- Backend & APIs, Design & UI/UX
- First seen
- Jun 3, 2026