← 提示词库 Meta/muse-agent/skills/spotify/SKILL.md 原文 md
🌐 中英双语对照

name: "spotify"
description: "Discover, search, and manage Spotify music, podcasts, and playlists, including deleting shows or episodes you created with Save to Spotify."
icon: "spotify"
metadata: { "includeInPrompt": true }

Spotify / Spotify

Purpose / 目的

Use spotify-api to browse personalized Spotify content, search for music and podcasts, manage the user's library and playlists, check saveability of items, and start or control Spotify playback. For new playback during a voice conversation, follow Voice playback below instead of calling spotify-api play. Use save-to-spotify to manage shows and episodes you created through Save to Spotify.

使用 spotify-api 浏览个性化的 Spotify 内容、搜索音乐和播客、管理用户的资料库与播放列表、检查条目是否可保存,以及启动或控制 Spotify 播放。在语音对话中发起新的播放时,请遵循下方的语音播放部分,而不是调用 spotify-api play。使用 save-to-spotify 管理你通过 Save to Spotify 创建的节目和单集。

Voice playback / 语音播放

Use this section only when someone asks to start new music during a voice
conversation. For pause, resume, stop, skip, previous, status, volume,
transfer, queue, login, search, library, or playlist requests, use the
spotify-api commands below.

仅当有人在语音对话中要求开始播放新音乐时才使用本节。对于暂停、恢复、停止、跳过、上一首、状态、音量、转移、队列、登录、搜索、资料库或播放列表等请求,请使用下方的 spotify-api 命令。

Choose where to play / 选择播放位置

Use the first rule that matches:

使用第一条匹配的规则:

  1. If the user names a playback device other than the device carrying this
    call, such as a phone, computer, TV, speaker, car, or console, or refers to
    another device named earlier with words like "there" or "the same speaker,"
    run spotify-api devices. Find the exact device, then use
    spotify_connect and its spotify_device_id. A specifically named phone
    always uses this rule, even if it carries an app-audio call. If there is no
    clear match, ask which device to use. Never use auto for that separate
    named or previously referenced device.
    如果用户指定的播放设备不是承载本次通话的设备(例如手机、电脑、电视、音箱、汽车或游戏主机),或者用“那里”“同一个音箱”之类的词指代先前提到的另一台设备,则运行 spotify-api devices,找到确切的设备,然后使用 spotify_connect 及其 spotify_device_id。被明确点名的手机始终适用本条规则,即使它承载的是 app-audio 通话。如果没有明确的匹配,请询问使用哪台设备。对于那台被单独点名或先前提及的设备,绝不要使用 auto。
  2. Otherwise use auto for the device carrying this call. This includes
    "here", "these glasses", "this device", naming that same non-phone calling
    device, "play X", and "play X on Spotify". Spotify is the music service,
    not the device.
    否则,对承载本次通话的设备使用 auto。这包括“这里”“这副眼镜”“这台设备”、点名同一台非手机通话设备、“播放 X”以及“在 Spotify 上播放 X”。Spotify 是音乐服务,不是设备。

Start the music / 开始播放

Call muse.music once with action set to play and the destination chosen
above. Do not call spotify-api play, spotify-api wearable-play, or
muse.device.invoke for this request.

调用一次 muse.music,将 action 设为 play,并使用上文选定的目标。对于此请求,不要调用 spotify-api play、spotify-api wearable-play 或 muse.device.invoke。

For auto, trusted host code checks the exact device that started this voice
call. If its live tool list contains music_fulfillment, the host calls that
command once on that device. If no supported call device can be resolved, the
host uses the active Spotify Connect device. If a resolved device disappears
or loses the command during dispatch, the host stops instead of switching
devices. Do not inspect or call device tools yourself.

对于 auto,受信任的宿主代码会检查发起本次语音通话的确切设备。如果其实时工具列表包含 music_fulfillment,宿主会在该设备上调用一次该命令。如果无法解析出受支持的通话设备,宿主会使用活跃的 Spotify Connect 设备。如果已解析的设备在分发过程中消失或失去该命令,宿主会直接停止,而不是切换设备。不要自行检查或调用设备工具。

If muse.music fails, report the failure. Do not try another device or
playback route. If Spotify was disconnected, let the tool show the connection
flow. When the user connects and asks again, call muse.music again.

如果 muse.music 失败,请报告该失败。不要尝试其他设备或播放路径。如果 Spotify 已断开连接,让工具展示连接流程。当用户完成连接并再次请求时,再次调用 muse.music。

Tooling / 工具

Use the installed CLI directly from PATH.

直接使用 PATH 中已安装的 CLI。

Connection / 连接

Browse & Discover / 浏览与发现

Search / 搜索

Filter values / 过滤值

Library / 资料库

Delete Save to Spotify shows or episodes / 删除 Save to Spotify 创建的节目或单集

【评论】删除能力被收敛到专用的 save-to-spotify CLI,并要求轮询确认传播完成,这是一种边界设计,避免经由通用 API 误删内容或遗漏独立发布的 RSS 源。

Collections (Playlists) / 合集(播放列表)

Playback Control / 播放控制

Known unavailable or conditional commands / 已知不可用或有条件限制的命令

Auth / 认证

spotify-api owns the Spotify connection workflow.

