Skip to content
Agentmart
Submit a tool

spotify

Query the Spotify Web API (search tracks/artists/albums, fetch artist, album, playlist, audio features, recommendations) using SPOTIFY_CLIENT_ID /…

Skill by gbencke

IndexedMIT★ 6
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/gbencke-spotify

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Query the Spotify Web API (search tracks/artists/albums, fetch artist, album, playlist, audio features, recommendations) using SPOTIFY_CLIENT_ID / SPOTIFY_CLIENT_SECRET env vars via client-credentials auth. Use when the user asks to search Spotify, look up an artist/album/track, fetch playlist contents, or invokes /spotify.

Use cases: backend, security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/spotify

What's inside

Skill name
spotify
Description
Query the Spotify Web API (search tracks/artists/albums, fetch artist, album, playlist, audio features, recommendations) using SPOTIFY_CLIENT_ID / SPOTIFY_CLIENT_SECRET env vars via client-credentials auth. Use when the user asks to search Spotify, look up an artist/album/track, fetch playlist contents, or invokes /spotify.
License
MIT
Instructions
49 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (3)

  • SKILL.md
  • spotify.py
  • spotify_auth.py

SKILL.md (first lines)

# Spotify Web API

Auth is handled by the helper using env vars `SPOTIFY_CLIENT_ID` and
`SPOTIFY_CLIENT_SECRET` (client-credentials flow — already verified working).
No OAuth redirect needed for public catalog data.

Run the helper next to this file:

```bash
python3 ~/.pi/agent/skills/spotify/spotify.py <command>
```

## Commands

| Command | Example |
|---|---|
| Search | `spotify.py search "bohemian rhapsody" track 10` |
| | `spotify.py search "radiohead" artist 3` |
| GET any endpoint | `spotify.py get /v1/artists/4Z8W4fKeB5YxbusRsdQVPb` |
| | `spotify.py get /v1/playlists/37i9dQZF1DXcBWIGoYBM5M` |
| | `spotify.py get /v1/albums/<id>/tracks limit=50` |
| POST | `spotify.py post /v1/playlists '{"name":"X","public":false}'` |

Useful endpoint paths (append IDs from search results):

- `/v1/artists/{id}`, `/v1/artists/{id}/top-tracks?market=US`, `/v1/artists/{id}/albums`
- `/v1/albums/{id}`, `/v1/albums/{id}/tracks`
- `/v1/tracks/{id}`, `/v1/audio-features/{id}`
- `/v1/playlists/{id}`, `/v1/playlists/{id}/tracks`
- `/v1/recommendations?seed_artists=...&seed_genres=...&limit=20`
- `/v1/browse/categories`, `/v1/browse/new-releases`

## Auth

`spotify_auth.py` was run once: a refresh token is stored at
`.spotify_token.json` (chmod 600, gitignored). `spotify.py` uses it
automatically (scopes: playlist-read-private, playlist-read-collaborative,
user-read-recently-played, user-top-read), so user endpoints like
`/v1/me/playlists`, `/v1/me/top/artists` and `/v1/me/player/recently-played`
work. Without the token file it
falls back to client-credentials (public catalog only). To re-authorize or
add scopes: edit `SCOPES` in `spotify_auth.py` and re-run it.

## Notes

- User endpoints available with current scopes: `/v1/me/playlists`, playlist contents, `/v1/me/top/artists`, `/v1/me/top/tracks`, `/v1/me/player/recently-played`.
- Note: `/v1/browse/new-releases` can return stale data; `tag:new` search only reaches ~2 weeks back. For a longer window, pull `/v1/artists/{id}/albums` for the user's top artists and filter by `release_date`.
- More scopes (saved tracks, playback, etc.) require re-running `spotify_auth.py`.
- Pipe through `jq` to trim noise: `... | jq '.tracks.items[] | {name, artists: [.artists[].name]}'`.
- Token is refreshed per invocation; fine for interactive use.

From gbencke/dotfiles, MIT.

More from gbencke/dotfiles

Signals

Stars
6
Forks
0
Open issues
0
Last commit (this folder)
Sep 21, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from gbencke

Cite this page

spotify skill. Agent Mart. https://agentmart.dev/skills/gbencke-spotify (last updated 2026-10-24)