apple-music
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseApple Music Skill
Apple Music Skill
Overview
概述
Enables Claude to interact with Apple Music for streaming, library management, playlist curation, and music discovery through the web interface.
让Claude能够通过网页界面与Apple Music交互,实现流式播放、音乐库管理、播放列表制作和音乐发现功能。
Quick Install
快速安装
bash
curl -sSL https://canifi.com/skills/apple-music/install.sh | bashOr manually:
bash
cp -r skills/apple-music ~/.canifi/skills/bash
curl -sSL https://canifi.com/skills/apple-music/install.sh | bash或者手动安装:
bash
cp -r skills/apple-music ~/.canifi/skills/Setup
设置
Configure via canifi-env:
bash
undefined通过canifi-env进行配置:
bash
undefinedFirst, ensure canifi-env is installed:
首先,确保已安装canifi-env:
curl -sSL https://canifi.com/install.sh | bash
curl -sSL https://canifi.com/install.sh | bash
canifi-env set APPLE_ID_EMAIL "your-email@example.com"
undefinedcanifi-env set APPLE_ID_EMAIL "your-email@example.com"
undefinedPrivacy & Authentication
隐私与认证
Your credentials, your choice. Canifi LifeOS respects your privacy.
你的凭据,由你掌控。 Canifi LifeOS尊重你的隐私。
Option 1: Manual Browser Login (Recommended)
选项1:手动浏览器登录(推荐)
If you prefer not to share credentials with Claude Code:
- Complete the Browser Automation Setup using CDP mode
- Login to the service manually in the Playwright-controlled Chrome window
- Claude will use your authenticated session without ever seeing your password
如果你不想与Claude Code共享凭据:
- 使用CDP模式完成浏览器自动化设置
- 在Playwright控制的Chrome窗口中手动登录该服务
- Claude将使用你的已认证会话,全程不会获取你的密码
Option 2: Environment Variables
选项2:环境变量
If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果你愿意共享凭据,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"注意:存储在canifi-env中的凭据仅能在你的本地设备上访问,绝不会被传输。
Capabilities
功能
- Stream songs, albums, and playlists
- Manage personal music library
- Create and edit playlists
- Access Apple Music radio stations
- View listening history and recommendations
- 流式播放歌曲、专辑和播放列表
- 管理个人音乐库
- 创建和编辑播放列表
- 访问Apple Music广播电台
- 查看收听历史和推荐内容
Usage Examples
使用示例
Example 1: Add to Library
示例1:添加到音乐库
User: "Add the new Taylor Swift album to my library"
Claude: I'll search for Taylor Swift's latest album and add it to your Apple Music library.用户:"把泰勒·斯威夫特的新专辑添加到我的音乐库"
Claude:我将搜索泰勒·斯威夫特的最新专辑并添加到你的Apple Music音乐库中。Example 2: Create Radio Station
示例2:创建广播电台
User: "Start a radio station based on The Beatles"
Claude: I'll create a personalized radio station inspired by The Beatles' music style.用户:"创建一个基于披头士乐队的广播电台"
Claude:我将创建一个灵感源自披头士乐队音乐风格的个性化广播电台。Example 3: Manage Playlist
示例3:管理播放列表
User: "Add this song to my Road Trip playlist"
Claude: I'll add the currently playing song to your Road Trip playlist.用户:"把这首歌添加到我的'公路旅行'播放列表"
Claude:我将把当前播放的歌曲添加到你的"公路旅行"播放列表中。Authentication Flow
认证流程
- Navigate to music.apple.com via Playwright MCP
- Click "Sign In" button
- Enter Apple ID credentials
- Handle 2FA via trusted device or iMessage
- Maintain session for subsequent requests
- 通过Playwright MCP导航至music.apple.com
- 点击“登录”按钮
- 输入Apple ID凭据
- 通过可信设备或iMessage处理双因素认证(2FA)
- 维持会话以用于后续请求
Error Handling
错误处理
- Login Failed: Retry authentication up to 3 times, then notify via iMessage
- Session Expired: Re-authenticate automatically
- Rate Limited: Implement exponential backoff
- 2FA Required: Wait for code via iMessage or trusted device
- Playback Error: Check subscription status and device availability
- 登录失败:最多重试3次认证,随后通过iMessage通知
- 会话过期:自动重新认证
- 请求受限:实现指数退避机制
- 需要2FA:等待通过iMessage或可信设备获取验证码
- 播放错误:检查订阅状态和设备可用性
Self-Improvement Instructions
自我改进说明
When encountering new UI patterns or changes:
- Document the change with context
- Update element selectors accordingly
- Track successful operations for pattern learning
- Suggest workflow optimizations
遇到新的UI模式或变更时:
- 记录变更及相关上下文
- 相应更新元素选择器
- 跟踪成功操作以学习模式
- 提出工作流优化建议
Notes
注意事项
- Requires active Apple Music subscription
- Web player has some limitations vs native apps
- 2FA is typically required for Apple ID
- Library sync may take a few moments
- 需要有效的Apple Music订阅
- 网页播放器相较于原生应用存在一些限制
- Apple ID通常需要双因素认证(2FA)
- 音乐库同步可能需要一些时间