# Send ClawSpotify to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "clawspotify",
    "name": "ClawSpotify",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ejatapibeda/clawspotify",
    "canonicalUrl": "https://clawhub.ai/ejatapibeda/clawspotify",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/clawspotify",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawspotify",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      ".gitattributes",
      "clawspotify.sh",
      "README.md",
      "SKILL.md",
      "scripts/spotify.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "clawspotify",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-01T16:00:45.308Z",
      "expiresAt": "2026-05-08T16:00:45.308Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawspotify",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawspotify",
        "contentDisposition": "attachment; filename=\"clawspotify-1.0.3.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "clawspotify"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/clawspotify"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/clawspotify",
    "downloadUrl": "https://openagent3.xyz/downloads/clawspotify",
    "agentUrl": "https://openagent3.xyz/skills/clawspotify/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawspotify/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawspotify/agent.md"
  }
}
```
## Documentation

### ClawSpotify 🎵

Control your Spotify playback directly from your OpenClaw agent or terminal. Works with both Free and Premium Spotify accounts.

### Via ClawHub (recommended)

clawhub install clawspotify

### Manual from GitHub

# Clone main skill
git clone https://github.com/ejatapibeda/ClawSpotify.git ~/.openclaw/workspace/skills/ClawSpotify

# Create virtual environment
python3 -m venv ~/.venv-clawspotify

# Install SpotAPI (modified version with session support)
git clone https://github.com/ejatapibeda/SpotAPI.git ~/.openclaw/workspace/skills/SpotAPI
~/.venv-clawspotify/bin/pip install -e ~/.openclaw/workspace/skills/SpotAPI

# Create wrapper script
cat > ~/.local/bin/clawspotify << 'EOF'
#!/bin/bash
VENV="/home/$(whoami)/.venv-clawspotify"
SCRIPT_DIR="/home/$(whoami)/.openclaw/workspace/skills/ClawSpotify"
exec "$VENV/bin/python" "$SCRIPT_DIR/scripts/spotify.py" "$@"
EOF
chmod +x ~/.local/bin/clawspotify

# Ensure ~/.local/bin is in PATH
export PATH="$HOME/.local/bin:$PATH"

### Dependencies

Python 3.10+
SpotAPI (custom version from ejatapibeda/SpotAPI)
Active Spotify account (Free or Premium)
Spotify app open on at least one device (PC/phone/web) for playback commands to work

### 🔐 First-Time Setup (Authentication)

clawspotify authenticates using two session cookies from your browser (sp_dc and sp_key). You only need to do this once per account.

### Step-by-step

Open https://open.spotify.com in your browser and log in
Press F12 to open DevTools
Go to Application tab → Cookies → https://open.spotify.com
Find and copy the value of sp_dc
Find and copy the value of sp_key
Run:

clawspotify setup --sp-dc "AQC..." --sp-key "07c9..."

Session is saved to ~/.config/spotapi/session.json and reused automatically.

Multi-account support

clawspotify setup --sp-dc "..." --sp-key "..." --id "work"
clawspotify status --id "work"

Note: Cookies expire periodically. If commands fail with a 401 error, re-run setup with fresh cookies.

### Now playing status

clawspotify status            # default account
clawspotify status --id work  # specific account

### Search music (without playing)

clawspotify search "Bohemian Rhapsody"        # search tracks, show top 5
clawspotify search-playlist "Workout"         # search playlists, show top 5

### Search and play

clawspotify play "Bohemian Rhapsody"          # play first result
clawspotify play "Bohemian Rhapsody" --index 2  # pick result #2 (0-indexed)
clawspotify play-playlist "Lofi Girl"         # play first playlist result

### Playback controls

clawspotify pause
clawspotify resume
clawspotify skip                     # next track
clawspotify prev                     # previous track
clawspotify restart                  # restart from beginning

### Queue

clawspotify queue "Stairway to Heaven"
clawspotify queue "spotify:track:3z8h0TU..."  # add by URI

### Volume

clawspotify volume 50     # set to 50%
clawspotify volume 0      # mute
clawspotify volume 100    # max

### Shuffle / Repeat

clawspotify shuffle on
clawspotify shuffle off
clawspotify repeat on
clawspotify repeat off

### 💡 Usage Tips

Spotify must be open on at least one device for playback commands to work. The skill transfers playback to a phantom device but needs an active session.
First run may be slow (10-30 seconds) due to WebSocket handshake and device registration. Subsequent commands are faster.
Session identifier: Default is "default". Use --id flag to manage multiple Spotify accounts.
Search is fuzzy: Use artist name + title for best results.
Output: Commands print status messages (e.g., Searching for "...", Playing: URI).

### "No active Spotify device found"

Open Spotify on any device (PC, phone, or web) and start playing something first.
Ensure you're logged in with the same account as the cookies.

### "spotapi is not installed" or import errors

Verify virtual environment: ls ~/.venv-clawspotify/bin/python
Reinstall SpotAPI: ~/.venv-clawspotify/bin/pip install -e ~/.openclaw/workspace/skills/SpotAPI

### 401 Unauthorized / Session expired

Cookies (sp_dc, sp_key) expire. Re-run clawspotify setup with fresh cookies from browser.

### Commands time out or hang

The skill uses WebSockets for real-time state. If Spotify's API is slow, commands may take longer. Use longer timeout or background execution.
Restart OpenClaw gateway to reload skill if it becomes unresponsive.

### Wrapper not found (command not found: clawspotify)

Ensure ~/.local/bin is in your PATH: echo $PATH
Or run directly: ~/.venv-clawspotify/bin/python ~/.openclaw/workspace/skills/ClawSpotify/scripts/spotify.py <command>

### 📂 File Locations

ComponentPathSkill folder~/.openclaw/workspace/skills/ClawSpotifyWrapper script~/.local/bin/clawspotifyVirtualenv~/.venv-clawspotifySpotAPI (editable)~/.openclaw/workspace/skills/SpotAPISession credentials~/.config/spotapi/session.jsonMain script~/skills/ClawSpotify/scripts/spotify.py

### 🔧 Agent Implementation Notes

When using this skill via OpenClaw agent:

Playback commands (play, pause, skip, etc.) are asynchronous. The command returns once Spotify accepts the request. Actual playback may take a few seconds to start.
Long-running operations: Use background execution or extended timeout (15-30 seconds) for play, search, and status to avoid premature termination.
Status query may occasionally timeout due to WebSocket latency. Play commands are more reliable.
Always check Spotify app/device for actual playback state. The CLI reports what Spotify acknowledges.
If the skill becomes unresponsive, restart the OpenClaw gateway to clear WebSocket connections.

### 🌐 Platform Note

Linux/macOS: Works natively with bash.
Windows: Requires WSL, Git Bash, or Cygwin to run the clawspotify bash script. Alternatively, run Python directly:
python ~/.openclaw/workspace/skills/ClawSpotify/scripts/spotify.py play "song name"

Version: 1.0.1 (skill) | SpotAPI: 1.2.7 (custom)
Homepage: https://github.com/ejatapibeda/ClawSpotify
Author: Deli (OpenClaw agent) + ejatapibeda (original author)
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: ejatapibeda
- Version: 1.0.3
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-01T16:00:45.308Z
- Expires at: 2026-05-08T16:00:45.308Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/clawspotify)
- [Send to Agent page](https://openagent3.xyz/skills/clawspotify/agent)
- [JSON manifest](https://openagent3.xyz/skills/clawspotify/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/clawspotify/agent.md)
- [Download page](https://openagent3.xyz/downloads/clawspotify)