agentleFS
alexjmiller5alexjmiller5/agent-config-public/skills/spotify/SKILL.md

spotify

Skill0 starsChanged 42 days agoMITView on GitHub

Use when controlling Spotify from the terminal or scripts on the user's Macs - play/pause/skip, search-and-play, playlists, liking tracks, current-track info, transferring playback between devices, or anything involving the spotify_player CLI/TUI.

  • Reads credentials

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use sonos, heartmula and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • emanueleieloSkill

    sonos

    Control Sonos speakers: discover, play/pause, volume, grouping, favorites, and queue management via sonos CLI.

    Also in 4 projects that use this

  • math-incSkill

    heartmula

    Set up and run HeartMuLa, the open-source music generation model family (Suno-like). Generates full songs from lyrics + tags with multilingual support.

    Also in 3 projects that use this

  • emanueleieloSkill

    imessage

    Send and read iMessage/SMS via Messages.app using the imsg CLI. List chats, view history, send messages to phone numbers or Apple IDs.

    Also in 5 projects that use this

  • ansvisorSkill

    shopping

    Checks product pages and feed for ChatGPT Shopping (US) and Google Shopping (EU).

    Also in 3 projects that use this

  • ourinesSkill

    forget

    Delete saved knowledge from ~/.claude/learnings/ and optionally clean up knowledge graph.

    Also in 3 projects that use this

  • HyaxiaSkill

    blogwatcher

    Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Search output is flat arrays, not Web-API .tracks.items: spotify_player search "q" | jq -r '.tracks[0].id' Play top hit: spotify_player …

    line 41

“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Spotify (spotify_player)

Binary: spotify_player - TUI with no args, CLI subcommands for scripting. For full syntax trust spotify_player -h / spotify_player <cmd> -h over memory. Spotify Premium required.

Auth

spotify_player keeps its auth files in its cache folder (-C, default ~/.cache/spotify-player): credentials.json (the librespot session) and one <client_id>_token.json per Web API client (token + refresh token). A machine can wrap the binary to hand these files in through a temporary -C folder; when a private auth companion skill (spotify-auth) is installed, load it for where this machine keeps them and how a re-login is saved.

  • Web API client = your own Spotify developer app, passed as -o client_id=<id>. Upstream master's custom-client mode falls back to the built-in ncspot client on 4xx and routes search, me/playlists, playlists/ to ncspot always (ncspot_only_get_endpoints). Reason: ncspot alone gets throttled for hours (429 on every call); a post-2024 dev app alone breaks on stripped fields (missing field followers/popularity).
  • Re-login (auth files reset, or the refresh token expired - 180 days in development mode): spotify_player authenticate re-mints the Web API tokens (two browser consents: your dev app and "Spotify for Desktop"; click Agree or drive button[data-testid=auth-accept] with chrome-control). Only credentials.json needs a TUI launch (a session connect writes it; authenticate never does) - it is minted once and is account-bound, so it rarely needs redoing. The TUI needs a real pty; script -q /dev/null spotify_player works from an agent shell.
  • 429 on ncspot-routed calls (search) = Spotify throttling the shared default app; the binary retries api_rate_limit_retries times, then errors. Not an auth problem, not fixable client-side - retry later.

Script recipes (the parts agents guess wrong)

  • Search output is flat arrays, not Web-API .tracks.items: spotify_player search "q" | jq -r '.tracks[0].id' Play top hit: spotify_player playback start track --id "$(spotify_player search "q" | jq -r '.tracks[0].id')" - or skip the pipeline with --name "q".
  • Device transfer is its own subcommand, not a playback flag: spotify_player connect -n "<device>"; list with spotify_player get key devices. The official desktop app only appears as a device while it's running.
  • JSON state: spotify_player get key playback (other keys: devices, queue, user-playlists, user-liked-tracks, user-saved-albums, user-top-tracks).
  • Shuffled playlist: spotify_player playback start context -s -n "gym" playlist.
  • like = like current track · lyrics = current track's lyrics · playback volume 80 · playlist CRUD under spotify_player playlist.
  • Config: ~/.config/spotify-player/app.toml; one-off override: -o key=value.

Daemon mode on macOS

spotify_player -d works (nix build compiles daemon + streaming + rodio) but not with media control, which is on by default - set enable_media_control = false (config or -o) before daemonizing. Running it persistently means a launchd agent declared in your machine configuration, never raw launchctl.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.