{
  "schemaVersion": "1.0",
  "item": {
    "slug": "spotify-controller",
    "name": "Spotify Controller",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/egemenyerdelen/spotify-controller",
    "canonicalUrl": "https://clawhub.ai/egemenyerdelen/spotify-controller",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/spotify-controller",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=spotify-controller",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "scripts/spotify.py",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "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. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "spotify-controller",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-10T03:05:41.624Z",
      "expiresAt": "2026-05-17T03:05:41.624Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=spotify-controller",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=spotify-controller",
        "contentDisposition": "attachment; filename=\"spotify-controller-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "spotify-controller"
      },
      "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/spotify-controller"
    },
    "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/spotify-controller",
    "agentPageUrl": "https://openagent3.xyz/skills/spotify-controller/agent",
    "manifestUrl": "https://openagent3.xyz/skills/spotify-controller/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/spotify-controller/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "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. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Spotify Controller Skill",
        "body": "Control Spotify playback from your AI agent using the official Spotify Web API.\n\nThis works across setups (local machine, Docker, VPS, and hybrid environments). It is especially useful for fixing Spotify control pain in headless VPS deployments. The server does not need a browser or a local Spotify client."
      },
      {
        "title": "What this skill provides",
        "body": "A CLI workflow around spotify.py\nPlayback control (play, pause, next, prev)\nTrack lookup (search) and quick play (playsearch)\nDirect URI playback (playtrack spotify:track:...)\nDevice management (devices, setdevice)\nVolume control (volume 0-100, where supported)"
      },
      {
        "title": "Requirements",
        "body": "Python 3 available in runtime/container\nrequests package installed\nSpotify Premium account\nSpotify Developer app credentials\nEnvironment variables:\n\nSPOTIFY_CLIENT_ID\nSPOTIFY_CLIENT_SECRET\nSPOTIFY_REFRESH_TOKEN\n\nInstall dependency:\n\nuv pip install requests --system\n\n(Alternative: pip install requests)\n\nIf you build OpenClaw in Docker, add this to your Dockerfile when requests is not already present:\n\nRUN uv pip install requests --system"
      },
      {
        "title": "1) Create a Spotify Developer App",
        "body": "Go to: https://developer.spotify.com/dashboard\nClick Create App\nEnter any app name/description\nAdd Redirect URI:\n\nhttp://127.0.0.1:8888/callback\n\n\nEnable Web API access\nSave and copy:\n\nClient ID\nClient Secret"
      },
      {
        "title": "2) Get a refresh token (one-time, on local machine)",
        "body": "Open this URL in your browser (replace YOUR_CLIENT_ID):\n\nhttps://accounts.spotify.com/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=http://127.0.0.1:8888/callback&scope=user-modify-playback-state%20user-read-playback-state%20user-read-currently-playing\n\nApprove access, then copy the code value from the redirected URL.\n\nExchange code for tokens:\n\ncurl -s -X POST \"https://accounts.spotify.com/api/token\" \\\n  -H \"Content-Type: application/x-www-form-urlencoded\" \\\n  -d \"grant_type=authorization_code&code=YOUR_CODE&redirect_uri=http://127.0.0.1:8888/callback&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET\"\n\nFrom response JSON, copy refresh_token.\n\nrefresh_token is typically long-lived, but can be invalidated if app access is revoked, app settings change, or credentials rotate."
      },
      {
        "title": "3) Add credentials to .env",
        "body": "SPOTIFY_CLIENT_ID=your_client_id\nSPOTIFY_CLIENT_SECRET=your_client_secret\nSPOTIFY_REFRESH_TOKEN=your_refresh_token"
      },
      {
        "title": "4) Pass env vars to Docker compose service",
        "body": "In docker-compose.yml service environment: section:\n\n- SPOTIFY_CLIENT_ID=${SPOTIFY_CLIENT_ID}\n- SPOTIFY_CLIENT_SECRET=${SPOTIFY_CLIENT_SECRET}\n- SPOTIFY_REFRESH_TOKEN=${SPOTIFY_REFRESH_TOKEN}"
      },
      {
        "title": "5) Restart service/container",
        "body": "docker compose down\ndocker compose up -d openclaw-gateway\n\nchown <runtime_user>:<runtime_group> /path/to/workspace/spotify.py\nchmod 664 /path/to/workspace/spotify.py"
      },
      {
        "title": "Usage",
        "body": "Run commands from workspace:\n\npython3 spotify.py <command>\n\nCommandDescriptionpython3 spotify.py statusShow current playback state and trackpython3 spotify.py playResume playbackpython3 spotify.py pausePause playbackpython3 spotify.py nextSkip to next trackpython3 spotify.py prevGo to previous trackpython3 spotify.py volume 80Set volume (0–100) where supportedpython3 spotify.py search trackSearch tracks (top results)python3 spotify.py playsearch \"track\"Search and play first resultpython3 spotify.py playtrack spotify:track:URIPlay specific track URIpython3 spotify.py devicesList available Spotify devicespython3 spotify.py setdevice \"BEDROOM-SPEAKER\"Set active device by name or id"
      },
      {
        "title": "VPS / Headless behavior notes",
        "body": "Headless server control works because playback is executed on Spotify Connect devices (phone/desktop/web), not the server audio output.\nYou still need at least one active Spotify device session.\n\nIf you see NO_ACTIVE_DEVICE:\n\nOpen Spotify on target device\nStart any track manually once\nRun python3 spotify.py devices\nRetry command"
      },
      {
        "title": "Known Spotify API limitations (expected)",
        "body": "Some devices/content contexts may return 403 Restriction violated for play, prev, or other controls.\nSome devices may reject remote volume changes (VOLUME_CONTROL_DISALLOW).\nDevice handoff can lag; immediate status after transfer may briefly show stale state.\n\nThese are Spotify-side constraints, not necessarily script bugs."
      },
      {
        "title": "Operational guidance for automations",
        "body": "Treat non-zero exit codes as command failures.\nValidate environment vars at startup.\nLog command + status code for troubleshooting.\nRetry once for transient network errors.\nDon’t hardcode real credentials in files."
      },
      {
        "title": "Security notes",
        "body": "Never commit .env with live secrets.\nRotate app credentials if leaked.\nUse least-access scopes required for your workflow.\nThe script only communicates with accounts.spotify.com and api.spotify.com"
      },
      {
        "title": "Quick troubleshooting checklist",
        "body": "python3 spotify.py devices shows your target device?\nDevice is active in Spotify app?\nEnv vars loaded inside container/runtime?\nPremium account confirmed?\nRefresh token still valid?\nAny Spotify 403 restriction reason in response?"
      },
      {
        "title": "Claim accuracy",
        "body": "Uses official Spotify Web API ✅\nWorks on headless VPS ✅\nPractical for personal usage ✅\nSubject to normal Spotify API behavior/limits ✅"
      }
    ],
    "body": "Spotify Controller Skill\n\nControl Spotify playback from your AI agent using the official Spotify Web API.\n\nThis works across setups (local machine, Docker, VPS, and hybrid environments). It is especially useful for fixing Spotify control pain in headless VPS deployments. The server does not need a browser or a local Spotify client.\n\nWhat this skill provides\nA CLI workflow around spotify.py\nPlayback control (play, pause, next, prev)\nTrack lookup (search) and quick play (playsearch)\nDirect URI playback (playtrack spotify:track:...)\nDevice management (devices, setdevice)\nVolume control (volume 0-100, where supported)\nRequirements\nPython 3 available in runtime/container\nrequests package installed\nSpotify Premium account\nSpotify Developer app credentials\nEnvironment variables:\nSPOTIFY_CLIENT_ID\nSPOTIFY_CLIENT_SECRET\nSPOTIFY_REFRESH_TOKEN\n\nInstall dependency:\n\nuv pip install requests --system\n\n\n(Alternative: pip install requests)\n\nIf you build OpenClaw in Docker, add this to your Dockerfile when requests is not already present:\n\nRUN uv pip install requests --system\n\nSetup (Step-by-step)\n1) Create a Spotify Developer App\nGo to: https://developer.spotify.com/dashboard\nClick Create App\nEnter any app name/description\nAdd Redirect URI:\nhttp://127.0.0.1:8888/callback\nEnable Web API access\nSave and copy:\nClient ID\nClient Secret\n2) Get a refresh token (one-time, on local machine)\n\nOpen this URL in your browser (replace YOUR_CLIENT_ID):\n\nhttps://accounts.spotify.com/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=http://127.0.0.1:8888/callback&scope=user-modify-playback-state%20user-read-playback-state%20user-read-currently-playing\n\n\nApprove access, then copy the code value from the redirected URL.\n\nExchange code for tokens:\n\ncurl -s -X POST \"https://accounts.spotify.com/api/token\" \\\n  -H \"Content-Type: application/x-www-form-urlencoded\" \\\n  -d \"grant_type=authorization_code&code=YOUR_CODE&redirect_uri=http://127.0.0.1:8888/callback&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET\"\n\n\nFrom response JSON, copy refresh_token.\n\nrefresh_token is typically long-lived, but can be invalidated if app access is revoked, app settings change, or credentials rotate.\n\n3) Add credentials to .env\nSPOTIFY_CLIENT_ID=your_client_id\nSPOTIFY_CLIENT_SECRET=your_client_secret\nSPOTIFY_REFRESH_TOKEN=your_refresh_token\n\n4) Pass env vars to Docker compose service\n\nIn docker-compose.yml service environment: section:\n\n- SPOTIFY_CLIENT_ID=${SPOTIFY_CLIENT_ID}\n- SPOTIFY_CLIENT_SECRET=${SPOTIFY_CLIENT_SECRET}\n- SPOTIFY_REFRESH_TOKEN=${SPOTIFY_REFRESH_TOKEN}\n\n5) Restart service/container\ndocker compose down\ndocker compose up -d openclaw-gateway\n\nchown <runtime_user>:<runtime_group> /path/to/workspace/spotify.py\nchmod 664 /path/to/workspace/spotify.py\n\nUsage\n\nRun commands from workspace:\n\npython3 spotify.py <command>\n\nCommand\tDescription\npython3 spotify.py status\tShow current playback state and track\npython3 spotify.py play\tResume playback\npython3 spotify.py pause\tPause playback\npython3 spotify.py next\tSkip to next track\npython3 spotify.py prev\tGo to previous track\npython3 spotify.py volume 80\tSet volume (0–100) where supported\npython3 spotify.py search track\tSearch tracks (top results)\npython3 spotify.py playsearch \"track\"\tSearch and play first result\npython3 spotify.py playtrack spotify:track:URI\tPlay specific track URI\npython3 spotify.py devices\tList available Spotify devices\npython3 spotify.py setdevice \"BEDROOM-SPEAKER\"\tSet active device by name or id\nVPS / Headless behavior notes\nHeadless server control works because playback is executed on Spotify Connect devices (phone/desktop/web), not the server audio output.\nYou still need at least one active Spotify device session.\n\nIf you see NO_ACTIVE_DEVICE:\n\nOpen Spotify on target device\nStart any track manually once\nRun python3 spotify.py devices\nRetry command\nKnown Spotify API limitations (expected)\nSome devices/content contexts may return 403 Restriction violated for play, prev, or other controls.\nSome devices may reject remote volume changes (VOLUME_CONTROL_DISALLOW).\nDevice handoff can lag; immediate status after transfer may briefly show stale state.\n\nThese are Spotify-side constraints, not necessarily script bugs.\n\nOperational guidance for automations\nTreat non-zero exit codes as command failures.\nValidate environment vars at startup.\nLog command + status code for troubleshooting.\nRetry once for transient network errors.\nDon’t hardcode real credentials in files.\nSecurity notes\nNever commit .env with live secrets.\nRotate app credentials if leaked.\nUse least-access scopes required for your workflow.\nThe script only communicates with accounts.spotify.com and api.spotify.com\nQuick troubleshooting checklist\npython3 spotify.py devices shows your target device?\nDevice is active in Spotify app?\nEnv vars loaded inside container/runtime?\nPremium account confirmed?\nRefresh token still valid?\nAny Spotify 403 restriction reason in response?\nClaim accuracy\nUses official Spotify Web API ✅\nWorks on headless VPS ✅\nPractical for personal usage ✅\nSubject to normal Spotify API behavior/limits ✅"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/egemenyerdelen/spotify-controller",
    "publisherUrl": "https://clawhub.ai/egemenyerdelen/spotify-controller",
    "owner": "egemenyerdelen",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/spotify-controller",
    "downloadUrl": "https://openagent3.xyz/downloads/spotify-controller",
    "agentUrl": "https://openagent3.xyz/skills/spotify-controller/agent",
    "manifestUrl": "https://openagent3.xyz/skills/spotify-controller/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/spotify-controller/agent.md"
  }
}