spotify-web-api

$npx mdskill add uvwt/agentdock/spotify-web-api

Retrieve current Spotify playback and search tracks using OAuth PKCE

  • Authorize access to Spotify without importing cookies.
  • Uses Spotify Web API for track searches and playback information.
  • Determines user's current listening state based on authorization tokens.
  • Provides simplified results of track searches and current playback details.

SKILL.md

.github/skills/spotify-web-apiView on GitHub ↗
---
name: spotify-web-api
description: Use Spotify Web API with official OAuth PKCE. Use to authorize Spotify safely, search tracks, read current playback, and add tracks to playlists without importing browser cookies.
version: 0.1.8
---

# Spotify Web API

Integration guide for Spotify's official Web API. It uses Authorization Code with PKCE, stores tokens locally under the private Skill data directory, and never returns access or refresh tokens in action output.

Use this skill for Spotify playlist edits, current playback lookup, track search, queueing, adding tracks to either a specified playlist or the playlist currently being played, and reading taste signals such as top tracks, top artists, recently played tracks, saved tracks, and local taste profiles.

## 辅助脚本执行

Skill 本体是本说明文档。确需调用包内辅助脚本时,在 Skill 包根目录使用相对路径执行;运行宿主负责切换到包根目录并把所需变量注入当前子进程。

```bash
printf '%s' '{"skill_action":"<动作>"}' | python3 run.py
```

输入必须是 JSON 对象。写操作仍按本文档中的确认规则执行。

| 动作 | 用途 |
|---|---|
| `status` | Show local OAuth/config state without returning secrets. Optionally validate with Spotify. |
| `auth-url` | Create a Spotify OAuth PKCE authorization URL. Add the returned redirect_uri to the Spotify app first. |
| `finish-auth` | Exchange a Spotify callback URL or authorization code for local tokens. Tokens are stored locally and not returned. |
| `current-playback` | Return the current Spotify playback context and current track. |
| `search-track` | Search Spotify tracks and return simplified results. |
| `list-playlists` | List current user's playlists. |
| `top-tracks` | Return the user's top Spotify tracks for short, medium, or long term taste signals. |
| `top-artists` | Return the user's top Spotify artists and genre tags for short, medium, or long term taste signals. |
| `recently-played` | Return recently played tracks, including played_at and playback context. |
| `saved-tracks` | Return tracks saved in the user's Spotify library. |
| `taste-profile` | Build a local taste profile from top tracks, top artists, recent plays, and saved tracks. |
| `add-track-to-playlist` | Add one or more track URIs to a specific playlist ID, URI, URL, or owned playlist name. |
| `add-track-to-current-playlist` | Add track URIs to the playlist that is currently the Spotify playback context. |
| `search-and-add-to-current-playlist` | Search for a track, choose a result by index, and add it to the currently playing playlist context. |
| `add-to-queue` | Add a track URI to the Spotify playback queue. Spotify Premium is usually required. |

More from uvwt/agentdock

SkillDescription
baidu-netdiskUse this skill when managing Baidu Netdisk files through the bdpan CLI inside the application data scope.
barkSend Bark-compatible notifications with Python standard library while keeping the device key in the private Skill data environment.
cloudsaverUse this skill when calling the local CloudSaver API for status checks, resource search, Douban hot lists, share parsing, or transfer actions.
code-debriefExplain and teach the core implementation produced by vibecoding from real code, focusing on the main call chain, core code, state and data flow, design reasoning, and transferable engineering knowledge. Use when the user asks to explain, review, learn, debrief, or understand recent code changes, a commit, PR, diff, feature, module, or code path.
codex-usageUse this skill when checking the current macOS user Codex CLI account state or Codex usage quota.
desktopmacOS desktop automation as an AgentDock Skill workflow.
douban-marks只读查询豆瓣电影、图书、音乐标记列表和电影条目联想。用于读取用户自己的已看、想看、在看等标记;公开主页可直接读,私密列表需要本机环境或 .env 中的 DOUBAN_COOKIE。禁止用于批量采集、绕登录、写入标记或读取非授权账号。
douyin-hot获取抖音实时热榜并返回标题、热度和跳转链接。
find-skills-skillSearch and discover OpenClaw skills from various sources. Use when: user wants to find available skills, search for specific functionality, or discover new skills to install.
grok-quotaQuery detailed Grok weekly usage, GrokChat/GrokBuild breakdown, plan, monthly credits, and pay-as-you-go state from local xAI OAuth credentials.