← スキル一覧に戻る

upload-to-r2
by chufucious
AI-assisted photo gallery creation with Smith/Colberg/Szarkowski-informed layout curation
⭐ 0🍴 0📅 2026年1月14日
SKILL.md
name: upload-to-r2 description: Upload files to Cloudflare R2 storage. Supports images and videos with optional optimization. Returns public URLs.
Upload to R2
Generic skill to upload files to Cloudflare R2 storage.
Prerequisites
wranglerinstalled and authenticated (npm install -g wrangler && wrangler login)- R2 bucket configured (
chu-videosfor videos,chu-imagesfor images)
Usage
/upload-to-r2 {file-or-folder} {bucket-path} [--optimize]
Examples:
/upload-to-r2 ./video.mp4 cabo-2025/- Upload single video/upload-to-r2 ./optimized/ cabo-2025/- Upload folder contents/upload-to-r2 ./videos/ cabo-2025/ --optimize- Optimize then upload
Buckets
| Bucket | Domain | Use Case |
|---|---|---|
chu-videos | play.chu.fyi | Video files (.mp4) |
chu-images | images.chu.fyi | Image files (future) |
Video Optimization
When --optimize flag is passed, runs optimization before upload:
./scripts/optimize-videos.sh {input} ./tmp-optimized
Optimization settings:
- H.265/HEVC codec (50% more efficient than H.264)
- CRF 28 quality level
- Max 1920px width (maintains aspect)
- Audio removed (for muted loop videos)
- Faststart for web streaming
- Safari/iOS compatible (hvc1 tag)
Upload Commands
Single File
wrangler r2 object put chu-videos/{bucket-path}/{filename} --file {local-file} --remote
Multiple Files
for file in {folder}/*.mp4; do
filename=$(basename "$file")
wrangler r2 object put chu-videos/{bucket-path}/$filename --file "$file" --remote
done
Output
Returns URLs for uploaded files:
Uploaded 3 files to chu-videos/cabo-2025/:
- https://play.chu.fyi/cabo-2025/drinks-at-cuzi.mp4
- https://play.chu.fyi/cabo-2025/water-balloon-fight.mp4
- https://play.chu.fyi/cabo-2025/shark-attack.mp4
Using Videos in Gallery
import LazyVideo from "../../../components/LazyVideo.svelte";
<LazyVideo
src="https://play.chu.fyi/{bucket-path}/video-name.mp4"
ariaLabel="Description of video"
client:visible
/>
Composability
This skill is used by:
/gallery- When gallery includes video content- Can be used standalone for any R2 upload task
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です