Logo Music Player

Music Player

Cộng đồng
tsirysndr
music-player

Play, queue and search music on the user's music-player daemon, and DJ for them — building a set that fits a mood, an activity or a request. Use whenever the user asks to play or queue something, asks what is playing, wants the volume or transport changed, or asks for a set, a mix or a playlist to be put on.

Tổng quan

Nhà phát hànhtsirysndr
Kho mãmusic-player
Tên kỹ năngmusic-player
Sao
524
Bản fork
34
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được tsirysndr công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Music Player trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/tsirysndr/music-player/tree/master/skills/music-player
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tsirysndr/music-player.git /tmp/music-player
mkdir -p .claude/skills
cp -r /tmp/music-player/skills/music-player .claude/skills/music-player
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Music Player trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Music Player ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Music Player với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Playing music

You are driving a real audio player on the user's machine. Everything you do is heard immediately, by whoever is in the room. That is the whole reason this is worth being careful about: a wrong play_tracks does not produce a wrong answer, it cuts off the song someone was enjoying.

Before anything else

Check that the tools are there. If now_playing and the rest are not available, the MCP server is not connected — see Setting it up and tell the user what to run. Do not fall back to guessing.

If the tools are there but every call reports no daemon at host:port, the CLI is installed but nothing is running. Tell the user to start it:

bash
music-player          # foreground; add & to keep the shell

How to work

Find, then play. Ids are the currency. search takes free text and hands back track, album and artist ids; browse_library pages through everything when there is nothing specific to look for. Both feed play_tracks and queue_tracks.

Queue rather than replace. queue_tracks adds without touching what is playing. play_tracks wipes the queue and starts over — right when the user says "play X", wrong when they say "add some more like this". When in doubt, queue: an unwanted queue entry is skipped, an unwanted interruption is not recoverable.

Look before you change. Call now_playing first when the request depends on context — "something like this", "more of the same", "after this one". It also tells you whether anything is playing at all, which changes whether you should queue or start.

Say what you did. "Queued 8 tracks" is not an answer. Name a few of them — the user cannot see your tool calls, and the point of asking an agent rather than clicking is that you can say why those tracks.

Knowing what a track sounds like

search and browse_library only know titles. track_analysis knows how a track actually sounds — its tempo, its energy (0 calm to 1 driving), its brightness (-1 dark to 1 bright), and how loud it is. similar_tracks uses all of that to answer "what goes after this?" without needing genres or anyone else's listening history.

None of it works until tracks have been analysed, because analysis means decoding the audio. analyze_library starts a background pass and returns immediately; call it with no arguments to see how far it has got. Run it once for a library, and check it before promising a mood-based set:

  • analyze_library with no arguments → {"analyzed": 0, "running": false} means nothing is analysed and similar_tracks will fail. Say so, and offer to start a pass rather than silently falling back to searching by name.
  • A pass takes roughly a second per local track and longer for a remote server, since each one has to be fetched. Start it, tell the user it is running, and get on with building a set from what is already there.

Handing over to auto-DJ

auto_dj turns the daemon's own DJ on: it keeps the queue five tracks deep, each one chosen to follow the last by tempo and mood, never repeating and never playing the same artist twice in a row. It never interrupts what is playing.

Steer it rather than micromanaging it. energy, brightness and bpm are a direction, not a filter — the set leans that way over the next few tracks instead of jumping:

  • "wind things down" → auto_dj with enabled: true, energy: 0.25
  • "keep it going but pick it up" → energy: 0.8
  • "something more upbeat and brighter" → energy: 0.75, brightness: 0.6
  • "just keep playing" → enabled: true with no target at all
  • "stop choosing for me" → enabled: false

Prefer auto-DJ over queueing thirty tracks yourself when the user wants music to keep going indefinitely: it reacts to skips and to a changed target, which a queue you built half an hour ago cannot.

DJing

When asked for a set — "put on something for cooking", "build me an hour of focus music", "DJ for the party" — the work is selection, not tool calls.

  • Search around the request, not just inside it. A request for "something upbeat" is not a search query. Look for the artists, genres and albums that would satisfy it, several searches if needed, then choose from what the library actually holds.
  • Sequence deliberately. Order is the DJ's contribution: open in the mood asked for, build, and do not put the two most similar tracks back to back. play_tracks and queue_tracks both play in the order given.
  • Keep it to a set, not a dump. Ten to twenty well-chosen tracks beats a hundred filtered ones. If the user wants it endless, queue a set and offer to extend it when it runs low.
  • Work from their library. You can only play what is there. If the request cannot be met — no jazz in the library at all — say so plainly and offer the nearest thing, rather than queueing something that merely matched a word.
  • Use the analysis when the request is about feel. "Something calm", "more energy", "something for running" are questions about tempo and energy, not about titles. Find one track that fits, then similar_tracks from it — that is a far better set than guessing from names.

The tools

ToolFor
now_playingCurrent track, position, volume, how much is queued
playback_controlplay, pause, next, previous, stop
seekJump to a position in the current track
set_volume0–100
searchTracks, albums and artists matching free text
browse_libraryPage through albums, artists or tracks
get_albumAn album with its tracks, in order
get_artistAn artist with their albums and tracks
list_playlists / get_playlistThe user's saved playlists
play_tracksReplace the queue and start — interrupts
queue_tracksAdd to the queue, next or end — does not interrupt
view_queueWhat has played, what is coming
clear_queueEmpty it and stop
set_playback_modeShuffle on/off, repeat off/queue/track
list_servers / connect_serverSwitch which library is being read
track_analysisTempo, energy, brightness, loudness of one track
similar_tracksWhat sounds good after a given track
analyze_libraryAnalyse tracks in the background, and check progress
auto_djHand the queue over to the daemon, and steer it

connect_server changes where music is browsed from, not where it comes out; it never interrupts playback. Only use it if the user asks for a different server — their library is otherwise whatever is already connected.

Things to get right

  • Never clear or replace the queue without being asked. "Play some jazz" while something is on is ambiguous: prefer queueing and say that you queued rather than replaced, so the user can ask for the other thing.
  • Volume is heard by people, not read by them. Do not raise it beyond what was asked, and do not set it at all unless asked.
  • playback_control with play resumes what is loaded. It starts nothing on an empty queue — use play_tracks for that.
  • A tool that returns isError has failed and changed nothing. Read the message and tell the user; do not retry the same call.

Setting it up

Only needed once, and only if the tools are missing.

1. Install the CLI

macOS or Linux, prebuilt binary:

bash
curl -fsSL https://raw.githubusercontent.com/tsirysndr/music-player/master/install.sh | sh

Homebrew (macOS/Linux):

bash
brew install tsirysndr/tap/musicplayer

npm:

bash
npm install -g @tsiry/music-player

Debian, Ubuntu and other APT systems:

bash
echo "deb [trusted=yes] https://apt.fury.io/tsiry/ /" \
  | sudo tee /etc/apt/sources.list.d/music-player.list
sudo apt-get update && sudo apt-get install music-player

Fedora, RHEL, Rocky, AlmaLinux and other DNF systems:

bash
sudo tee /etc/yum.repos.d/music-player.repo <<'EOF'
[music-player]
name=Music Player
baseurl=https://yum.fury.io/tsiry/
enabled=1
gpgcheck=0
EOF
sudo dnf install music-player

Check it worked with music-player --version.

2. Point it at some music

The daemon reads ~/Music by default; set music_directory in ~/.config/music-player/settings.toml for anywhere else. Then:

bash
music-player scan     # index the library
music-player          # start the daemon

A remote library — Navidrome, Subsonic, Jellyfin, Plex, Kodi — is added in the desktop or web UI under Servers, and needs no scan.

3. Register the MCP server

Claude Code:

bash
claude mcp add music-player -- music-player mcp

Codex (~/.codex/config.toml):

toml
[mcp_servers.music-player]
command = "music-player"
args = ["mcp"]

Claude Desktop, and other hosts that use the same file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

json
{
  "mcpServers": {
    "music-player": {
      "command": "music-player",
      "args": ["mcp"]
    }
  }
}

Restart the host afterwards. music-player mcp speaks JSON-RPC on stdin and stdout and is not meant to be run by hand — running it in a terminal looks like a hang, because it is waiting for a client.

Câu hỏi thường gặp

Kỹ năng AI Music Player làm được gì?

Play, queue and search music on the user's music-player daemon, and DJ for them — building a set that fits a mood, an activity or a request. Use whenever the user asks to play or queue something, asks what is playing, wants the volume or transport changed, or asks for a set, a mix or a playlist to be put on.

Vì sao nên dùng Music Player trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Music Player là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Music Player trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/tsirysndr/music-player/tree/master/skills/music-player. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Music Player?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Music Player với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Music Player với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Music Player có miễn phí không?

Có. Kỹ năng này được tsirysndr phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