Communitygithub.com

Anhvu1107/all-agent-skill

當請求與 YouTube 自動化相關時,務必使用此技能:透過 Rube MCP (Composio) 自動化 YouTube 任務,包括上傳影片、管理播放清單、搜尋內容、取得分析數據及管理留言。

all-agent-skill 是什麼?

此技能讓開發人員和 AI 代理能透過 Composio 的 YouTube 工具組,經由 Rube MCP 伺服器自動化 YouTube 操作。它涵蓋完整的 YouTube 管理生命週期:影片上傳與後設資料更新、內容搜尋、播放清單建立與管理、頻道與影片分析、以及訂閱與留言管理。該技能強調效率與資源管理,包含清楚的工作流程、常見陷阱與配額限制(例如上傳耗用 1600 單位、搜尋 100 單位、列表僅 1 單位),協助使用者避免非預期的 API 費用。它支援 Claude Code、Cursor、Codex 等透過 Rube MCP 串接的 AI 代理平台。設定方式簡潔:只需將 `https://rube.app/mcp` 新增為 MCP 伺服器,透過 `RUBE_MANAGE_CONNECTIONS` 啟動 YouTube 連線,並確認狀態為 ACTIVE。每個工作流程都有明確的「何時使用」條件,幫助代理判斷何時觸發以節省配額。文件也提供了 ID 格式(影片、頻道、播放清單)的快速參考表,並針對常見的解析陷阱(如統計值為字串、持續時間為 ISO 8601 格式)提出警告。整體而言,此技能是將任何支援 MCP 的 AI 代理轉變為完整 YouTube 管理員的實用工具,特別注重可靠且節省配額的操作。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Anhvu1107/all-agent-skill/tree/HEAD/.agent/skills/youtube-automation

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

透過 Rube MCP 實現 YouTube 自動化

選擇性閱讀規則

請從以下文件開始:

  • references/senior-master-standard.md
  • references/usage-routing.md
  • references/quality-checklist.md

然後僅載入與使用者實際任務相符的繼承文件、腳本、資產或範例。

透過 Composio 的 YouTube 工具組,經由 Rube MCP 自動化 YouTube 操作。

先決條件

  • Rube MCP 必須已連線(RUBE_SEARCH_TOOLS 可用)
  • 透過 RUBE_MANAGE_CONNECTIONS 搭配工具組 youtube 啟用有效的 YouTube 連線
  • 一律先呼叫 RUBE_SEARCH_TOOLS 以取得當前的工具架構

設定

取得 Rube MCP:在您的客戶端設定中將 https://rube.app/mcp 新增為 MCP 伺服器。無需 API 金鑰 — 只需加入端點即可運作。

  1. 確認 RUBE_SEARCH_TOOLS 有回應,以驗證 Rube MCP 可用
  2. 使用工具組 youtube 呼叫 RUBE_MANAGE_CONNECTIONS
  3. 若連線狀態不是 ACTIVE,請依循回傳的驗證連結完成 Google OAuth
  4. 在執行任何工作流程前,確認連線狀態顯示為 ACTIVE

核心工作流程

1. 上傳與管理影片

使用時機:使用者想要上傳影片或更新影片後設資料

工具順序:

  1. YOUTUBE_UPLOAD_VIDEO - 上傳新影片 [必要]
  2. YOUTUBE_UPDATE_VIDEO - 更新標題、描述、標籤、隱私設定 [選用]
  3. YOUTUBE_UPDATE_THUMBNAIL - 設定自訂縮圖 [選用]

主要參數:

  • title:影片標題(最多 100 個字元)
  • description:影片描述(最多 5000 bytes)
  • tags:關鍵字標籤陣列
  • categoryId:YouTube 分類 ID(例如 '22' 代表人物與部落格)
  • privacyStatus:'public'、'private' 或 'unlisted'
  • videoFilePath:包含 {name, mimetype, s3key} 的物件,代表影片檔案

常見陷阱:

  • UPLOAD_VIDEO 耗用大量配額;僅需變更後設資料時,偏好使用 UPDATE_VIDEO
  • videoFilePath 必須是含有 s3key 的物件,而非原始檔案路徑或 URL
  • 標籤總長度(含分隔符號)不得超過 500 個字元
  • 標籤中的尖括號 < > 會自動被移除
  • 描述限制為 5000 bytes,而非字元數(多位元組字元佔用更多空間)

2. 搜尋 YouTube 內容

使用時機:使用者想要尋找影片、頻道或播放清單

工具順序:

  1. YOUTUBE_SEARCH_YOU_TUBE - 搜尋內容 [必要]
  2. YOUTUBE_VIDEO_DETAILS - 取得特定影片的完整詳細資料 [選用]
  3. YOUTUBE_GET_VIDEO_DETAILS_BATCH - 取得多部影片的詳細資料 [選用]

主要參數:

  • q:搜尋查詢(支援精確片語、排除條件、頻道代號)
  • type:'video'、'channel' 或 'playlist'
  • maxResults:每頁結果數量(1-50)
  • pageToken:分頁用

