Our review
Controls Spotify playback on macOS using AppleScript commands via osascript.
Strengths
- Retrieves current track info (title, artist, album) and playback position.
- Simple play, pause, next, and previous track commands.
- Lightweight and relies only on built-in macOS tools.
- Provides conversational responses for a natural interaction.
Limitations
- MacOS only; requires the Spotify desktop app to be installed and running.
- Cannot handle playlists, search, or volume control.
- If Spotify is not running, the skill will ask the user to open it.
When the user wants to check or control Spotify playback from a terminal-based AI agent on macOS.
On non-macOS systems or when the user does not use the Spotify desktop app (e.g., Spotify Web).
Security analysis
SafeThe skill only executes predefined AppleScript commands to control Spotify, with no file system modifications, network calls, or user input injection. It poses no execution risk.
No concerns found
Examples
What song is currently playing on Spotify?Pause the music on Spotify.Skip to the next track on Spotify.name: spotify description: Control Spotify playback and check what's currently playing. Use when the user asks what music or song is playing, wants to play/pause/stop music, skip tracks, or interact with Spotify in any way. allowed-tools: Bash(osascript -e *)
Spotify Control Skill
Use AppleScript via osascript to interact with the Spotify desktop app on macOS.
When the user asks what music is playing
Run this command to get the current track info:
osascript -e '
tell application "Spotify"
if player state is playing then
set trackName to name of current track
set artistName to artist of current track
set albumName to album of current track
set trackDuration to duration of current track
set trackPosition to player position
set durationSec to trackDuration / 1000
set mins to (durationSec div 60) as integer
set secs to (durationSec mod 60) as integer
set posMins to (trackPosition div 60) as integer
set posSecs to (trackPosition mod 60 div 1) as integer
return "Now playing: " & trackName & " by " & artistName & " from the album " & albumName & " (" & posMins & ":" & (text -2 thru -1 of ("0" & posSecs)) & " / " & mins & ":" & (text -2 thru -1 of ("0" & secs)) & ")"
else
return "Spotify is not currently playing anything."
end if
end tell'
Present the result conversationally to the user.
When the user asks to play music
Run: osascript -e 'tell application "Spotify" to play'
When the user asks to pause or stop music
Run: osascript -e 'tell application "Spotify" to pause'
When the user asks to skip or play the next track
Run: osascript -e 'tell application "Spotify" to next track'
When the user asks to go back or play the previous track
Run: osascript -e 'tell application "Spotify" to previous track'
Important notes
- If Spotify is not running, tell the user to open Spotify first.
- Keep responses short and conversational.
- Do not use the Skill tool recursively.
Task Prioritizer
Productivity
Prioritizes your tasks using Eisenhower, ICE, and RICE frameworks.
Weekly Status Report Generator
Productivity
Generate structured and concise weekly status reports.
Daily Standup Report
Productivity
Generates structured and concise daily standup reports.