neuro-media-pipeline

Implements image optimization, S3/R2 uploads, and CDN delivery for media pipelines.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/webdevarif/claude-skills --skill neuro-media-pipeline-webdevarif
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: neuro-media-pipeline
Source: https://github.com/webdevarif/claude-skills/tree/main/neuro-media-pipeline
Command: npx skills add https://github.com/webdevarif/claude-skills --skill neuro-media-pipeline-webdevarif

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sharp, @aws-sdk/client-s3, @aws-sdk/s3-request-presigner, blurhash, file-type, zod.

What problem does it solve? Building production media handling—image optimization, secure uploads, CDN delivery, and asset organization—requires coordinating Sharp, S3/R2 SDKs, database schemas, and UI components, which is error-prone when done from scratch. ## Core Features & Use Cases - Image Optimization with Sharp: Resize, convert to WebP/AVIF, generate responsive variants, and create BlurHash/LQIP placeholders to prevent layout shift. - Upload Patterns: Server proxy uploads for small files and presigned URL uploads with XHR progress tracking for large files up to 500MB. - Media Management Architecture: Prisma schema for MediaFile, MediaVariant, MediaFolder, and tags, plus delete-with-cleanup flows that check usage before removing R2 objects. - Use Case: Add a media library to a Next.js e-commerce app where product images are optimized to WebP, uploaded directly to Cloudflare R2 via presigned URLs, and served through a CDN with immutable cache headers. ## Quick Start Ask the AI to analyze the existing media implementation and add an optimized image upload endpoint with Sharp and R2 presigned URLs.

Frequently Asked Questions about neuro-media-pipeline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upload large files to Cloudflare R2 from Next.js?

Use presigned URLs generated with @aws-sdk/s3-request-presigner so clients upload directly to R2, bypassing serverless function limits. The client uploads via XHR for progress tracking, then calls a confirm endpoint to save metadata to the database.

How to optimize images with Sharp in Node.js?

Use sharp(input).rotate().resize({fit: 'inside', withoutEnlargement: true}) then convert with .webp({quality: 80}) or .avif(). Generate responsive variants at 150/400/800/1600px widths and extract width/height metadata to prevent layout shift.

When should I use presigned URLs vs server proxy uploads?

Use server proxy for files under 5MB where you need server-side optimization before storage. Use presigned URLs for larger files up to 500MB to avoid proxying through serverless functions, which have memory and timeout limits.

Does Sharp work with animated GIFs?

Sharp resize loses GIF animation frames, so animated GIFs should skip optimization and only have metadata extracted. Use gifsicle instead if GIF resizing is required.

Why validate MIME type from file bytes instead of the extension?

Client-reported MIME types and extensions can be spoofed to upload malicious files. The file-type library detects the real format from magic bytes in the buffer, ensuring only allowed image, video, and document types are accepted.

What is BlurHash and when should I use it?

BlurHash is a ~20 character string encoding a blurred image placeholder, generated by encoding a 32px Sharp resize. Display it while the full image loads to eliminate visible pop-in and improve perceived performance.