Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Implements media and file management components including file upload (drag-drop, multi-file, resumable), image galleries (lightbox, carousel, masonry), video players (custom controls, captions, adaptive streaming), audio players (waveform, playlists), document viewers (PDF, Office), and optimization strategies (compression, responsive images, lazy loading, CDN). Use when handling files, displaying media, or building rich content experiences.
.claude/skills/ancoleman-managing-media/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 107% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 149% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 83% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 83% | 0% |
| case-20 | ✗→✓ | ▲ Improved | 67% | 0% |
This skill provides systematic patterns for implementing media and file management components across all formats (images, videos, audio, documents). It covers upload workflows, display patterns, player controls, optimization strategies, and accessibility requirements to ensure performant, accessible, and user-friendly media experiences.
Activate this skill when:
Select implementation based on media type and requirements:
Images → Gallery pattern + lazy loading + responsive srcset
Videos → Player with controls + captions + adaptive streaming
Audio → Player with waveform + playlist support
Documents (PDF) → Viewer with navigation + search + download
File Upload (<10MB) → Basic drag-drop with preview
File Upload (>10MB) → Chunked upload with progress + resume
Multiple Files → Queue management + parallel uploadsFor detailed selection criteria, reference references/implementation-guide.md.
For small files with simple requirements:
references/upload-patterns.mdExample: examples/basic-upload.tsx
For large files requiring reliability:
references/advanced-upload.mdExample: examples/chunked-upload.tsx
For image files with editing requirements:
references/image-upload.mdExample: examples/image-upload-crop.tsx
For collections of images:
references/gallery-patterns.mdExample: examples/image-gallery.tsx
For sequential image display:
references/carousel-patterns.mdExample: examples/carousel.tsx
Essential optimization strategies:
srcset and sizesreferences/image-optimization.mdFor custom video playback:
references/video-player.mdExample: examples/video-player.tsx
Performance strategies for video:
metadata, auto, none)references/video-optimization.mdFor audio playback:
references/audio-player.mdExample: examples/audio-player.tsx
For PDF document display:
references/pdf-viewer.mdExample: examples/pdf-viewer.tsx
For DOCX, XLSX, PPTX files:
references/office-viewer.mdValidate client-side before upload:
bash# Generate optimized image set python scripts/optimize_images.py --input image.jpg --formats webp,jpg,avif
Strategies:
srcset for device targetingReference references/performance-optimization.md for complete guide.
Strategies:
Essential patterns:
alt="") for decorative images<figure> and <figcaption> for contextreferences/accessibility-images.mdEssential patterns:
references/accessibility-video.mdEssential patterns:
references/accessibility-audio.mdTo validate accessibility:
bashnode scripts/validate_media_accessibility.js
For complete requirements, reference references/accessibility-patterns.md.
Best for feature-complete galleries:
bashnpm install react-image-gallery
See examples/gallery-react-image.tsx for implementation. Reference /xiaolin/react-image-gallery for documentation.
Alternative: LightGallery (more features, larger bundle)
Best for custom video players:
bashnpm install video.js
See examples/video-js-player.tsx for implementation.
Best for waveform visualization:
bashnpm install wavesurfer.js
See examples/audio-waveform.tsx for implementation.
Best for PDF rendering in React:
bashnpm install react-pdf
See examples/pdf-react.tsx for implementation.
For detailed comparison, reference references/library-comparison.md.
All media components use the design-tokens skill for theming:
Supports light, dark, high-contrast, and custom themes. Reference the design-tokens skill for theme switching.
Example token usage:
css.upload-zone { border: var(--upload-zone-border); background: var(--upload-zone-bg); padding: var(--upload-zone-padding); border-radius: var(--upload-zone-border-radius); } .image-gallery { gap: var(--gallery-gap); } .video-player { background: var(--video-player-bg); border-radius: var(--video-border-radius); }
Four responsive approaches:
See examples/responsive-gallery.tsx for implementations.
Responsive considerations:
Reference references/responsive-media.md for patterns.
For AWS S3, Cloudinary, etc.:
Benefits:
See examples/s3-direct-upload.tsx for implementation. Reference references/cloud-storage.md for setup.
Generate mock media:
bash# Generate test images python scripts/generate_mock_images.py --count 50 --sizes thumb,medium,large # Generate test video metadata python scripts/generate_video_metadata.py --duration 300
Validate media accessibility:
bashnode scripts/validate_media_accessibility.js
Analyze performance:
bashnode scripts/analyze_media_performance.js --files images/*.jpg
Start with the example matching the requirements:
basic-upload.tsx # Simple drag-drop upload
chunked-upload.tsx # Large file upload with resume
image-upload-crop.tsx # Image upload with cropping
image-gallery.tsx # Grid gallery with lightbox
carousel.tsx # Image carousel/slider
video-player.tsx # Custom video player
audio-player.tsx # Audio player with controls
audio-waveform.tsx # Audio with waveform visualization
pdf-viewer.tsx # PDF document viewer
s3-direct-upload.tsx # Direct upload to S3
responsive-gallery.tsx # Responsive image gallery patternsscripts/optimize_images.py - Batch image optimizationscripts/generate_mock_images.py - Test image generationscripts/validate_media_accessibility.js - Accessibility validationscripts/analyze_media_performance.js - Performance analysisreferences/upload-patterns.md - File upload implementationsreferences/gallery-patterns.md - Image gallery designsreferences/video-player.md - Video player featuresreferences/audio-player.md - Audio player patternsreferences/pdf-viewer.md - Document viewer setupreferences/accessibility-patterns.md - Media accessibilityreferences/performance-optimization.md - Optimization strategiesreferences/cloud-storage.md - Cloud integration guidesreferences/library-comparison.md - Library analysisexamples/ directory for working implementationsassets/upload-config.json - Upload constraints and settingsassets/media-templates/ - Placeholder images and iconsThis skill works with other component skills:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-07 | pass→pass | 11,206 | 10,134 | -10% | 1 | 1 | 0% | 1,866 | 4,489 | +141% | 0 | 0 | — |
case-08 | fail→pass | 17,685 | 16,434 | -7% | 1 | 1 | 0% | 2,816 | 5,818 | +107% | 0 | 0 | — |
case-01 | fail→fail | 27,150 | 28,651 | +6% | 1 | 1 | 0% | 5,177 | 9,227 | +78% | 0 | 0 | — |
case-02 | fail→fail | 29,562 | 26,145 | -12% | 1 | 1 | 0% | 6,206 | 8,382 | +35% | 0 | 0 | — |
case-03 | pass→pass | 17,272 | 20,527 | +19% | 1 | 1 | 0% | 2,889 | 7,120 | +146% | 0 | 0 | — |
case-04 | fail→fail | 12,505 | 9,658 | -23% | 1 | 1 | 0% | 1,890 | 4,423 | +134% | 0 | 0 | — |
case-05 | pass→pass | 17,548 | 19,704 | +12% | 1 | 1 | 0% | 2,776 | 6,880 | +148% | 0 | 0 | — |
case-06 | fail→pass | 32,860 | 32,747 | -0% | 1 | 1 | 0% | 3,087 | 7,692 | +149% | 0 | 0 | — |
case-09 | pass→pass | 16,788 | 14,137 | -16% | 1 | 1 | 0% | 2,967 | 5,713 | +93% | 0 | 0 | — |
case-10 | fail→pass | 19,274 | 13,323 | -31% | 1 | 1 | 0% | 3,000 | 5,490 | +83% | 0 | 0 | — |
case-11 | fail→pass | 18,149 | 12,620 | -30% | 1 | 1 | 0% | 2,949 | 5,399 | +83% | 0 | 0 | — |
case-12 | pass→pass | 14,076 | 16,629 | +18% | 1 | 1 | 0% | 2,316 | 5,851 | +153% | 0 | 0 | — |
case-13 | pass→pass | 24,446 | 11,341 | -54% | 1 | 1 | 0% | 2,772 | 5,217 | +88% | 0 | 0 | — |
case-14 | pass→pass | 18,293 | 16,084 | -12% | 1 | 1 | 0% | 3,214 | 6,258 | +95% | 0 | 0 | — |
case-15 | pass→pass | 18,703 | 14,870 | -20% | 1 | 1 | 0% | 2,943 | 5,594 | +90% | 0 | 0 | — |
case-16 | pass→pass | 19,080 | 12,719 | -33% | 1 | 1 | 0% | 3,075 | 5,195 | +69% | 0 | 0 | — |
case-17 | pass→pass | 11,444 | 9,168 | -20% | 1 | 1 | 0% | 2,001 | 4,556 | +128% | 0 | 0 | — |
case-18 | pass→pass | 7,421 | 5,194 | -30% | 1 | 1 | 0% | 1,265 | 3,777 | +199% | 0 | 0 | — |
case-19 | fail→fail | 21,553 | 11,563 | -46% | 1 | 1 | 0% | 3,349 | 5,216 | +56% | 0 | 0 | — |
case-20 | fail→pass | 23,263 | 5,860 | -75% | 1 | 1 | 0% | 2,357 | 3,934 | +67% | 0 | 0 | — |
case-21 | fail→fail | 18,822 | 17,131 | -9% | 1 | 1 | 0% | 3,653 | 6,544 | +79% | 0 | 0 | — |
case-22 | fail→fail | 15,508 | 9,458 | -39% | 1 | 1 | 0% | 3,034 | 4,804 | +58% | 0 | 0 | — |
case-23 | fail→fail | 10,293 | 6,543 | -36% | 1 | 1 | 0% | 1,579 | 4,193 | +166% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +22 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.