Community程式設計與開發github.com

ComposioHQ/Spotify-Automation

透過 Composio 自動化 Spotify 工作流程,包括播放清單管理、音樂搜尋、播放控制與使用者個人檔案存取。

Spotify-Automation 是什麼?

此技能整合 Spotify 與 Composio MCP 伺服器,讓 AI 代理能夠執行完整的 Spotify 自動化操作。它涵蓋播放清單的建立、修改、內容瀏覽與新增曲目;透過關鍵字搜尋音樂目錄中的專輯、藝人、播放清單、歌曲等;控制播放(開始、恢復、跳轉);以及取得目前使用者個人檔案詳細資訊。支援的平台包括所有可連接 Composio MCP 的 AI 代理環境(如 Claude Code、Cursor 等)。運作方式為:使用者先在 Composio MCP 伺服器上驗證 Spotify 帳號,之後所有 `SPOTIFY_*` 工具即可供代理呼叫。需注意部分進階功能(如播放控制)需要 Spotify Premium 訂閱。此技能大幅簡化了在對話式 AI 工作流程中操作 Spotify 的複雜度。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/composio-skills/spotify-automation

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

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

說明文件

Spotify 自動化

自動化 Spotify 操作——管理播放清單、搜尋音樂目錄、控制播放、瀏覽專輯與歌曲,以及存取使用者個人檔案——全部透過 Composio MCP 整合來編排。

工具組文件: composio.dev/toolkits/spotify


設定

  1. 透過 Composio MCP 伺服器(位於 https://rube.app/mcp)連接您的 Spotify 帳戶
  2. 若無有效連線,代理會提示您提供驗證連結
  3. 連線成功後,所有 SPOTIFY_* 工具即可執行
  4. 注意: 部分功能(播放控制)需要 Spotify Premium 訂閱

核心工作流程

1. 取得目前使用者個人檔案

取得已驗證 Spotify 使用者的完整個人檔案資訊。

工具: SPOTIFY_GET_CURRENT_USER_S_PROFILE

無需參數。
回傳:顯示名稱、電子郵件、國家、訂閱層級(premium/free)、
明確內容設定、個人檔案圖片、追蹤者數量及 Spotify URI。
必要範圍:user-read-private, user-read-email。

2. 搜尋 Spotify 目錄

依關鍵字尋找專輯、藝人、播放清單、歌曲、節目、單集或有聲書。

工具: SPOTIFY_SEARCH_FOR_ITEM

參數類型必填說明
qstring是搜尋查詢關鍵字
typearray是項目類型:album、artist、playlist、track、show、episode、audiobook
limitinteger否回傳結果數(預設:20)
offsetinteger否分頁偏移量(預設:0)
marketstring否ISO 3166-1 alpha-2 國家代碼
include_externalstring否設為 audio 以包含外部內容

注意: 有聲書僅適用於美國、英國、加拿大、愛爾蘭、紐西蘭和澳洲。


3. 管理播放清單

瀏覽、建立、修改和填充播放清單。

取得使用者的播放清單:

工具: SPOTIFY_GET_USER_S_PLAYLISTS

參數類型必填說明
user_idstring是Spotify 使用者 ID
limitinteger否最大播放清單數,1-50(預設:20)
offsetinteger否分頁偏移量,0-100000(預設:0)

取得目前使用者的播放清單:

工具: SPOTIFY_GET_CURRENT_USER_S_PLAYLISTS

參數類型必填說明
limitinteger否最大播放清單數,1-50(預設:20)
offsetinteger否分頁偏移量,0-100000(預設:0)

取得播放清單詳細資訊:

工具: SPOTIFY_GET_PLAYLIST

參數類型必填說明
playlist_idstring是Spotify 播放清單 ID(例如 3cEYpjA9oz9GiPac4AsH4n)
fieldsstring否逗號分隔的欄位篩選器,可減少回應大小
marketstring否市場特定內容的 ISO 國家代碼
additional_typesstring否track,episode 以包含 podcast 單集

更新播放清單詳細資訊:

工具: SPOTIFY_CHANGE_PLAYLIST_DETAILS

參數類型必填說明
playlist_idstring是播放清單 ID(必須由目前使用者擁有)
namestring否新的播放清單名稱
descriptionstring否新的播放清單說明
publicboolean否公開/私人切換
collaborativeboolean否協作模式(僅限非公開播放清單)

4. 瀏覽播放清單項目與新增歌曲

檢視播放清單中的歌曲並新增項目。

工具: SPOTIFY_GET_PLAYLIST_ITEMS

參數類型必填說明
playlist_idstring是Spotify 播放清單 ID
limitinteger否每頁項目數,1-50(預設:20)
offsetinteger否分頁偏移量(預設:0)
fieldsstring否欄位篩選器(例如 items(track(name,id)))
marketstring否ISO 國家代碼
additional_typesstring否track,episode 以包含 podcast 單集

工具: SPOTIFY_ADD_ITEMS_TO_PLAYLIST

使用 Spotify URI 將歌曲或單集新增至播放清單。


5. 取得歌曲與專輯詳細資訊

擷取個別歌曲和專輯的目錄資訊。

工具: SPOTIFY_GET_TRACK —— 透過 Spotify ID 取得單首歌曲的詳細資訊。

工具: SPOTIFY_GET_ALBUM —— 取得完整的專輯資料,包括曲目列表、藝人資訊、封面藝術和人氣指數。


6. 控制播放

在使用者的活動裝置上開始、恢復或變更播放。

工具: SPOTIFY_START_RESUME_PLAYBACK

參數類型必填說明
context_uristring否專輯、藝人或播放清單的 Spotify URI(不可與 uris 合用)
urisarray否要播放的歌曲 URI 列表(不可與 context_uri 合用)
offsetobject否起始位置:{position: 5} 或 {uri: 'spotify:track:...'}
position_msinteger否以毫秒為單位的起始位置
device_idstring否目標裝置 ID(預設為活動裝置)

需求: Spotify Premium 訂閱,且至少一個活動裝置。


已知陷阱

陷阱詳細資訊
播放需要 Premium若使用者沒有 Spotify Premium,SPOTIFY_START_RESUME_PLAYBACK 會回傳 403
需要活動裝置若無活動的 Spotify 裝置(手機、桌面、網頁、喇叭),播放控制會回傳 404
context_uri 與 uris 互斥不得在同一次播放呼叫中同時使用 context_uri 和 uris
協作播放清單collaborative 僅能對非公開播放清單設為 true(public 必須為 false)
播放清單擁有權SPOTIFY_CHANGE_PLAYLIST_DETAILS 僅作用於已驗證使用者擁有的播放清單
有聲書市場限制透過搜尋取得有聲書僅適用於美國、英國、加拿大、愛爾蘭、紐西蘭和澳洲
最多 11000 個播放清單使用者透過 SPOTIFY_CREATE_PLAYLIST 最多可建立約 11,000 個播放清單

快速參考

工具代碼用途
SPOTIFY_GET_CURRENT_USER_S_PROFILE取得已驗證使用者的個人檔案
SPOTIFY_SEARCH_FOR_ITEM在目錄中搜尋歌曲、專輯、藝人等
SPOTIFY_GET_USER_S_PLAYLISTS取得任何使用者的播放清單
SPOTIFY_GET_CURRENT_USER_S_PLAYLISTS取得目前使用者的播放清單
SPOTIFY_GET_PLAYLIST取得播放清單的詳細資訊
SPOTIFY_GET_PLAYLIST_ITEMS列出播放清單中的歌曲/單集
SPOTIFY_CHANGE_PLAYLIST_DETAILS更新播放清單名稱、說明、可見性
SPOTIFY_CREATE_PLAYLIST建立新的播放清單
SPOTIFY_ADD_ITEMS_TO_PLAYLIST將歌曲/單集新增至播放清單
SPOTIFY_GET_TRACK依 ID 取得歌曲詳細資訊
SPOTIFY_GET_ALBUM依 ID 取得專輯詳細資訊
SPOTIFY_START_RESUME_PLAYBACK在裝置上開始或恢復播放

由 Composio 提供技術支援

Individual skills in this repo

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

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

相關技能