# musickit

A MusicKit and MediaPlayer skill: catalog search, subscriptions, playback queue, Now Playing and remote commands for iOS apps.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3100 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/musickit/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/musickit

## What it does

The skill walks an agent through wiring Apple Music into an iOS app. Catalog search runs on `MusicCatalogSearchRequest`, subscriptions are read from `MusicSubscription.current`, and playback goes through `ApplicationMusicPlayer` with its queue. Separate sections cover `MPNowPlayingInfoCenter` and `MPRemoteCommandCenter`, so the lock screen and remote controls get the metadata they need.

Setup comes first. The skill tells you to enable the MusicKit App Service for the explicit bundle ID, add `NSAppleMusicUsageDescription` to Info.plist, and set the `audio` background mode in `UIBackgroundModes`. Debugging code before those three are right wastes time, because nothing will authorize or play.

Inside you also get authorization via `MusicAuthorization.request()`, the Apple Music subscription offer sheet, a common-mistakes list and a review checklist. One catch worth knowing up front: catalog playback is gated on `canPlayCatalogContent`, so a user without a subscription gets no audio and your UI has to say so.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill musickit -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/musickit/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/musickit/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill musickit -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/musickit/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill musickit -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/musickit/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills musickit
```

2. **Manually: put the files in place**
- File: `.github/skills/musickit/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill musickit -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/musickit
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/musickit/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill musickit -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/musickit/SKILL.md

## When to use it
- add Apple Music catalog search to an iOS app
- gate playback on the user's Apple Music subscription
- build a playback queue and skip between tracks
- show the current track on the lock screen and CarPlay
- review MusicKit code against a mistake checklist

## Example prompts
- Add Apple Music catalog search with MusicKit and show the results in a list
- Build a player screen on ApplicationMusicPlayer with a queue and a play-next action
- Set up Now Playing and remote commands so the track shows on the lock screen

## Similar
- [swiftdata-pro](https://affpapa.org/en/nevibecode/skills/swiftdata-pro.md) — skill · 9300 installs
- [cmux-architecture](https://affpapa.org/en/nevibecode/skills/cmux-architecture.md) — skill · 4900 installs
- [swiftui-patterns](https://affpapa.org/en/nevibecode/skills/affaan-m-swiftui-patterns.md) — skill · 4600 installs
- [swift-expert](https://affpapa.org/en/nevibecode/skills/swift-expert.md) — skill · 4100 installs
- [spm-build-analysis](https://affpapa.org/en/nevibecode/skills/spm-build-analysis.md) — skill · 3400 installs
- [xcode-compilation-analyzer](https://affpapa.org/en/nevibecode/skills/xcode-compilation-analyzer.md) — skill · 3400 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 69 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
