Agent skill · software engineering · sundial-org
apple-music-2
Apple Music integration via AppleScript (macOS) or MusicKit API
Why this skill is useful
Provides specific AppleScript commands and MusicKit API patterns for managing Apple Music that the AI wouldn't reliably generate on its own.
What it needs
Requires apple account access. About 9k tokens when loaded. Last updated 2026-03-07. 639 stars on the source repository.
What this skill does
Apple Music Integration Guide for integrating with Apple Music. Covers AppleScript (macOS), MusicKit API (cross-platform), and the critical library-first requirement. When to Use Invoke when users ask to: Manage playlists (create, add/remove tracks, list) Control playback (play, pause, skip, volume) Search catalog or library Add songs to library Access listening history or recommendations Critical Rule: Library-First Workflow You CANNOT add catalog songs directly to playlists. Songs must be in the user's library first: ❌ Catalog ID → Playlist (fails) ✅ Catalog ID → Library → Playlist (works) Why: Playlists use library IDs (i.abc123), not catalog IDs (1234567890). This applies to both AppleScript and API approaches. Platform Comparison Feature AppleScript (macOS) MusicKit API --------- :-------------------: :------------: Setup required None Dev account + tokens Playlist management Full API-created only Playback control Full None Catalog search No Yes Library access Instant With tokens Cross-platform No Yes --- AppleScript (macOS) Zero setup. Works immediately with the Music app. Run via Bash: Multi-line scripts: Available Operations Category Operations ---------- ------------ Playback play, pause, stop, resume, next track, previous track, fast forward, rewind Player State player position, player state, sound volume, mute, shuffle enabled/mode, song repeat Current Track name, artist, album, duration, time, rating, loved, disliked, genre, year, track number Library search, list tracks, get track properties, set ratings Playlists list, create, delete, rename, add tracks, remove tracks, get tracks AirPlay list devices, select device, current device Track Properties (Read) Track Properties (Writable) Player State Properties Playback Commands Library Queries Playlist Operations AirPlay String Escaping Always escape user input: Limitations No catalog access - only library content macOS only - no Windows/Linux --- MusicKit API Cross-platform but requires Apple Developer acc …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sundial-org/apple-music-2