# Spotify

Acts on the principal's Spotify account via a deterministic CLI (Tools/Spotify.ts)...

- Repository: https://github.com/danielmiessler/LifeOS (19669 stars)
- Category: Media
- License: MIT
- Last updated: 2026-10-28
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add danielmiessler/LifeOS --skill Spotify -g -a claude-code -y`
Codex: `npx skills add danielmiessler/LifeOS --skill Spotify -g -a codex -y`
Cursor: `npx skills add danielmiessler/LifeOS --skill Spotify -g -a cursor -y`
Gemini CLI: `npx skills add danielmiessler/LifeOS --skill Spotify -g -a gemini-cli -y`

## Description

Acts on the principal's Spotify account via a deterministic CLI (Tools/Spotify.ts): search, playlists, now-playing, library, and playback across devices. USE WHEN 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, my spotify library. NOT FOR music taste or recommendations, generating songs, editing audio (AudioEditor).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Spotify

Acts on the principal's real Spotify account through `Tools/Spotify.ts`, a deterministic CLI that calls the Spotify Web API directly. No MCP, no server process, no session registration: any session can invoke it via Bash immediately.

```bash
bun ~/.claude/skills/Spotify/Tools/Spotify.ts <command> [flags]   # --help for the full list
```

## 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](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

The rest: https://github.com/danielmiessler/LifeOS/blob/HEAD/LifeOS/install/skills/Spotify/SKILL.md
