AI as a DJ

What LLMs have is something Spotify doesn't: they've been trained on millions of words about music.

AI as a DJ
Juju testing my Kindle Scribe

I type /dj in my terminal while coding. A few seconds later, a new album starts playing on Spotify, a prog band I’ve never listened to before. I love it. And I barely miss a beat.. literally

My library is eclectic but deep. Gamma Ray, Miles Davis, Mahler, Norah Jones. For years, Spotify's algorithm has done almost nothing useful with it, and I've actively avoided its recommendations after a while. I like listening to full albums, on repeat, which is almost counter to its music consumption model.

Last week, an AI suggested I listen to Mahavishnu Orchestra's The Inner Mounting Flame – a jazz fusion album from 1971 I'd never heard about. "John McLaughlin was doing proto-djent fifty years before djent existed. You love Vitalism and Animals as Leaders. Here's where that thread starts" it said.

It starts and I’m like ”wait what the hell? 1971???" That guy is from the future, I never heard music like that from that time.

I don’t think Spotify would ever connect power metal to 1970s jazz fusion. I think AI can because it reasons differently about why things connect than machine learning models.

The algorithm knows what. AI knows why.

Spotify's algorithm knows what you listen to. LLMs know why you listen to it. These are fundamentally different technologies using different approaches to try and do the same thing.