常見陷阱:

  • 搜尋端點僅回傳 'snippet' 部分;如需統計資料請使用 VIDEO_DETAILS
  • 搜尋結果總數上限為 500 項
  • 搜尋的配額成本較高(100 單位),列表端點僅 1 單位
  • BATCH 影片詳細資料的實用限制約為每次呼叫 50 個 ID;較大的集合需分批處理

3. 管理播放清單

使用時機:使用者想要建立播放清單或管理播放清單內容

工具順序:

  1. YOUTUBE_LIST_USER_PLAYLISTS - 列出使用者現有的播放清單 [選用]
  2. YOUTUBE_CREATE_PLAYLIST - 建立新的播放清單 [選用]
  3. YOUTUBE_ADD_VIDEO_TO_PLAYLIST - 將影片加入播放清單 [選用]
  4. YOUTUBE_LIST_PLAYLIST_ITEMS - 列出播放清單中的影片 [選用]

主要參數:

  • playlistId:播放清單 ID(使用者建立的以 'PL...' 開頭,上傳的以 'UU...' 開頭)
  • part:要包含的資源部分(例如 'snippet,contentDetails')
  • maxResults:每頁項目數量(1-50)
  • pageToken:來自前一次回應的分頁令牌

常見陷阱:

  • 不要將頻道 ID('UC...')當作播放清單 ID 傳入;將 'UC' 轉換為 'UU' 以取得上傳播放清單
  • 大型播放清單需要透過 pageToken 進行分頁;請持續使用 nextPageToken,直到其消失
  • items[].id 不是 videoId;請使用 items[].snippet.resourceId.videoId
  • 允許建立重複名稱的播放清單;請先檢查既有播放清單

4. 取得頻道與影片分析

使用時機:使用者想要分析頻道表現或影片指標

工具順序:

  1. YOUTUBE_GET_CHANNEL_ID_BY_HANDLE - 將代號解析為頻道 ID [必要條件]
  2. YOUTUBE_GET_CHANNEL_STATISTICS - 取得頻道訂閱者/觀看次數/影片數 [必要]
  3. YOUTUBE_LIST_CHANNEL_VIDEOS - 列出頻道的所有影片 [選用]
  4. YOUTUBE_GET_VIDEO_DETAILS_BATCH - 取得每部影片的統計資料 [選用]
  5. YOUTUBE_GET_CHANNEL_ACTIVITIES - 取得頻道的近期活動 [選用]

主要參數:

  • channelId:頻道 ID('UC...')、代號('@handle')或 'me'
  • forHandle:頻道代號(例如 '@Google')
  • id:以逗號分隔的影片 ID,用於批次詳細資料
  • parts:要包含的資源部分(例如 'snippet,statistics')

常見陷阱:

  • 頻道統計資料為累計總數,非週期性數據
  • BATCH 影片詳細資料可能會因私人或已刪除影片而回傳少於要求的項目數
  • 回應資料可能嵌套在 data 或 data_preview 之下;請防禦性解析
  • contentDetails.duration 使用 ISO 8601 格式(例如 'PT4M13S')

5. 管理訂閱與留言

使用時機:使用者想要訂閱頻道或查看影片留言

工具順序:

  1. YOUTUBE_SUBSCRIBE_CHANNEL - 訂閱頻道 [選用]
  2. YOUTUBE_UNSUBSCRIBE_CHANNEL - 取消訂閱頻道 [選用]
  3. YOUTUBE_LIST_USER_SUBSCRIPTIONS - 列出訂閱項目 [選用]
  4. YOUTUBE_LIST_COMMENT_THREADS - 列出影片的留言 [選用]

主要參數:

  • channelId:要訂閱或取消訂閱的頻道
  • videoId:用於留言串列的影片 ID
  • maxResults:每頁結果數量
  • pageToken:分頁令牌

常見陷阱:

  • 訂閱已訂閱的頻道可能會回傳錯誤
  • 留言串列會回傳頂層留言,每則最多包含 5 則回覆
  • 某些影片可能已停用留言功能
  • 取消訂閱需要訂閱 ID,而非頻道 ID

常見模式

頻道 ID 解析

代號轉頻道 ID:

1. 使用 '@handle' 呼叫 YOUTUBE_GET_CHANNEL_ID_BY_HANDLE
2. 從回應中擷取 channelId
3. 在後續的頻道操作中使用

上傳播放清單:

1. 取得頻道 ID(以 'UC' 開頭)
2. 將 'UC' 前綴替換為 'UU' 以取得上傳播放清單 ID
3. 使用 LIST_PLAYLIST_ITEMS 列舉所有影片

分頁

  • 設定 maxResults(每頁最多 50 筆)
  • 檢查回應中是否有 nextPageToken
  • 在下一次請求中將令牌傳入 pageToken
  • 持續直到 nextPageToken 消失

