-
Notifications
You must be signed in to change notification settings - Fork 0
add spotify skill #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| --- | ||
| name: spotify | ||
| description: Use this skill to control Spotify playback, search music, manage playlists, and queue tracks via the spotify_player CLI. | ||
| license: MIT | ||
| metadata: | ||
| author: dotagents | ||
| version: 1.0.0 | ||
| category: media | ||
| tags: "spotify,music,playback,playlists" | ||
| --- | ||
|
|
||
| # Spotify | ||
|
|
||
| Control Spotify playback via `spotify_player` CLI. | ||
|
|
||
| ## Use This Skill For | ||
|
|
||
| - Playing, pausing, skipping tracks | ||
| - Searching for songs, albums, artists, playlists | ||
| - Viewing the playback queue | ||
| - Listing and selecting playback devices | ||
| - Creating and modifying playlists | ||
| - Checking what is currently playing | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Spotify Premium account (required by Spotify API for playback control) | ||
| - `spotify_player` installed: `brew install spotify_player` or `cargo install spotify_player --locked` | ||
| - One-time auth: register a Spotify Developer app at developer.spotify.com, set `client_id` in `~/.config/spotify-player/app.toml`, then run `spotify_player authenticate` | ||
|
|
||
| ## Core Rules | ||
|
|
||
| - Use `--json` or pipe through `jq` when output will be consumed by another tool or agent. | ||
| - Do not start the TUI unless the user explicitly asks for it. Use CLI subcommands for all agent operations. | ||
| - The CLI communicates via a local socket (default port 8080). If no instance is running, commands start a temporary client automatically. | ||
| - Treat auth tokens as managed state. Use `spotify_player authenticate` instead of editing config files manually. | ||
|
|
||
| ## Commands | ||
|
|
||
| ### Playback | ||
|
|
||
| ```bash | ||
| spotify_player playback play-pause | ||
| spotify_player playback play | ||
| spotify_player playback pause | ||
| spotify_player playback next | ||
| spotify_player playback previous | ||
| spotify_player playback shuffle | ||
| spotify_player playback repeat | ||
| spotify_player playback seek 30000 # seek forward 30s (offset in ms) | ||
| spotify_player playback volume 50 # set volume to 50% | ||
| spotify_player playback volume 10 --offset # increase by 10% | ||
| spotify_player playback volume -10 --offset # decrease by 10% | ||
| ``` | ||
|
|
||
| ### Play by Name or ID | ||
|
|
||
| ```bash | ||
| spotify_player playback start track --name "bohemian rhapsody" | ||
| spotify_player playback start track --id TRACKID | ||
| spotify_player playback start context album --name "kind of blue" | ||
| spotify_player playback start context playlist --name "chill vibes" | ||
| spotify_player playback start context playlist --id PLAYLISTID --shuffle | ||
| ``` | ||
|
|
||
| ### Now Playing | ||
|
|
||
| ```bash | ||
| spotify_player get key playback | ||
| spotify_player get key queue | ||
| ``` | ||
|
|
||
| ### Search | ||
|
|
||
| ```bash | ||
| spotify_player search "bohemian rhapsody" | ||
| spotify_player search "miles davis" | ||
| ``` | ||
|
|
||
| ### Devices | ||
|
|
||
| ```bash | ||
| spotify_player get key devices | ||
| spotify_player connect --name "Living Room Speaker" | ||
| spotify_player connect --id DEVICEID | ||
| ``` | ||
|
|
||
| ### Playlists | ||
|
|
||
| ```bash | ||
| spotify_player get key user-playlists | ||
| spotify_player playlist list | ||
| spotify_player playlist new "My Playlist" | ||
| spotify_player playlist new "Collab List" --public --collab | ||
| spotify_player playlist delete PLAYLISTID | ||
| spotify_player playlist edit add PLAYLISTID --track-id TRACKID | ||
| spotify_player playlist edit delete PLAYLISTID --track-id TRACKID | ||
| ``` | ||
|
|
||
| ### Library | ||
|
|
||
| ```bash | ||
| spotify_player get key user-liked-tracks | ||
| spotify_player get key user-saved-albums | ||
| spotify_player get key user-followed-artists | ||
| spotify_player get key user-top-tracks | ||
| ``` | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| - **Auth failure on macOS Sequoia**: known issue with redirect URI. Try setting redirect URI to `http://127.0.0.1:8989/login` in your Spotify Developer app settings. | ||
| - **No playback devices**: open Spotify on any device first. `spotify_player` can control any Spotify Connect device remotely. | ||
| - **Socket connection refused**: a spotify_player instance may not be running. Commands will auto-start one, but it needs a few seconds to initialize. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| --- | ||
| name: spotify | ||
| description: Use this skill to control Spotify playback, search music, manage playlists, and queue tracks via the spotify_player CLI. | ||
| license: MIT | ||
| metadata: | ||
| author: dotagents | ||
| version: 1.0.0 | ||
| category: media | ||
| tags: "spotify,music,playback,playlists" | ||
| --- | ||
|
|
||
| # Spotify | ||
|
|
||
| Control Spotify playback via `spotify_player` CLI. | ||
|
|
||
| ## Use This Skill For | ||
|
|
||
| - Playing, pausing, skipping tracks | ||
| - Searching for songs, albums, artists, playlists | ||
| - Viewing the playback queue | ||
| - Listing and selecting playback devices | ||
| - Creating and modifying playlists | ||
| - Checking what is currently playing | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Spotify Premium account (required by Spotify API for playback control) | ||
| - `spotify_player` installed: `brew install spotify_player` or `cargo install spotify_player --locked` | ||
| - One-time auth: register a Spotify Developer app at developer.spotify.com, set `client_id` in `~/.config/spotify-player/app.toml`, then run `spotify_player authenticate` | ||
|
|
||
| ## Core Rules | ||
|
|
||
| - Use `--json` or pipe through `jq` when output will be consumed by another tool or agent. | ||
| - Do not start the TUI unless the user explicitly asks for it. Use CLI subcommands for all agent operations. | ||
| - The CLI communicates via a local socket (default port 8080). If no instance is running, commands start a temporary client automatically. | ||
| - Treat auth tokens as managed state. Use `spotify_player authenticate` instead of editing config files manually. | ||
|
|
||
| ## Commands | ||
|
|
||
| ### Playback | ||
|
|
||
| ```bash | ||
| spotify_player playback play-pause | ||
| spotify_player playback play | ||
| spotify_player playback pause | ||
| spotify_player playback next | ||
| spotify_player playback previous | ||
| spotify_player playback shuffle | ||
| spotify_player playback repeat | ||
| spotify_player playback seek 30000 # seek forward 30s (offset in ms) | ||
| spotify_player playback volume 50 # set volume to 50% | ||
| spotify_player playback volume 10 --offset # increase by 10% | ||
| spotify_player playback volume -10 --offset # decrease by 10% | ||
| ``` | ||
|
|
||
| ### Play by Name or ID | ||
|
|
||
| ```bash | ||
| spotify_player playback start track --name "bohemian rhapsody" | ||
| spotify_player playback start track --id TRACKID | ||
| spotify_player playback start context album --name "kind of blue" | ||
| spotify_player playback start context playlist --name "chill vibes" | ||
| spotify_player playback start context playlist --id PLAYLISTID --shuffle | ||
| ``` | ||
|
|
||
| ### Now Playing | ||
|
|
||
| ```bash | ||
| spotify_player get key playback | ||
| spotify_player get key queue | ||
| ``` | ||
|
|
||
| ### Search | ||
|
|
||
| ```bash | ||
| spotify_player search "bohemian rhapsody" | ||
| spotify_player search "miles davis" | ||
| ``` | ||
|
|
||
| ### Devices | ||
|
|
||
| ```bash | ||
| spotify_player get key devices | ||
| spotify_player connect --name "Living Room Speaker" | ||
| spotify_player connect --id DEVICEID | ||
| ``` | ||
|
|
||
| ### Playlists | ||
|
|
||
| ```bash | ||
| spotify_player get key user-playlists | ||
| spotify_player playlist list | ||
| spotify_player playlist new "My Playlist" | ||
| spotify_player playlist new "Collab List" --public --collab | ||
| spotify_player playlist delete PLAYLISTID | ||
| spotify_player playlist edit add PLAYLISTID --track-id TRACKID | ||
| spotify_player playlist edit delete PLAYLISTID --track-id TRACKID | ||
| ``` | ||
|
|
||
| ### Library | ||
|
|
||
| ```bash | ||
| spotify_player get key user-liked-tracks | ||
| spotify_player get key user-saved-albums | ||
| spotify_player get key user-followed-artists | ||
| spotify_player get key user-top-tracks | ||
| ``` | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| - **Auth failure on macOS Sequoia**: known issue with redirect URI. Try setting redirect URI to `http://127.0.0.1:8989/login` in your Spotify Developer app settings. | ||
| - **No playback devices**: open Spotify on any device first. `spotify_player` can control any Spotify Connect device remotely. | ||
| - **Socket connection refused**: a spotify_player instance may not be running. Commands will auto-start one, but it needs a few seconds to initialize. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For any agent following this core rule by adding
--json, the CLI will reject the command: checked upstreaminit_cli, which registers only theme/config/cache/config-override/daemon globals, and the README’s scripting example pipesspotify_player search "$query" | jq ...with no JSON flag. Keep thejqadvice, but remove--jsonor agents will turn otherwise valid playback/search/get requests into argument errors.Useful? React with 👍 / 👎.