spotify-api 负责 Spotify 连接工作流。

Auth contract:

认证契约:

Operating Rules / 操作规则

  1. Verify connection with spotify-api status before spotify-api data calls. For Save to Spotify management, start with save-to-spotify --json shows; if it reports a token or connection error, ask the user to connect Spotify in Settings → Connections → Spotify, then retry. If it reports that management is unavailable, do not present reconnection as a fix.
    在调用 spotify-api 获取数据前,先用 spotify-api status 验证连接。对于 Save to Spotify 管理,从 save-to-spotify --json shows 开始;如果它报告令牌或连接错误,请用户在 Settings → Connections → Spotify 中连接 Spotify,然后重试。如果它报告管理不可用,不要把重新连接当作解决办法。
  2. Browse with search, library, and experience. Extract relevant items; never dump full responses.
    使用 search、library 和 experience 浏览。提取相关条目;绝不原样倾倒完整响应。
  3. When a section includes next, call spotify-api next-page --url <next> to fetch additional pages. Continue following next until it is absent or the user has enough results.
    当某个分节包含 next 时,调用 spotify-api next-page --url <next> 获取更多页。持续跟随 next,直到它不存在或结果已足够。
  4. The documented Save to Spotify show and episode deletions may proceed from a clear, unambiguous user request without an additional confirmation. Do not promise unsupported spotify-api cleanup (unsave/remove, playlist deletion, remove-from-playlist, or reordering).
    文档所述的 Save to Spotify 节目和单集删除,在用户明确且无歧义的请求下即可执行,无需额外确认。不要承诺 spotify-api 不支持的清理操作(取消保存/移除、删除播放列表、从播放列表移除或重新排序)。
  5. Direct spotify-api playback requires an active Spotify Connect device. Run spotify-api devices or spotify-api now-playing first and prefer an explicit --target-device-id where supported. Voice playback through muse.music with auto may instead use the calling device's live music_fulfillment capability.
    直接使用 spotify-api 播放需要一台活跃的 Spotify Connect 设备。先运行 spotify-api devices 或 spotify-api now-playing,并在支持时优先使用显式的 --target-device-id。通过 muse.music 且目标为 auto 的语音播放,则可改用通话设备实时的 music_fulfillment 能力。
  6. Every response referencing existing Spotify content must include a Spotify deep link. Use spotify_url, or construct https://open.spotify.com/{type}/{id} from spotify_uri. A Save to Spotify deletion confirmation is the exception: the resource no longer exists, so name the deleted title without exposing its internal ID or constructing a dead link.
    每个引用了现存 Spotify 内容的响应都必须包含一个 Spotify 深度链接。使用 spotify_url,或由 spotify_uri 构造 https://open.spotify.com/{type}/{id}。Save to Spotify 的删除确认是例外:资源已不存在,因此只说出被删除的标题,不暴露其内部 ID,也不构造失效链接。
  7. Reference Spotify by name ("on Spotify" / "via Spotify") whenever you surface content or confirm an action.
    每当呈现内容或确认某个操作时,都要点名 Spotify(“on Spotify” / “via Spotify”)。
  8. Flag explicit content: when is_explicit: true, show [E] next to the title.
    标记露骨内容:当 is_explicit: true 时,在标题旁显示 [E]。
  9. After a direct spotify-api playback change (play, skip, previous, resume), follow up with now-playing and name the track plus creator; never confirm with only a device name. For muse.music, use its result and do not issue a second playback action.
    在直接的 spotify-api 播放变更(play、skip、previous、resume)之后,跟进 now-playing 并说出曲目及创作者;绝不只用设备名称进行确认。对于 muse.music,使用其结果,不要再发出第二个播放操作。
  10. A successful playback response means the action took effect. If playback still errors after CLI retries, surface it once in plain user-facing language. If an action is not available, point the user to the Spotify app rather than speculating.
    播放响应成功即表示操作已生效。如果 CLI 重试后播放仍然出错,用平实的用户语言说明一次。如果某个操作不可用,引导用户前往 Spotify 应用,而不要臆测。
  11. If an exact song or album by an artist is missing from search, or a known Spotify item cannot be resolved for playlist or playback actions, do not substitute a cover, tribute, karaoke, or similarly named item. Relay catalog_fallback.message verbatim; it already renders the approved Muse copy with Markdown links to the requested content search and the exact artist page. Do not add a cause, preamble, follow-up, or alternative wording; blame the user's account; suggest reconnecting; or claim the item was removed from Spotify.
    如果搜索结果中缺少某艺人的确切歌曲或专辑,或者在播放列表或播放操作中无法解析出某个已知的 Spotify 条目,不要用翻唱、致敬、卡拉OK或名称相近的条目替代。逐字转达 catalog_fallback.message;它已完整渲染了 Muse 的官方批准文案,其中包含指向所请求内容搜索和确切艺人页面的 Markdown 链接。不要补充原因、开场白、后续追问或替代表述;不要归咎于用户的账户;不要建议重新连接;也不要声称该条目已从 Spotify 移除。

【评论】第 11 条要求逐字转达预渲染的 catalog_fallback.message 并禁止任何补充或变通表述,属于脚本化回复设计,用于保证官方话术一致并抑制模型在条目缺失时的自行发挥。