feat : add custom skill
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
---
|
||||
name: bun-s3-media
|
||||
description: Add or maintain Buzz Sheet media uploads using the existing Bun S3-backed flows. Reuse shared upload infrastructure instead of adding feature-specific upload routes.
|
||||
---
|
||||
|
||||
# Buzz Sheet media uploads
|
||||
|
||||
Use the existing media flows when adding an upload feature. Keep S3 credentials and storage writes on the server, and do not create a feature-specific route that duplicates upload handling.
|
||||
|
||||
- For public guide images, reuse `MediaUploader` from `components/admin/media-uploader.tsx`. It posts to `POST /api/admin/media`, which validates the file and writes it to Bun S3 through `lib/media/repository.ts`.
|
||||
- For staged private media, reuse the existing presign, browser `PUT`, and completion flow in `/api/admin/media/presign` and `/api/admin/media/[id]/complete`. Preserve its authorization, metadata, validation, and visibility lifecycle.
|
||||
- For server-side jobs or integrations, use `getMediaStorage()` from `lib/media/storage.ts` rather than creating another S3 client or storage configuration. Use the existing media URL helper only for objects intended to be publicly served.
|
||||
- If a new feature needs behavior the shared flows do not support, extend the shared media infrastructure while preserving its validation and storage conventions.
|
||||
Reference in New Issue
Block a user