Chuyển đến nội dung
Skillpedia
Khác20k · #10459

Spotify

Skill này làm gì

Thao tác trên tài khoản Spotify của bạn, như tìm kiếm, xây playlist, lưu bài và điều khiển phát nhạc. Skill dành cho người nghe muốn quản lý nhạc bằng lệnh thay vì màn hình.

Khi nào nên dùng

  • ✓Khi bạn muốn tạo một playlist từ danh sách bài hát.
  • ✓Khi bạn muốn xem bài nào đang phát ngay lúc này.
  • ✓Khi bạn muốn thêm bài vào thư viện hoặc theo dõi một playlist.

Liên kết skill

https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Spotify/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/danielmiessler/LifeOS/blob/main/LifeOS/install/skills/Spotify/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một playlist Spotify các bài indie sôi động và thêm các bài yêu thích của tôi từ tuần trước.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill gọi trực tiếp giao diện web của Spotify qua một công cụ dòng lệnh. Access token tự làm mới, và mỗi yêu cầu thay đổi tài khoản đúng như bạn yêu cầu.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Spotify

Acts on the principal's real Spotify account through Tools/Spotify.ts — a deterministic CLI that calls the Spotify Web API directly. No MCP, no server process, no session registration: any session can invoke it via Bash immediately.

bun ~/.claude/skills/Spotify/Tools/Spotify.ts <command> [flags]   # --help for the full list

Ideal State

  • Every requested account change (follow, playlist build, library read, queue, playback) is one Tools/Spotify.ts call keyed by IDs or URIs, and the account state afterwards matches the request.
  • Auth is set up once and never repeated by hand: tokens refresh per invocation, and a dead token or redirect mismatch is traced to its real fix (re-run auth, or fix the dashboard URI).
  • Playback is attempted only on a Premium account with an active device, so a Free account still gets search, playlists and library.

Intent Routing

Intent Trigger File
Authorize "set up spotify", "authorize spotify", "connect spotify", auth broken Intents/Authorize.md
Manage play / search / playlists / queue / library ops Intents/Manage.md
File Read when
Setup.md first-time install: the developer app, the three .env keys, the proof command
Tools/ Spotify.help.md is the full flag reference (same as --help); EnvText.ts is the pure env-file helper Spotify.ts writes tokens with

Data & Config

This skill reads no files under LIFEOS/USER/. Credentials are env-only: SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET and SPOTIFY_REFRESH_TOKEN in ~/.claude/.env (names only here, never values). First-time setup, the Spotify developer app and the proof command are in Setup.md. Tokens auto-refresh per invocation; a missing refresh token means run Intents/Authorize.md. With the credentials missing, the tool exits 1 and points at Setup.md.

Gotchas

  • search works before user auth (client-credentials fallback); every other command needs the refresh token.
  • 401 on every call → the refresh token died (password change, revoked access); re-run auth (Intents/Authorize.md). The tool persists rotated refresh tokens automatically.
  • /me/playlists returns tracks: null on playlist rows (observed) — never assume tracks.total exists; the CLI omits the count when absent.

Examples

  • "Add this playlist link to my Spotify" → Manage → the playlist is followed with follow-playlist --id <ID> (ID from the URL) and shows in playlists.
  • "Make me a focus-music playlist and fill it" → Manage → a new playlist from create-playlist, holding the tracks search resolved, added with add-tracks.
  • "What's playing?" → Manage → the now-playing result.
  • "Skip this / turn it down" → Manage → next / volume --percent 30 on the active Premium device.
Câu hỏi thường gặp

Có cần tài khoản Spotify trả phí không?

Các điều khiển phát nhạc cần tài khoản Premium và một thiết bị đang hoạt động. Tìm kiếm, playlist và thư viện hoạt động trên tài khoản miễn phí.

Tôi có cần thiết lập trước không?

Có. Cần thiết lập một lần với một ứng dụng nhà phát triển Spotify và ba khóa.

Nếu kết nối ngừng hoạt động thì sao?

Chạy lại bước ủy quyền thường sửa được, hoặc địa chỉ chuyển hướng cần được sửa trong bảng điều khiển nhà phát triển.

Chi tiết

Mô tả gốc của tác giả

Acts on the principal's Spotify account via a deterministic CLI (Tools/Spotify.ts): search, playlists, now-playing, library, and playback across devices. USE WHEN spotify, play on spotify, add to my spotify, follow this playlist, save playlist, create a spotify playlist, add tracks, what's playing, my playlists, queue this, skip track, set volume, spotify search, control spotify, my spotify library. NOT FOR music taste or recommendations, generating songs, editing audio (AudioEditor).

repo: danielmiessler/LifeOS

Độ phổ biến

Sao GitHub
20k
Vị trí xếp hạng
#10459
Giấy phép
MIT
Cập nhật
28/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự