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.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
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.tscall 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
searchworks 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/playlistsreturnstracks: nullon playlist rows (observed) — never assumetracks.totalexists; 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 inplaylists. - "Make me a focus-music playlist and fill it" → Manage → a new playlist from
create-playlist, holding the trackssearchresolved, added withadd-tracks. - "What's playing?" → Manage → the
now-playingresult. - "Skip this / turn it down" → Manage →
next/volume --percent 30on 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
Bình luận
- …
Thêm skill từ kho mã này
LifeOS
20kGiúp agent của bạn thiết lập LifeOS, một hệ thống cá nhân ánh xạ trạng thái hiện tại tới trạng thái lý tưởng qua một cuộc phỏng vấn và một bảng điều khiển.
AnnualReports
20kGiúp agent của bạn tìm và so sánh báo cáo an ninh mạng thường niên từ các nhà cung cấp lớn, như xu hướng vi phạm và ransomware, có nguồn cho mọi số liệu.
ApertureOscillation
20kDạy agent của bạn kiểm tra một câu hỏi thiết kế ở phạm vi hẹp và phạm vi rộng, rồi chỉ ra chỗ hai câu trả lời mâu thuẫn trước khi bạn xây dựng.
Aphorisms
20kCho phép agent của bạn tìm, ghép và theo dõi các câu trích dẫn có ghi tác giả từ một bộ sưu tập được chọn lọc, tránh những câu vừa được dùng trong bản tin.
Skill tương tự
blucli
394kGiúp agent của bạn tìm, phát, tạm dừng, nhóm và chỉnh âm lượng loa Bluesound và NAD qua lệnh blu.
camsnap
394kGiúp agent của bạn chụp ảnh, quay clip ngắn hoặc lấy sự kiện chuyển động từ camera mạng và webcam nội bộ mà bạn đã thiết lập.
eightctl
394kGiúp agent của bạn kiểm tra và điều khiển thiết bị Eight Sleep pod, gồm nhiệt độ, báo thức và lịch ngủ.