← Back to Skills Marketplace
534422530

Spotify控制

by 534422530 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
51
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install laosi-spotify
Description
Spotify控制技能 - 终端控制Spotify播放、搜索、管理播放列表。
README (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首

使用场景

  1. 播放背景音乐
  2. 语音控制音乐
  3. 定时播放白噪音
  4. 自动化DJ
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install laosi-spotify
  3. After installation, invoke the skill by name or use /laosi-spotify
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
终端控制Spotify播放
Metadata
Slug laosi-spotify
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Spotify控制?

Spotify控制技能 - 终端控制Spotify播放、搜索、管理播放列表。 It is an AI Agent Skill for Claude Code / OpenClaw, with 51 downloads so far.

How do I install Spotify控制?

Run "/install laosi-spotify" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Spotify控制 free?

Yes, Spotify控制 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Spotify控制 support?

Spotify控制 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Spotify控制?

It is built and maintained by 534422530 (@534422530); the current version is v1.0.0.

💬 Comments