| 1 | --- |
| 2 | name: spotify |
| 3 | description: Control Spotify playback and search the library and playlists. Use when: spotify, music, playlist, play, pause, or what's playing. |
| 4 | invocation: model+user |
| 5 | --- |
| 6 | |
| 7 | # Spotify |
| 8 | |
| 9 | ## When to use |
| 10 | Playing, pausing, skipping, identifying the current track, searching for |
| 11 | music, and reading playlists. |
| 12 | |
| 13 | ## Setup |
| 14 | Two paths: |
| 15 | |
| 16 | 1. **Local control (macOS, no setup).** The Spotify desktop app must be |
| 17 | running, or say so: |
| 18 | `osascript -e 'tell application "Spotify" to playpause'` |
| 19 | 2. **Web API (search, playlists, other platforms).** Needs a Spotify |
| 20 | developer app token from the user; fail loud when absent: |
| 21 | `GET api.spotify.com/v1/search`, `/v1/me/playlists`, `/v1/playlists/{id}`. |
| 22 | |
| 23 | ## Workflow |
| 24 | 1. Prefer local control for transport (play/pause/next/previous/current track). |
| 25 | 2. Use the Web API for search, playlist contents, and recommendations. |
| 26 | 3. Report artist, track, album, and playlist names verbatim. |
| 27 | |
| 28 | ## Non-goals |
| 29 | - Do not change playlists (add/remove/reorder) unless asked. |
| 30 | - Do not download or rip audio. |
| 31 | - Do not handle the user's Spotify password. |
| 32 |