Spotify
Your lifeSkill · 2 workflows

Spotify

Runs your Spotify account from the terminal: search, playlists and playback.

You say
  • make a Spotify playlist from these 11 songs Shown in the terminal
  • what's playing on spotify?
  • skip this track and turn it down

You getA new playlist on your Spotify account, filled and read back to confirm every track landed.

Terminal · Spotify at work
studio · running · claude Rex 0.4.2 · 8 sessions · 2 need you
running · claude lumen · dev server lazygit attic · claude
8 sessions · 2 need you · 1 stopped
>Make a Spotify playlist called Tempo Thursday from these 11 songs, the tempo list you just built for Thursday's 8 km.
⏺Skill(Spotify)
⎿Routed to Manage
⏺Bash(bun Tools/Spotify.ts search)
⎿11 searches · 11 of 11 songs matched to Spotify tracks
⏺Bash(Spotify.ts create-playlist "Tempo Thursday")
⎿Created, private · ID saved
⏺Bash(Spotify.ts add-tracks --id 4kTempoThu9xQ2)
⎿11 tracks sent · 11 added · playlist reads back 11 tracks
◆LIFEOS 33s◆

Tempo Thursday is on your account with all eleven songs, 43 minutes in your order.

New playlist Tempo Thursday · 11 tracks · 43 min
#TrackArtist
1Tidewater EngineThe Harbor Lamps
2Copper Wire SummerGravel Saints
3Keep the PaceJuniper Static
11Last Light on the BreakwaterThe Harbor Lamps
11 of 11 added · 4 of 11 shown · 43 min covers the 40:40 run at 5:05/km
Juno: The playlist is private, and the read-back from your account matched all eleven tracks.
⏵⏵ auto mode on (shift+tab to cycle)

An invented run. Sam gives Juno the eleven songs from his Thursday tempo playlist, and Spotify finds each one, makes the playlist and reads it back from his account.

02
Workflows
02
Tools
01
Reference doc
15
Ways to ask
Not for music taste or recommendations, generating songs, editing audio (AudioEditor)

Inside the Skill

The thinking, frameworks, and architecture that distinguish this skill from a generic version of the same task.

Ideal State

  • Every requested account change (follow, playlist build, library read, queue, playback) is one Tools/Spotify.ts call keyed by IDs or URIs, and the account state afterwards matches the request.
  • Auth is set up once and never repeated by hand: tokens refresh per invocation, and a dead token or redirect mismatch is traced to its real fix (re-run auth, or fix the dashboard URI).
  • Playback is attempted only on a Premium account with an active device, so a Free account still gets search, playlists and library.

Intent Routing

Intent Trigger File
Authorize "set up spotify", "authorize spotify", "connect spotify", auth broken Intents/Authorize.md
Manage play / search / playlists / queue / library ops Intents/Manage.md
File Read when
Setup.md first-time install: the developer app, the three .env keys, the proof command
Tools/ Spotify.help.md is the full flag reference (same as --help); EnvText.ts is the pure env-file helper Spotify.ts writes tokens with

Data & Config

This skill reads no files under LIFEOS/USER/. Credentials are env-only: SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET and SPOTIFY_REFRESH_TOKEN in ~/.claude/.env (names only here, never values). First-time setup, the Spotify developer app and the proof command are in Setup.md. Tokens auto-refresh per invocation; a missing refresh token means run Intents/Authorize.md. With the credentials missing, the tool exits 1 and points at Setup.md.

Gotchas

  • search works before user auth (client-credentials fallback); every other command needs the refresh token.
  • 401 on every call → the refresh token died (password change, revoked access); re-run auth (Intents/Authorize.md). The tool persists rotated refresh tokens automatically.
  • /me/playlists returns tracks: null on playlist rows (observed) — never assume tracks.total exists; the CLI omits the count when absent.

Examples

  • "Add this playlist link to my Spotify" → Manage → the playlist is followed with follow-playlist --id <ID> (ID from the URL) and shows in playlists.
  • "Make me a focus-music playlist and fill it" → Manage → a new playlist from create-playlist, holding the tracks search resolved, added with add-tracks.
  • "What's playing?" → Manage → the now-playing result.
  • "Skip this / turn it down" → Manage → next / volume --percent 30 on the active Premium device.

Workflows & Routing · 2

Each workflow is one job the skill runs. The trigger phrases route your request to the right one — this is the skill's routing table.

  1. 01
    Authorize Intents/Authorize.md

    set up spotify, authorize spotify, connect spotify, auth broken

  2. 02
    Manage Intents/Manage.md

    play / search / playlists / queue / library ops

Tools · 2

Deterministic executables the workflows call — the code that does the real work, not prompt scaffolding.

  • EnvText.ts
  • Spotify.ts

How to Invoke

Say any of these to your assistant and LifeOS activates the Spotify skill automatically:

  • "spotify"
  • "play on spotify"
  • "add to my spotify"
  • "follow this playlist"
  • "save playlist"
  • "create a spotify playlist"
  • "add tracks"
  • "what's playing"
  • "my playlists"
  • "queue this"
  • "skip track"
  • "set volume"
  • "spotify search"
  • "control spotify"

Or invoke explicitly:

Skill("Spotify")

References · 1

Auxiliary files the skill loads at runtime — frameworks, guides, configs.

  • Setup

Want LifeOS to do this for you?

Install LifeOS on your machine — your assistant gets the Spotify skill plus 96 others, all hooked into one Life OS.