agentleFS
allthriveaiallthriveai/amplify/.claude/skills/youtube-upload/SKILL.md

youtube-upload

Skill0 starsChanged 3 months agoMITView on GitHub

Upload videos to YouTube via the API. Supports single uploads, batch uploads, scheduled publishing, Shorts, thumbnails, and descriptions. Use when the user wants to upload, schedule, or publish videos to YouTube.

  • Reads credentials

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 7 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If YOUTUBE_REFRESH_TOKEN is missing, run: npx tsx scripts/youtube-auth.ts

    line 14
  2. Distinctive:

    Ask the user or infer from context:

    line 18
  3. Very specific:

    Is Short?: Add #Shorts to title if yes

    line 32
  4. Very specific:

    Use createYouTubeClient from src/studio/youtube.ts:

    line 38
  5. Distinctive:

    Read the channel from the authorized credentials rather than assuming one.

    line 75
  6. Distinctive:

    If the user has both a personal account and a brand account, confirm which one holds the OAuth grant before uploading — they map to …

    line 76
  7. Distinctive:

    Default schedule time: 9am PT (16:00 UTC)

    line 82
  8. Very specific:

    Add #Shorts to the title

    line 90
  9. Distinctive:

    Don't upload to a brand account unless that is where the OAuth grant was made — it creates a separate channel

    line 95
  10. Very specific:

    Don't set madeForKids to true — this disables comments and notifications

    line 96
  11. Distinctive:

    Don't upload more than 6 videos per day — quota is 10,000 units, each upload costs 1,600

    line 97
  12. Distinctive:

    Don't make videos public without the user reviewing them first — always default to private

    line 98

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

YouTube Upload

Instructions

Step 0: Load Config

Load .env for YOUTUBE_REFRESH_TOKEN. Credentials file is at youtube-credentials.json in the amplify project root.

If YOUTUBE_REFRESH_TOKEN is missing, run: npx tsx scripts/youtube-auth.ts

Step 1: Determine Upload Type

Ask the user or infer from context:

  • Single video: one file, one upload
  • Batch: multiple files (e.g., 7 Shorts from a series)
  • Scheduled: spread uploads over time (e.g., one per day)

Step 2: Gather Metadata

For each video, collect:

  • File path (required)
  • Title (required, under 100 chars)
  • Description (include article link, hashtags)
  • Tags (comma-separated)
  • Privacy: public, unlisted, or private (default: private)
  • Is Short?: Add #Shorts to title if yes
  • Thumbnail: Optional image path
  • Schedule date: Optional ISO date for scheduled publishing

Step 3: Upload

Use createYouTubeClient from src/studio/youtube.ts:

import { createYouTubeClient } from "../src/studio/youtube.js";

const client = createYouTubeClient("youtube-credentials.json", process.env.YOUTUBE_REFRESH_TOKEN);

const { videoId, url } = await client.upload({
  filePath: "path/to/video.mp4",
  title: "Video Title",
  description: "Description",
  tags: ["tag1", "tag2"],
  privacy: "private",
  isShort: true,
  thumbnailPath: "path/to/thumb.png",
});

For scheduled publishing, use the googleapis library directly with publishAt:

status: {
  privacyStatus: "private",
  publishAt: "2026-04-26T16:00:00Z", // 9am PT
  selfDeclaredMadeForKids: false,
}

Step 4: Report

Show the user:

  • Video ID and URL for each upload
  • Schedule dates if applicable
  • Remind them to check YouTube Studio to verify

Channel Info

Read the channel from the authorized credentials rather than assuming one. If the user has both a personal account and a brand account, confirm which one holds the OAuth grant before uploading — they map to different channels.

Scheduling Best Practices

  • One video per day for Shorts — YouTube algorithm rewards consistency
  • Default schedule time: 9am PT (16:00 UTC)
  • Upload as private with publishAt — lets the user review before it goes live
  • Category ID 28 = Science & Technology

Shorts Requirements

  • Resolution: 1080x1920 (9:16)
  • Max duration: 60 seconds
  • Add #Shorts to the title
  • YouTube auto-detects Shorts by aspect ratio, but the hashtag helps

What NOT to do

  • Don't upload to a brand account unless that is where the OAuth grant was made — it creates a separate channel
  • Don't set madeForKids to true — this disables comments and notifications
  • Don't upload more than 6 videos per day — quota is 10,000 units, each upload costs 1,600
  • Don't make videos public without the user reviewing them first — always default to private

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.