cloudinary-media
Làm việc với media theo pattern repo (Cloudinary lưu file, Supabase lưu metadata/reference). Dùng khi hiển thị ảnh cover, tối ưu ảnh, hoặc thao tác media trong admin.
When & Why to Use This Skill
This Claude skill facilitates a robust media management system following the repository pattern. It integrates Cloudinary for high-performance file storage and Supabase for structured metadata management, enabling developers to efficiently handle image optimization, cover photo rendering, and administrative media operations within Next.js applications while maintaining strict architectural standards.
Use Cases
- Architecting a centralized media repository: Seamlessly store physical files in Cloudinary while maintaining searchable metadata and references in Supabase tables.
- Dynamic Image Optimization: Implementing the CldImage component pattern to render responsive, high-performance images with automatic alt-text fallbacks for improved SEO.
- Secure Admin Media Operations: Managing media assets within administrative dashboards using standardized CRUD patterns that prevent hardcoded secrets and ensure database schema consistency via migrations.
| name | cloudinary-media |
|---|---|
| description | Làm việc với media theo pattern repo (Cloudinary lưu file, Supabase lưu metadata/reference). Dùng khi hiển thị ảnh cover, tối ưu ảnh, hoặc thao tác media trong admin. |
Cloudinary + Media (repo pattern)
Khi nào dùng skill này
- Khi bạn nói: “Cloudinary”, “ảnh cover”, “media metadata”, “tối ưu ảnh”, “CldImage”.
Quy tắc kiến trúc
- File ảnh/video: Cloudinary.
- Metadata/reference: Supabase table
media(không hardcode secrets/keys).
UI pattern
- Dùng
next-cloudinary(CldImage) để render ảnh khi cócloudinary_public_idvà kích thước. altưu tiên:alt_text(nếu có) → fallbacktitle.
Checklist trước khi merge
- Không thêm URL Cloudinary hardcode (tạo từ metadata/reference).
- Không commit bất kỳ secret nào.
- Nếu cần thay đổi schema media: dùng Supabase MCP
apply_migration.