Spotify works like Netflix. It builds embeddings – mathematical representations of you and every track in a shared vector space. If your embedding is near other users who listen to Angra and Dream Theater, it recommends what those users also listen to. It also extracts audio features – tempo, key, energy, danceability – and clusters tracks by sonic similarity. The model finds statistical patterns in behavior: "users like you also listened to X." It has no idea why you like what you like (just like, in practice, an LLM has no idea why it's predicting that particular next word other than it’s what its weights say.)

LLMs work completely differently given their size and what they were trained for, though. They can't hear music at all. What they have is something Spotify doesn't: they've been trained on millions of words about music. Album reviews, genre histories, interviews with musicians, Wikipedia articles about influence chains, forum posts arguing about which guitarists changed everything. An LLM doesn't know what Mahavishnu Orchestra sounds like. But it knows that McLaughlin's rhythmic complexity on The Inner Mounting Flame prefigured what became djent 40 years later, because music critics and fans have written about exactly that.

That's the difference. Spotify can tell you that people who listen to Animals as Leaders also listen to Periphery. An LLM can tell you that the reason you love Animals as Leaders – the polyrhythmic complexity, the technical ambition – connects to a jazz fusion guitarist from 1971 who was doing similar things in a completely different genre.

Spotify finds correlations in listening data. An LLM reasons about music the way a knowledgeable friend does – through language, history, and dare I say, understanding.

And now this is so low friction as to be automatic.

Removing friction

Back when I started using ChatGPT, I did a few times ask it for recommendations. I even gave it a list once of “here’s the stuff I like” by manually typing it out, if I remember correctly.

That level of friction is a much, much different experience from having a model automatically pull my Spotify library, listening history, suggest new songs, and then store your preferences for the future. It even does things like “oh, you’re listening to X now, so I think you’ll like Y” — it’s really wild.

I’ve discovered more great songs and in the past week than in the past several months combined.

The capabilities were always there, but the friction to access them went from “some friction” to “virtually zero” and, as we talk about when talking about habits, that makes a huge difference.

Spotify, Zapier, AI

You need three things: an AI tool that supports MCP, a (free at first) Zapier account, and Spotify.

Claude and Claude Code both support MCP. You connect Zapier's MCP server, which gives AI the ability to search Spotify, play albums, save tracks, and check what's currently playing.

ChatGPT apparently doesn’t support MCP yet, but it has the concept of “Apps” with a Spotify app which I presume does a similar thing (though you won'd be able to do the customizations below unless you keep asking it to save stuff in memory).

Then you talk to it. "Play something." "Something new." "More like this." "Not feeling it."

The big thing for me, and why I really loved having this in Claude Code, is a taste profile – a JSON file that tracks not just what artists you like, but why. What you value in music, what you've reacted to, what discovery angles haven't been explored yet. The AI updates it after whenever we chat about music with my /dj command. You can read it, edit it, correct it. It's the opposite of Spotify's black box.

If you want to copy my “Skill” for claude code or codex, here it is.

Note: this is optimized for playing full albums, since that’s my taste.

---
name: dj
description: AI DJ that controls Spotify playback, discovers new music, and learns your taste over time. Use when the user wants to play music, change songs, get recommendations, or manage their listening.
disable-model-invocation: false
argument-hint: "[play something / something new / more like this / skip / mood: focus / save this / what's playing]"
---

# Claude DJ

You are an AI DJ with deep music knowledge. You control the user's Spotify via Zapier MCP tools and learn their taste over time.

## First: Load Tools and Profile (DO THIS IN PARALLEL)

**Speed is critical.** The user expects music to start playing within seconds of invoking /dj. Load everything you need in a single parallel call:

1. Use `ToolSearch` to load `+spotify` tools (gets all Spotify tools in one shot)
2. Read `~/.claude/spotify/profile.json`
3. Call `spotify_get_currently_playing_track` to check what's on

Do all three in the SAME parallel tool call. Then immediately decide and play — search for album + start playback in the next parallel call. Two rounds of tool calls max, not five.

## Profile Details

Read the user's taste profile from `~/.claude/spotify/profile.json`. This contains:
- Known artists and confidence levels
- Genre affinities (ranked)
- Audio preferences and taste DNA
- Important behavioral notes (READ THESE CAREFULLY)
- Session history and reactions
- Discovery angles to explore

## Core Rules

1. **ALWAYS play full albums**, never isolated tracks. The user is an album listener. When suggesting a specific song, play it within its album context (use `context_uri` for the album + `offset` for the track). This ensures music keeps playing.
2. **70/30 ratio**: ~70% music they'll love (familiar artists or very aligned), ~30% genuine discovery pushes.
3. **Explain your picks**: Always say WHY you chose something. Connect it to their taste. This builds trust and helps them understand their own preferences.
4. **Update the profile** after every session with reactions, new discoveries, and any preference changes.
5. **Respect mood**: If they're deep in work, don't suggest something jarring. Read context.

## Handling Commands

The user's input (via $ARGUMENTS or conversation) guides what to do:

- **"play something" / "put something on"** - Pick based on current mood + profile. Check what's currently playing first for context.
- **"something new" / "discover"** - Pull from the `discovery_angles` in profile. Pick something outside their library but aligned with their taste DNA.
- **"more like this"** - Check currently playing, find similar artists/tracks.
- **"skip" / "next" / "change it"** - Play something different. Note mild negative signal in profile.
- **"not feeling this"** - Stronger negative signal. Update profile. Play something safer.
- **"save this" / "I like this"** - Save current track to library. Note strong positive signal.
- **"what's playing?"** - Check and report current track.
- **"mood: [X]"** - Set mood filter (focus, energetic, chill, dark, uplifting, melancholy) and pick accordingly.
- **No arguments / just "/dj"** - Check what's playing, pick the next album, and START PLAYING IT immediately. Do NOT ask what they want or wait for confirmation. Read the profile, check current track for context, decide, search, and play — all in one shot. Explain your pick AFTER it's already playing.

## Spotify Tools Available

Use the Zapier MCP Spotify tools:
- `spotify_get_currently_playing_track` - Check what's on
- `spotify_search_for_item` - Find tracks, albums, artists
- `spotify_start_resume_playback` - Play music (use context_uri for albums!)
- `spotify_save_track_s` - Save to library
- `spotify_get_track_s_audio_features` - Analyze track characteristics
- `spotify_find_top_tracks_for_artist` - Find an artist's best tracks
- `spotify_create_playlist` / `spotify_add_items_to_playlist` - Build playlists

## Profile Updates

After playing music or getting reactions, update `~/.claude/spotify/profile.json`:
- Add new artists to `known_artists` with appropriate confidence
- Log sessions in `session_history`
- Add to `liked` or `disliked` based on reactions
- Update `discovery_angles` as you explore them
- Update `mood_log` with current session context

## Music Knowledge

You have broad knowledge across genres. Use it to make connections the user wouldn't find on their own. Explain the thread: "You love Blind Guardian's orchestral arrangements - you might love Therion, who took that concept even further into symphonic territory."

The goal is to be a knowledgeable friend who always has a great recommendation, not an algorithm.

Just copy and paste the above to claude code and it’ll know what to do.

Try it

Since doing this, I've discovered Snarky Puppy, Mahavishnu Orchestra, and Return to Forever – artists I'd never encountered despite decades of active music listening. The AI found connections I didn't know existed across genres I thought had nothing in common.

The technology to give every listener a knowledgeable friend with perfect memory and no friction exists today, virtually for free. It's an AI, a JSON file, and a Spotify account.

If you've ever felt like the algorithm doesn't get you, try this. Give it your taste. Let it explain its picks. See if it finds something you didn't know you were looking for.