Skip to content

jianshuo/claude-skills / wjs-uploading-video

wjs-uploading-video

Verified

Upload one or many videos to YouTube. Use when the user wants to "上传到 YouTube", "发 YouTube", "批量上传", "upload to YouTube", "post videos to YouTube", or to publish a finished `final/` directory of MP4s. Reads per-video metadata (title / description / tags) from a sibling `UPLOAD_META.md` file when present (the user's standard markdown format), or from command-line flags. Survives behind a SOCKS/HTTP proxy by using `requests` directly for the resumable upload (the stock `google-api-python-client` MediaFileUpload stalls under this user's proxy setup).

FileKindSize
SKILL.mdskill md8.7 KB
references/credentials-setup.mdmarkdown2.6 KB
scripts/upload_youtube.pyexecutablescript18.7 KB

references/credentials-setup.md

View on GitHub
# Google Cloud OAuth setup for YouTube upload

One-time, ~5 minutes. Result: a `credentials.json` file you save to `~/.config/youtube/credentials.json`.

## 1. Create a project

1. https://console.cloud.google.com → top-bar project picker → **New Project**
2. Name it anything (e.g., `youtube-upload`) and create

## 2. Enable the API

1. APIs & Services → **Library**
2. Search **YouTube Data API v3** → **Enable**

## 3. Configure the OAuth consent screen

1. APIs & Services → **OAuth consent screen**
2. User Type: **External** → Create
3. App name: `YouTube Upload`. Support email: your address. Developer contact: your address. Save & continue.
4. Scopes step: leave empty, continue.
5. **Test users**: add your own Google account (the one you'll upload from). Save.

This puts the app in **Testing** mode — that's fine; only the Test users you listed can grant access. There's no need to ever publish/verify the app.

## 4. Create the OAuth client

1. APIs & Services → **Credentials**
2. **+ Create Credentials** → **OAuth client ID**
3. Application type: **Desktop app**
4. Create → **Download JSON**
5. Move it to `~/.config/youtube/credentials.json`:

```bash
mkdir -p ~/.config/youtube
mv ~/Downloads/client_secret_*.json ~/.config/youtube/credentials.json
```

## 5. First upload triggers consent

The first time the upload script runs, it opens your browser:

1. Pick the Google account you added as a Test user
2. Google shows a **"Google hasn't verified this app"** warning — click **Advanced** → **Go to YouTube Upload (unsafe)**. This is normal for a personal OAuth app in Testing mode; you own the app, the warning is about Google not having reviewed it.
3. Grant the `youtube.upload` scope → Continue
4. The script writes `~/.config/youtube/token.json` — subsequent runs reuse it silently, no browser

## Common pitfalls

- **`access_denied 403`** on consent: your Google account isn't on the Test users list. Add it (step 3.5) and retry.
- **Wrong project**: the Credentials and OAuth consent screen pages always show data for the currently selected project (top bar). If you created the client in project A but OAuth consent screen is currently showing project B, you'll get cryptic errors. Confirm the project name matches.
- **Token expired and refresh fails**: delete `~/.config/youtube/token.json` and re-run; browser flow re-runs.

## Quota

YouTube Data API default quota is **10,000 units/day**. An upload costs **1,600 units**, so you get ~6 uploads/day on the default tier. If you need more, request a quota increase in Google Cloud Console under **APIs & Services → Quotas**.
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall