Awesome-claude-skills-cn Spotify Automation

通过 Composio 自动化 Spotify 工作流,包括播放列表管理、音乐搜索、播放控制和用户档案访问。

install
source · Clone the upstream repo
git clone https://github.com/Athe1st3154/awesome-claude-skills-cn
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Athe1st3154/awesome-claude-skills-cn "$T" && mkdir -p ~/.claude/skills && cp -r "$T/composio-skills/spotify-automation" ~/.claude/skills/athe1st3154-awesome-claude-skills-cn-spotify-automation && rm -rf "$T"
manifest: composio-skills/spotify-automation/SKILL.md
source content

Spotify Automation

Automate Spotify operations -- manage playlists, search the music catalog, control playback, browse albums and tracks, and access user profiles -- all orchestrated through the Composio MCP integration.

Toolkit docs: composio.dev/toolkits/spotify


设置

  1. Connect your Spotify account through the Composio MCP server at
    https://rube.app/mcp
  2. The agent will prompt you with an authentication link if no active connection exists
  3. Once connected, all
    SPOTIFY_*
    tools become available for execution
  4. Note: Some features (playback control) require a Spotify Premium subscription

Core Workflows

1. Get Current User Profile

Retrieve comprehensive profile information for the authenticated Spotify user.

Tool:

SPOTIFY_GET_CURRENT_USER_S_PROFILE

No parameters required.
Returns: display name, email, country, subscription level (premium/free),
explicit content settings, profile images, follower count, and Spotify URIs.
Required scopes: user-read-private, user-read-email.

2. Search the Spotify Catalog

Find albums, artists, playlists, tracks, shows, episodes, or audiobooks by keyword.

Tool:

SPOTIFY_SEARCH_FOR_ITEM

ParameterTypeRequiredDescription
q
stringYesSearch query keywords
type
arrayYesItem types:
album
,
artist
,
playlist
,
track
,
show
,
episode
,
audiobook
limit
integerNoResults to return (default: 20)
offset
integerNoOffset for pagination (default: 0)
market
stringNoISO 3166-1 alpha-2 country code
include_external
stringNoSet to
audio
to include external content

Note: Audiobooks are only available in US, UK, Canada, Ireland, New Zealand, and Australia.


3. Manage Playlists

Browse, create, modify, and populate playlists.

Get a user's playlists:

Tool:

SPOTIFY_GET_USER_S_PLAYLISTS

ParameterTypeRequiredDescription
user_id
stringYesSpotify user ID
limit
integerNoMax playlists, 1-50 (default: 20)
offset
integerNoPagination offset, 0-100000 (default: 0)

Get current user's playlists:

Tool:

SPOTIFY_GET_CURRENT_USER_S_PLAYLISTS

ParameterTypeRequiredDescription
limit
integerNoMax playlists, 1-50 (default: 20)
offset
integerNoPagination offset, 0-100000 (default: 0)

Get playlist details:

Tool:

SPOTIFY_GET_PLAYLIST

ParameterTypeRequiredDescription
playlist_id
stringYesSpotify playlist ID (e.g.,
3cEYpjA9oz9GiPac4AsH4n
)
fields
stringNoComma-separated field filter to reduce response size
market
stringNoISO country code for market-specific content
additional_types
stringNo
track,episode
to include podcast episodes

Update playlist details:

Tool:

SPOTIFY_CHANGE_PLAYLIST_DETAILS

ParameterTypeRequiredDescription
playlist_id
stringYesPlaylist ID (must be owned by current user)
name
stringNoNew playlist name
description
stringNoNew playlist description
public
booleanNoPublic/private toggle
collaborative
booleanNoCollaborative mode (only on non-public playlists)

4. Browse Playlist Items & Add Tracks

View tracks in a playlist and add new items.

Tool:

SPOTIFY_GET_PLAYLIST_ITEMS

ParameterTypeRequiredDescription
playlist_id
stringYesSpotify playlist ID
limit
integerNoItems per page, 1-50 (default: 20)
offset
integerNoPagination offset (default: 0)
fields
stringNoField filter (e.g.,
items(track(name,id))
)
market
stringNoISO country code
additional_types
stringNo
track,episode
for podcast episodes

Tool:

SPOTIFY_ADD_ITEMS_TO_PLAYLIST

Add tracks or episodes to a playlist using Spotify URIs.


5. Get Track & Album Details

Retrieve catalog information for individual tracks and albums.

Tool:

SPOTIFY_GET_TRACK
-- Get details for a single track by Spotify ID.

Tool:

SPOTIFY_GET_ALBUM
-- Get comprehensive album data including track listing, artist info, cover art, and popularity.


6. Control Playback

Start, resume, or change playback on the user's active device.

Tool:

SPOTIFY_START_RESUME_PLAYBACK

ParameterTypeRequiredDescription
context_uri
stringNoSpotify URI of album, artist, or playlist (cannot combine with
uris
)
uris
arrayNoList of track URIs to play (cannot combine with
context_uri
)
offset
objectNoStarting position:
{position: 5}
or
{uri: 'spotify:track:...'}
position_ms
integerNoStart position in milliseconds
device_id
stringNoTarget device ID (defaults to active device)

Requirements: Spotify Premium subscription and at least one active device.


已知陷阱

PitfallDetails
Premium required for playback
SPOTIFY_START_RESUME_PLAYBACK
returns 403 if the user does not have Spotify Premium
Active device requiredPlayback control returns 404 if no Spotify device (mobile, desktop, web, speaker) is active
context_uri vs uris are exclusiveCannot use both
context_uri
and
uris
in the same playback call
Collaborative playlists
collaborative
can only be set to
true
on non-public playlists (
public
must be
false
)
Playlist ownership
SPOTIFY_CHANGE_PLAYLIST_DETAILS
only works on playlists owned by the authenticated user
Audiobook market restrictionsAudiobooks via search are only available in US, UK, Canada, Ireland, New Zealand, and Australia
Max 11000 playlistsUsers are limited to approximately 11,000 playlists via
SPOTIFY_CREATE_PLAYLIST

快速参考

Tool SlugPurpose
SPOTIFY_GET_CURRENT_USER_S_PROFILE
Get authenticated user's profile
SPOTIFY_SEARCH_FOR_ITEM
Search catalog for tracks, albums, artists, etc.
SPOTIFY_GET_USER_S_PLAYLISTS
Get playlists for any user
SPOTIFY_GET_CURRENT_USER_S_PLAYLISTS
Get current user's playlists
SPOTIFY_GET_PLAYLIST
Get detailed playlist info
SPOTIFY_GET_PLAYLIST_ITEMS
List tracks/episodes in a playlist
SPOTIFY_CHANGE_PLAYLIST_DETAILS
Update playlist name, description, visibility
SPOTIFY_CREATE_PLAYLIST
Create a new playlist
SPOTIFY_ADD_ITEMS_TO_PLAYLIST
Add tracks/episodes to a playlist
SPOTIFY_GET_TRACK
Get track details by ID
SPOTIFY_GET_ALBUM
Get album details by ID
SPOTIFY_START_RESUME_PLAYBACK
Start or resume playback on a device

Composio 提供支持