批次影片詳細資料

  • 從搜尋或播放清單列表中收集影片 ID
  • 分成每組約 50 個 ID
  • 每組呼叫一次 GET_VIDEO_DETAILS_BATCH
  • 合併各組的結果

已知陷阱

配額管理:

  • YouTube API 有每日配額限制(預設 10,000 單位)
  • 上傳 = 1600 單位;搜尋 = 100 單位;列表 = 1 單位
  • 盡可能優先使用列表端點而非搜尋
  • 監控配額使用量,避免達到每日上限

ID 格式:

  • 影片 ID:11 個字元的英數字串
  • 頻道 ID:以 'UC' 開頭,後接 22 個字元
  • 播放清單 ID:以 'PL'(使用者)或 'UU'(上傳)開頭
  • 不要混淆頻道 ID 與播放清單 ID

縮圖:

  • 自訂縮圖需要頻道電話驗證
  • 必須為 JPG、PNG 或 GIF 格式,且小於 2MB
  • 建議解析度:1280x720(16:9 比例)

回應解析:

  • 統計值以字串形式回傳,非整數;在進行數值運算前需進行型別轉換
  • 持續時間使用 ISO 8601 格式(PT#H#M#S)
  • 批次回應可能在不同鍵值下包裝資料

快速參考

任務工具名稱主要參數
上傳影片YOUTUBE_UPLOAD_VIDEOtitle、description、tags、categoryId、privacyStatus、videoFilePath
更新影片YOUTUBE_UPDATE_VIDEOvideo_id、title、description、tags
設定縮圖YOUTUBE_UPDATE_THUMBNAILvideoId、thumbnailUrl
搜尋 YouTubeYOUTUBE_SEARCH_YOU_TUBEq、type、maxResults
影片詳細資料YOUTUBE_VIDEO_DETAILSid、part
批次影片詳細資料YOUTUBE_GET_VIDEO_DETAILS_BATCHid、parts
列出播放清單YOUTUBE_LIST_USER_PLAYLISTSmaxResults、pageToken
建立播放清單YOUTUBE_CREATE_PLAYLIST(請檢查架構)
加入播放清單YOUTUBE_ADD_VIDEO_TO_PLAYLIST(請檢查架構)
列出播放清單項目YOUTUBE_LIST_PLAYLIST_ITEMSplaylistId、maxResults
頻道統計資料YOUTUBE_GET_CHANNEL_STATISTICSid/forHandle/mine
列出頻道影片YOUTUBE_LIST_CHANNEL_VIDEOSchannelId、maxResults
依代號取得頻道 IDYOUTUBE_GET_CHANNEL_ID_BY_HANDLEchannel_handle
訂閱YOUTUBE_SUBSCRIBE_CHANNELchannelId
列出訂閱項目YOUTUBE_LIST_USER_SUBSCRIPTIONS(請檢查架構)
列出留言YOUTUBE_LIST_COMMENT_THREADSvideoId
頻道活動YOUTUBE_GET_CHANNEL_ACTIVITIES(請檢查架構)

使用時機

此技能適用於執行概述中所述的工作流程或動作。

限制

  • 僅在任務明確符合上述範圍時使用此技能。
  • 請勿將輸出視為環境特定驗證、測試或專家審查的替代方案。
  • 若缺少必要的輸入、權限、安全邊界或成功標準,請停止並要求釐清。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches 007: Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Agentfolio: Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Animejs Animation: Advanced JavaScript animation library skill for creating complex, high-performance web animations.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astropy: Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astro: Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Emotional ARC Designer: One sentence - what this skill does and when to invoke it

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Fixing Motion Performance: Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches I18n Localization: Internationalization and localization patterns.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Interactive Portfolio: Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches JQ: Expert jq usage for JSON querying, filtering, transformation, and pipeline integration.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Landing Page Generator: Generates high-converting Next.js/React landing pages with Tailwind CSS.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches LEX: Centralized ''Truth Engine'' for cross-jurisdictional legal context (US, EU, CA) and contract scaffolding.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Magic Animator: AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Makepad Animation: CRITICAL: Use for Makepad animation system.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs APP Router Patterns: Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

Anhvu1107/all-agent-skill

ALWAYS use this when the user mentions Nextjs Best Practices, asks to build, debug, review, document, automate, test, configure, migrate, or make decisions in this domain, or the task clearly depends on Nextjs Best Practices; scope: Next.js App Router principles. Apply the bundled workflow, references, scripts, Senior Master standard, and Codex strict review gate before final output.

Anhvu1107/all-agent-skill

description: ALWAYS use this when the work is specifically about modern Next.js or React architecture, data flow, rendering strategy, routing, or performance-sensitive frontend behavior.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs Supabase Auth: Expert integration of Supabase Auth with Next.js App Router

Anhvu1107/all-agent-skill

ALWAYS use this when the task involves reading, extracting, splitting, merging, rotating, creating, validating, OCR-ing, form-filling, or otherwise producing or modifying PDF files.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches React Nextjs Development: React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

相關技能