This skill should be used when the user asks about "spotify", "music", "playlist", "playlists", "song", "songs", "track", "tracks", "now playing", "what's playing", "play", "pause", "skip", "queue", or needs to search for music, manage playlists, or control playback.
Manage your Spotify account. Playlists, search, playback control, library organization.
See SETUP.md for initial configuration instructions.
Run once to configure your Spotify app credentials, then log in:
spotify auth setup --client-id <YOUR_CLIENT_ID> --client-secret <YOUR_CLIENT_SECRET>
spotify auth login
# Visit the URL printed, authorize the app, then copy the redirect URL back:
spotify auth callback --url "<redirect_url>"
Check status at any time:
spotify auth status
~/.spotify/credentials.json~/.spotify/token.jsonKeeps the library tidy: ensures all playlist tracks are liked, and sorts orphan liked songs into the right playlists by genre.
# Like all tracks from own playlists that aren't liked yet
spotify organize sync
spotify organize sync --dry-run
# Sort orphan liked songs into playlists using genre rules
spotify organize sort
spotify organize sort --dry-run
# Run both sync + sort together
spotify organize full
spotify organize full --dry-run
# View current genre rules and skip list
spotify organize config
# Reset config to defaults
spotify organize config --init
# Watch daemon - detect newly liked songs and notify (run in a screen session)
spotify organize watch # polls every 60 seconds (default)
spotify organize watch --interval 30 # custom poll interval in seconds
spotify organize watch --init # initialize state file without processing
How it works:
Watch daemon details:
spotify organize watch --init once first to snapshot your existing liked songs (otherwise the daemon auto-inits on first start)screen -S spotify-watch spotify organize watch~/.spotify/watch_state.json - tracks known liked IDs and last poll time~/agent/notifications/spotify_liked_{timestamp}.jsonConfig lives at ~/.spotify/organize.json:
skip_playlists - playlist names to exclude from auto-sorting (queues, mixtapes, ambiguous ones)genre_rules - list of {keywords: [...], playlist: "name"} mappings (used by sort command, NOT by watch daemon)Important notes:
--dry-run first to preview what would changespotify organize config --init to refresh defaults, or edit ~/.spotify/organize.json directly to add new genre rules# List all playlists
spotify playlists list
# Show playlist tracks
spotify playlists show --id <PLAYLIST_ID>
# Create playlist
spotify playlists create --name "My Playlist" --description "desc"
spotify playlists create --name "Private Vibes" --private
# Add tracks to playlist
spotify playlists add --id <PLAYLIST_ID> --uris "spotify:track:xxx,spotify:track:yyy"
# Remove tracks from playlist
spotify playlists remove --id <PLAYLIST_ID> --uris "spotify:track:xxx"
# View liked songs
spotify playlists liked
spotify playlists liked --limit 20 --offset 100
# Search tracks (default)
spotify search "bohemian rhapsody"
# Search albums
spotify search "dark side of the moon" --type album
# Search artists
spotify search "radiohead" --type artist
# Multi-type search
spotify search "daft punk" --type "track,album,artist"
# Limit results
spotify search "jazz" --limit 5
# What's playing now
spotify playback current
# List available devices
spotify playback devices
# Play/resume
spotify playback play
spotify playback play --uri spotify:track:xxx
spotify playback play --context spotify:playlist:xxx
spotify playback play --device <DEVICE_ID>
# Pause
spotify playback pause
# Skip forward/back
spotify playback skip
spotify playback skip --direction previous
spotify playback previous
# Volume
spotify playback volume 75
# Add to queue
spotify playback queue --uri spotify:track:xxx
# Shuffle
spotify playback shuffle on
spotify playback shuffle off
# Repeat
spotify playback repeat off
spotify playback repeat track
spotify playback repeat context
# Transfer to another device
spotify playback transfer --device-id <ID> --play
spotify auth status # Check if authenticated
spotify auth login # Start OAuth flow
spotify auth setup # Save app credentials
--context, not --uri: spotify playback play --context spotify:playlist:xxx. The --uri flag is for individual tracks only. Playlist URIs (especially playlist_v2 type) fail with --uri.--device, not --device-id: spotify playback play --device <ID> --context spotify:playlist:xxx--context 'spotify:artist:...' fails. For individual songs, always use --uri 'spotify:track:...'. For albums/playlists, --context works fine.uv tool install <path-to-skill>/clisp.current_user_unfollow_playlist(id))