← 返回 Skills 市场
51
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install laosi-spotify
功能描述
Spotify控制技能 - 终端控制Spotify播放、搜索、管理播放列表。
使用说明 (SKILL.md)
Spotify Controller - Spotify控制
激活词: Spotify / 播放音乐 / 控制音乐
安装
# Windows: 使用PowerShell或第三方CLI
# 推荐: spicetify-cli
winget install spicetify-cli
功能
- 播放/暂停/切换
- 搜索歌曲/专辑/艺术家
- 管理播放列表
- 显示当前播放
- 音量控制
Python实现
import subprocess
import json
class SpotifyController:
def __init__(self):
self.cmd_prefix = "spicetify"
def play(self):
subprocess.run([self.cmd_prefix, "play"], capture_output=True)
def pause(self):
subprocess.run([self.cmd_prefix, "pause"], capture_output=True)
def next_track(self):
subprocess.run([self.cmd_prefix, "next"], capture_output=True)
def prev_track(self):
subprocess.run([self.cmd_prefix, "previous"], capture_output=True)
def search(self, query: str) -> list:
result = subprocess.run(
[self.cmd_prefix, "search", query, "--json"],
capture_output=True, text=True
)
if result.stdout:
return json.loads(result.stdout)
return []
def now_playing(self) -> dict:
result = subprocess.run(
[self.cmd_prefix, "status", "--format", "json"],
capture_output=True, text=True
)
if result.stdout:
return json.loads(result.stdout)
return {}
def set_volume(self, level: int):
subprocess.run([self.cmd_prefix, "volume", str(level)], capture_output=True)
命令行操���
# 播放控制
spicetify play
spicetify pause
spicetify next
spicetify previous
# 搜索
spicetify search "周杰伦"
# 显示状态
spicetify status
# 音量
spicetify volume 80
播放列表操作
def create_playlist(name: str, tracks: list):
subprocess.run([self.cmd_prefix, "playlist", "create", name])
for track in tracks:
subprocess.run([self.cmd_prefix, "playlist", "add", track])
def play_playlist(playlist_id: str):
subprocess.run([self.cmd_prefix, "playlist", "play", playlist_id])
输出格式
## 当前播放
### 歌曲信息
- 标题: 晴天
- 艺术家: 周杰伦
- 专辑: 叶惠美
- 时长: 4:29
- 进度: 1:23 / 4:29
### 状态
- 状态: 播放中
- 音量: 75%
- 随机: 关闭
- 循环: 关闭
### 播放列表
- 列表: 我的收藏
- 歌曲数: 128首
使用场景
- 播放背景音乐
- 语音控制音乐
- 定时播放白噪音
- 自动化DJ
安全使用建议
This skill appears to be a local Spotify CLI controller but the metadata and instructions disagree about which CLI to use. Before installing: (1) confirm whether the skill is intended to use spicetify (as the SKILL.md shows) or spotifyd/spotify-cli (as the metadata claims) — ask the author or fix the metadata. (2) Understand it will run local commands (spicetify ...); ensure you have the expected CLI installed and configured with your Spotify account and that you trust the CLI binaries. (3) Because it executes host commands, avoid running it in environments with sensitive data unless you audit the CLI behavior. (4) If you plan to proceed, request the maintainer update the required-bins field to match the documented spicetify usage (or change the code to use the declared binaries) so the package metadata accurately reflects its behavior.
功能分析
Type: OpenClaw Skill
Name: laosi-spotify
Version: 1.0.0
The skill is a straightforward wrapper for the legitimate 'spicetify-cli' tool, providing functionality to control Spotify playback, search for music, and manage playlists. The Python implementation in SKILL.md uses safe subprocess calls with argument lists to mitigate shell injection risks and contains no indicators of data exfiltration, persistence, or malicious intent.
能力评估
Purpose & Capability
The skill claims to control Spotify from the terminal (play/pause/search/playlist). That purpose is coherent with using a Spotify CLI. However the registry metadata lists required binaries spotifyd and spotify-cli, while the SKILL.md and example code consistently invoke spicetify / spicetify-cli. This mismatch means the declared requirements do not match the instructions and could cause installation/runtime surprises or indicate sloppy/incorrect metadata.
Instruction Scope
SKILL.md contains Python examples that run local CLI commands (spicetify ... ) via subprocess.run and shows typical playback/playlist commands. The instructions do not request extra environment variables or access to unrelated files. Running local CLIs is expected for this function, but the agent will execute host commands — verify the intended CLI (spicetify) is the one installed and that the examples aren't modified to run arbitrary commands. The use of subprocess.run with argument lists reduces classic shell-injection risk, but the skill gives the agent authority to invoke local binaries.
Install Mechanism
There is no install specification in the registry (instruction-only skill). The SKILL.md recommends installing spicetify-cli via winget on Windows, but the registry metadata's required binaries do not mention spicetify. This inconsistency between install guidance and declared metadata is a risk for confusion; otherwise no high-risk download/install mechanism is present in the package itself.
Credentials
The skill requests no environment variables or credentials, which is proportionate for a skill that invokes a locally-installed Spotify CLI that uses the user's local authentication. Note: spicetify/spotifyd may rely on local config or stored tokens on the host — the skill does not declare or request those, it assumes they exist locally.
Persistence & Privilege
always is false and the skill is user-invocable; it does not request persistent or elevated platform privileges in its metadata. There is no evidence it modifies other skill configs or requests broad platform presence.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install laosi-spotify - 安装完成后,直接呼叫该 Skill 的名称或使用
/laosi-spotify触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
终端控制Spotify播放
元数据
常见问题
Spotify控制 是什么?
Spotify控制技能 - 终端控制Spotify播放、搜索、管理播放列表。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 51 次。
如何安装 Spotify控制?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install laosi-spotify」即可一键安装,无需额外配置。
Spotify控制 是免费的吗?
是的,Spotify控制 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Spotify控制 支持哪些平台?
Spotify控制 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Spotify控制?
由 534422530(@534422530)开发并维护,当前版本 v1.0.0。
推荐 Skills