{"id":"cloud-uploader","name":"cloud-uploader","summary":"プロモーション動画やコンテンツをCloudflare R2やAWS S3にアップロードします。ユーザーがソーシャルメディアや配信用のプロモーションコンテンツをホストしたい場合に利用してください。","body":"# Cloud Uploader Skill\n\nUpload promo videos and other album content to cloud storage (Cloudflare R2 or AWS S3).\n\n## Purpose\n\nAfter generating promo videos with `/bitwize-music:promo-director`, upload them to cloud storage for:\n- Hosting on websites\n- Sharing via direct links\n- CDN distribution\n- Backup and archival\n\n## When to Use\n\n- After promo videos generated, user wants to upload to cloud\n- User says \"upload promos to R2\" or \"upload to S3\"\n- User says \"upload promo videos for [album]\"\n- Manual invocation only (not automatic)\n\n## Position in Workflow\n\n```\nGenerate → Master → Promo Videos → **[Cloud Upload]** → Release\n```\n\nOptional step after promo-director, before release-director.\n\n## Prerequisites\n\n### Cloud Configuration\n\nCloud credentials must be configured in `~/.bitwize-music/config.yaml`:\n\n```yaml\ncloud:\n  enabled: true\n  provider: \"r2\"  # or \"s3\"\n\n  # For Cloudflare R2\n  r2:\n    account_id: \"your-account-id\"\n    access_key_id: \"your-access-key\"\n    secret_access_key: \"your-secret-key\"\n    bucket: \"promo-videos\"\n\n  # For AWS S3\n  s3:\n    region: \"us-west-2\"\n    access_key_id: \"your-access-key\"\n    secret_access_key: \"your-secret-key\"\n    bucket: \"promo-videos\"\n```\n\nSee `${CLAUDE_PLUGIN_ROOT}/reference/cloud/setup-guide.md` for detailed setup instructions.\n\n### Required Files\n\n- Promo videos generated (run `/bitwize-music:promo-director` first)\n- Located at: `{audio_root}/artists/{artist}/albums/{genre}/{album}/promo_videos/`\n- Album sampler at: `{audio_root}/artists/{artist}/albums/{genre}/{album}/album_sampler.mp4`\n\n### Python Dependencies\n\n```bash\n# If using the shared venv (recommended)\n~/.bitwize-music/venv/bin/pip install -r ${CLAUDE_PLUGIN_ROOT}/requirements.txt\n\n# Or install separately\npip install boto3\n```\n\nThe upload script uses `~/.bitwize-music/venv` if available, otherwise falls back to system Python.\n\n## Workflow\n\n### 1. Verify Prerequisites\n\n**Check config:**\n```bash\ncat ~/.bitwize-music/config.yaml | grep -A 20 \"cloud:\"\n```\n\nVerify:\n- `cloud.enabled: true`\n- Provider credentials configured (r2 or s3)\n- Bucket name set\n\n**Check promo videos exist:**\n```bash\nls {audio_root}/artists/{artist}/albums/{genre}/{album}/promo_videos/\nls {audio_root}/artists/{artist}/albums/{genre}/{album}/album_sampler.mp4\n```\n\nIf missing:\n```\nError: Promo videos not found.\n\nGenerate with: /bitwize-music:promo-director {album}\n```\n\n### 2. Get Python Command\n\n**Call `get_python_command()` first** to get the venv Python path and plugin root. Use these for all bash invocations below.\n\n```\nPYTHON=\"{python from get_python_command}\"\nPLUGIN_DIR=\"{plugin_root from get_python_command}\"\n```\n\n### 3. Preview Upload (Dry Run)\n\nPreview first:\n```bash\n$PYTHON \"$PLUGIN_DIR/tools/cloud/upload_to_cloud.py\" {album} --dry-run\n```\n\nOutput shows:\n- Provider and bucket\n- Files to upload\n- S3 keys (paths in bucket)\n- File sizes\n\n### 4. Upload Files\n\n**Upload all (promos + sampler):**\n```bash\n$PYTHON \"$PLUGIN_DIR/tools/cloud/upload_to_cloud.py\" {album}\n```\n\n**Upload only track promos:**\n```bash\n$PYTHON \"$PLUGIN_DIR/tools/cloud/upload_to_cloud.py\" {album} --type promos\n```\n\n**Upload only album sampler:**\n```bash\n$PYTHON \"$PLUGIN_DIR/tools/cloud/upload_to_cloud.py\" {album} --type sampler\n```\n\n**Upload with public access:**\n```bash\n$PYTHON \"$PLUGIN_DIR/tools/cloud/upload_to_cloud.py\" {album} --public\n```\n\n### 5. Verify Upload\n\n**For R2:**\n- Check Cloudflare dashboard → R2 → Your bucket\n- Files should appear under `{artist}/{album}/`\n\n**For S3:**\n- Check AWS Console → S3 → Your bucket\n- Or use AWS CLI: `aws s3 ls s3://{bucket}/{artist}/{album}/`\n\n### 5. Report Results\n\n```\n## Cloud Upload Complete\n\n**Provider:** R2 (or S3)\n**Bucket:** {bucket}\n**Album:** {album}\n\n**Uploaded Files:**\n- {artist}/{album}/promos/01-track_promo.mp4\n- {artist}/{album}/promos/02-track_promo.mp4\n- ...\n- {artist}/{album}/promos/album_sampler.mp4\n\n**Total:** 11 files, 125.4 MB\n\n**Next Steps:**\n1. Verify files in cloud dashboard\n2. If public: Test URLs work\n3. Continue to release: /bitwize-music:release-director {album}\n```\n\n## Upload Path Structure\n\n**IMPORTANT: Cloud paths are FLAT - no genre folder.**\n\nThe cloud path structure is different from the local content structure:\n\n| Location | Path Structure |\n|----------|----------------|\n| Local content | `{content_root}/artists/{artist}/albums/{genre}/{album}/` |\n| Local audio | `{audio_root}/artists/{artist}/albums/{genre}/{album}/` |\n| **Cloud** | `{artist}/{album}/` (no genre!) |\n\nFiles are organized in the bucket as:\n\n```\n{bucket}/\n└── {artist}/\n    └── {album}/\n        └── promos/\n            ├── 01-track_promo.mp4\n            ├── 02-track_promo.mp4\n            ├── ...\n            └── album_sampler.mp4\n```\n\n**Example for album \"my-album\" by \"bitwize\" in rock genre:**\n- Local: `~/music/artists/bitwize/albums/rock/my-album/`\n- Cloud: `bitwize/my-album/promos/` (NOT `bitwize/albums/rock/my-album/`)\n\n## Command Options\n\n| Option | Description |\n|--------|-------------|\n| `--type promos` | Upload only track promo videos |\n| `--type sampler` | Upload only album sampler |\n| `--type all` | Upload both (default) |\n| `--dry-run` | Preview without uploading |\n| `--public` | Set files as public-read |\n| `--audio-root PATH` | Override audio_root from config |\n\n## Invocation Examples\n\n**Basic upload:**\n```\n/bitwize-music:cloud-uploader my-album\n```\n\n**Preview only:**\n```\n/bitwize-music:cloud-uploader my-album --dry-run\n```\n\n**Upload promos only:**\n```\n/bitwize-music:cloud-uploader my-album --type promos\n```\n\n**Upload with public access:**\n```\n/bitwize-music:cloud-uploader my-album --public\n```\n\n## Error Handling\n\n**\"Cloud uploads not enabled\"**\n- Add `cloud.enabled: true` to config\n- See `${CLAUDE_PLUGIN_ROOT}/reference/cloud/setup-guide.md`\n\n**\"Credentials not configured\"**\n- Add credentials to config file\n- For R2: account_id, access_key_id, secret_access_key\n- For S3: access_key_id, secret_access_key\n\n**\"Album not found\"**\n- Check album exists in `{audio_root}/artists/{artist}/albums/{genre}/{album}/`\n- Verify artist name in config matches\n\n**\"No files found to upload\"**\n- Generate promo videos first: `/bitwize-music:promo-director {album}`\n\n**\"Access Denied\"**\n- Check credentials are correct\n- For R2: Verify API token has write permissions\n- For S3: Verify IAM policy allows s3:PutObject\n\n**\"Bucket not found\"**\n- Create bucket first in cloud dashboard\n- Verify bucket name in config\n\n## Security Notes\n\n- Credentials stored in config file (ensure proper file permissions)\n- Config file should be gitignored in user's content repo\n- Default: Files uploaded as private (not public)\n- Use `--public` flag only for files intended for public access\n- Consider using environment variables for CI/CD (future enhancement)\n\n## Integration with Other Skills\n\n### Handoff FROM\n\n**promo-director:**\n\nAfter promo generation:\n```\nPromo videos generated successfully.\n\n**Optional:** Upload to cloud storage: /bitwize-music:cloud-uploader {album}\n```\n\n### Handoff TO\n\n**release-director:**\n\nAfter cloud upload:\n```\nCloud upload complete.\n\nReady for release workflow: /bitwize-music:release-director {album}\n```\n\n## Supported Providers\n\n### Cloudflare R2\n\n- S3-compatible API\n- No egress fees\n- Global CDN integration\n- Good for high-traffic content\n\n### AWS S3\n\n- Industry standard\n- Fine-grained IAM permissions\n- CloudFront CDN available\n- Good for AWS ecosystem integration\n\n## Future Enhancements\n\n- Environment variable credentials (for CI/CD)\n- Multiple bucket support\n- Automatic CDN invalidation\n- Progress bar for large uploads\n- Resume failed uploads\n- Bucket creation if missing\n- Additional providers (Backblaze B2, DigitalOcean Spaces)\n\n## Related Documentation\n\n- `${CLAUDE_PLUGIN_ROOT}/reference/cloud/setup-guide.md` - Detailed setup instructions\n- `${CLAUDE_PLUGIN_ROOT}/skills/promo-director/SKILL.md` - Generate promo videos\n- `${CLAUDE_PLUGIN_ROOT}/skills/release-director/SKILL.md` - Release workflow\n\n## Model Recommendation\n\n**Sonnet 4.5** - This skill runs scripts and coordinates workflow. No creative output from LLM.\n\n## Version History\n\n- v0.14.0 - Initial implementation\n  - R2 and S3 support via boto3\n  - Dry-run mode\n  - Public/private upload options\n  - Path organization by artist/album","author":"@bitwize-music-studio","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/bitwize-music-studio/claude-ai-music-skills/tree/main/skills/cloud-uploader","license":"CC0-1.0","category":"productivity","lang":"en","tokens":2177,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[],"requires":{"mcp":[],"tools":["Read","Bash","Glob"]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":[]}}