{"skill":{"slug":"spotify-playlist","displayName":"Spotify Playlist Builder","summary":"Build and manage Spotify playlists from natural language requests. Search tracks/artists/albums, create playlists, manage tracks, view listening history. Use...","description":"---\nname: spotify-playlist\ndescription: Build and manage Spotify playlists from natural language requests. Search tracks/artists/albums, create playlists, manage tracks, view listening history. Use when the user asks to create a playlist, find music, check what they've been listening to, or any Spotify-related request. Examples - \"make me a playlist for a rainy Sunday\", \"what have I been listening to lately\", \"find songs like Bonobo\".\n---\n\n# Spotify Playlist Builder\n\nBuild playlists from natural language using the Spotify Web API.\nUpdated for the February 2026 API changes (Dev Mode).\n\n## Prerequisites\n\n- Spotify Premium account (required for Dev Mode apps since Feb 2026)\n- Python 3 with `requests` library\n\n## Setup\n\n1. Create an app at https://developer.spotify.com/dashboard\n2. Set redirect URI to `http://127.0.0.1:8765/callback` (must be `127.0.0.1`, not `localhost` - Spotify blocks `localhost`)\n3. Run auth:\n\n```bash\npython3 scripts/auth.py --client-id <ID> --client-secret <SECRET>\n```\n\n4. Open the printed URL in a browser and authorize\n5. If the callback page loads automatically, done. Otherwise copy the full redirect URL and run:\n\n```bash\npython3 scripts/auth.py --client-id <ID> --client-secret <SECRET> --code-url \"<FULL_REDIRECT_URL>\"\n```\n\nTokens are saved to `~/.openclaw/workspace/config/.spotify-tokens.json` and auto-refresh on 401.\n\n## API Script Reference\n\nAll commands in `scripts/spotify.py`. All output JSON.\n\n```bash\n# Search (tracks, artists, or albums)\npython3 scripts/spotify.py search \"bohemian rhapsody\" --limit 5\npython3 scripts/spotify.py search \"Bonobo\" --type artist --limit 3\npython3 scripts/spotify.py search \"Moon Safari\" --type album --limit 3\n\n# Create playlist\npython3 scripts/spotify.py create \"Rainy Sunday\" --description \"Chill vibes\" --private\n\n# Add/remove tracks (by Spotify URI)\npython3 scripts/spotify.py add <playlist_id> spotify:track:xxx spotify:track:yyy\npython3 scripts/spotify.py remove <playlist_id> spotify:track:xxx\n\n# List playlists\npython3 scripts/spotify.py my-playlists --limit 10\n\n# View playlist contents\npython3 scripts/spotify.py playlist-tracks <playlist_id> --limit 50\n\n# Listening history\npython3 scripts/spotify.py top-tracks --time-range short --limit 20\npython3 scripts/spotify.py recently-played --limit 20\n\n# Profile\npython3 scripts/spotify.py me\n```\n\n## Playlist Building Workflow\n\nWhen a user asks for a playlist:\n\n1. **Interpret the request** - extract mood, genre, era, activity, or specific artists/songs\n2. **Search for tracks** - use multiple targeted searches to find tracks matching the vibe\n3. **Use listening history** - check `top-tracks` and `recently-played` to personalize if relevant\n4. **Create and populate** - create the playlist with a creative name and description, add 15-30 tracks\n5. **Share the link** - return the Spotify URL\n\n### Tips\n\n- Run multiple searches with different angles (artist names, genre keywords, era + mood combos)\n- Mix well-known tracks with deeper cuts for a good playlist feel\n- `top-tracks --time-range short` shows what the user's been into recently (last 4 weeks)\n- `top-tracks --time-range long` shows all-time favourites\n- Aim for 15-30 tracks unless the user specifies otherwise\n- Name playlists creatively based on the vibe, not just the literal request\n\n## Feb 2026 API Limitations (Dev Mode)\n\n- **Recommendations endpoint removed** - build playlists via search + curation instead\n- **No popularity field** on some responses - may return 0\n- **Playlist endpoints renamed** from `/tracks` to `/items` (already handled in scripts)\n- **Premium required** for the app owner\n- **Max 5 users** per app, 1 app per developer\n- **No batch endpoints** for albums/artists/tracks (use individual lookups)\n\n## Cron Ideas\n\nCombine with OpenClaw cron for automated playlists:\n\n- **Weekly refresh** - build a new playlist every Monday based on a rotating theme\n- **Time-of-day playlists** - morning focus, afternoon energy, evening wind-down\n- **Commute playlist** - auto-build a playlist matched to journey duration\n- **Weather-reactive** - check weather, adjust playlist mood accordingly\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":774,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1772459124352,"updatedAt":1778491691403},"latestVersion":{"version":"1.0.0","createdAt":1772459124352,"changelog":"- Initial release of spotify-playlist skill.\n- Build and manage Spotify playlists with natural language requests.\n- Search tracks, artists, or albums; create and populate playlists; manage tracks.\n- View listening history and user profile details.\n- Updated for compatibility with February 2026 Spotify API changes (Dev Mode).\n- Requires Spotify Premium account for authentication and usage.","license":null},"metadata":null,"owner":{"handle":"codeaholicman","userId":"s175j4w8f5ehtqph8pkq7hgfwn8845vp","displayName":"codeaholicman","image":"https://avatars.githubusercontent.com/u/9738833?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780089738745}}