Coding with Beat skill
A pixel DJ for Claude Code and Codex that plays Apple Music, shows lyrics and reacts to commits and tests
- 112 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Installation runs a script from the network, changes agent settings (hooks, status line) and adds a user LaunchAgent on macOS
- The local MCP server listens on port 8765 at 127.0.0.1, and with SSH forwarding music control is reachable through the tunnel
- The hooks watch session events: tool calls, commits and test results
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/coding-with-beatDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Installation runs a script from the network, changes agent settings (hooks, status line) and adds a user LaunchAgent on macOS
- The local MCP server listens on port 8765 at 127.0.0.1, and with SSH forwarding music control is reachable through the tunnel
- The hooks watch session events: tool calls, commits and test results
This is third-party code. Review the repository files before installing.
What it does
Coding with Beat consists of an MCP server with 38 tools, the `/cwb` skill and the `cwb` command-line utility: together they turn a Claude Code or Codex CLI session into one with music. You tell the agent "play some lofi", "next" or "what's playing", and the skill picks the action: mood search, a song by title or a number from a list. Music sources are Apple Music through AppleScript, local files through `afplay` and preview search on QQ Music. The terminal draws album art in half-block graphics, an equalizer and the lyrics, and a DJ character lives in the Claude Code status line. Its face changes with session events: a successful `git commit` triggers a victory pose, and failing tests trigger panic. There is a 25/5 Pomodoro timer, listening history and taste reports through `cwb profile`. The `cwb-companion` skill tells the agent to call `companion_check` itself at the right moments in a session.
Who it is for. People who code with an agent on a Mac and want to control Apple Music right from a Claude Code or Codex session without switching to a player.
Good fit when
- Music to match the mood is wanted while coding, and asking the agent is easier than hunting in a player
- A session lasts hours and you want a Pomodoro timer and the current track in the status line
- The agent runs on a remote server while Apple Music plays on your Mac: the port is forwarded over SSH
- You want a weekly or yearly report of what you listened to
Not a fit when
- The work runs on Windows or Linux: the player relies on Apple Music and AppleScript, and the installer targets macOS
- You listen on Spotify or another service: only Apple Music, local files and QQ Music are supported
- You are unwilling to run a script from the network with a `curl` and `sh` command
Example request
Put on something calm for deep work, show a numbered list of five songs and play the third oneLimitations
macOS is the main platform, and Python 3.10 or newer is needed. Full catalog playback requires an Apple Music subscription, QQ Music offers only a 30-second preview, and seeking is limited there and for local files. On the first playback of a catalog song Apple Music shows a window: press Add to Library and repeat the command. The author calls some features preview, for example `/cwb-profile`. The repository documentation is in Chinese, English and Japanese.
How to disable. Remove the `cwb` entries from the Claude Code settings (MCP server, hooks and status line) and the entry from `~/.codex/config.toml`. On macOS stop and delete the user LaunchAgent of the local MCP server. The data folder is called `~/.coding-with-beat`.
FAQ
How do I install Coding with Beat in Claude Code?
With `curl -LsSf https://raw.githubusercontent.com/jaychempan/coding-with-beat/main/bootstrap.sh | sh`, or by cloning the repository and running `./install.sh`. Then open a new terminal and a new session: when `(•_•)` shows in the status line, it works.
How do I install it in Codex CLI?
With `curl -LsSf https://raw.githubusercontent.com/jaychempan/coding-with-beat/main/bootstrap_codex.sh | sh` or `./install_codex.sh` from a cloned repository. The script installs Codex CLI if needed, configures `~/.codex/config.toml` and hooks, and installs the `cwb` skill.
Which music sources are supported?
Apple Music, local files and QQ Music. Their capabilities differ: playlists and native history exist for Apple Music, while local files keep a log-based history.
How do I control music when the agent runs on a server?
Run the HTTP MCP server on your Mac and forward the port with `ssh -N -R 127.0.0.1:8765:127.0.0.1:8765 user@server`. On the server install the hooks with the `--mcp-url http://127.0.0.1:8765/mcp` flag.
What does the `cwb profile` command do?
It analyzes listening history and searches and produces a report for a day, week, month or year: top artists and genres, taste shifts, time of day and a few ready `smart_search` queries. It needs no MCP server.
Discussion
No questions or reviews yet.
Related
SkillsClaude Code skill for pixel art: sprites, animations and effects built from a reference and checked frame by frame
MCP Music Studio: music in chat with an agent
mcp-music-studio
An MCP server where an agent writes ABC sheet music or a Strudel live beat and the player with an editor opens in chat
A video editing skill for Claude Code and Codex: the agent cuts pauses and filler words, grades color, burns subtitles and adds animated overlays
A Claude Code skill turns one question into an explainer film: facts, script, voiceover, code frames and a 1080p60 file
The eyes CLI and skill for agents: a video index, search by words and on-screen text, close-up frames and editing metrics
Twenty-eight skills for Claude Code: voiced video, covers, WeChat layout, Excel, PPT, Dify, GitHub Trending
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Coding with Beat (this card) | no | 112 | ||
| Spotify MCP Server | no | OAuth | 506 | controls Spotify through its API and has no pixel DJ or reactions to commits |
| ccstatusline | no | 13,590 | a status line with model, Git and context fill, with no music |
README in short
The introduction presents the project as a retro DJ for AI sessions and announces the new `cwb profile` report. Below come installation for Claude Code and Codex CLI, a table of mood phrases, the `cwb` commands, a feature table per music source and status line setup for tmux and Neovim.
README badge
Original SKILL.md
# cwb-companion — DJ Buddy Companion Mode
DJ Buddy is your coding companion. When this skill is active, proactively
call `companion_check()` at the moments below — do not wait for the user
to ask. The tool handles cooldown and conditions internally.
## Trigger rules
| Moment | Call |
|--------|------|
| Your first reply in a new session | `companion_check("session_start")` |
| You observe ≥ 3 consecutive test/command failures | `companion_check("debug_struggle")` |
| A `git commit` succeeds, or all tests pass green | `companion_check("victory")` |
| You've made ≥ 20 tool calls and haven't suggested music in 25+ minutes | `companion_check("idle_checkin")` |
| User says "收工", "下班", "bye", "晚安", "done for today", or similar | `companion_check("session_end")` |
## If the tool is unavailable
If `companion_check` is not in your tool list, **stay completely silent.**
Do NOT attempt a Bash fallback (`python -m coding_with_beat ...`).
Do NOT mention that the tool is missing. Just skip and continue normally.
## Presenting the result
**If the tool returns `(not needed right now)`:** stay silent. Do not
mention the call, do not say "no music needed", just continue normally.
**If the tool returns a companion card:** output it in full. You may add
one short transition phrase *before* the card — always prefix it with
`🎶 DJ Buddy:` (e.g. "🎶 DJ Buddy: 对了——" or "🎶 DJ Buddy: 顺便——").
Do NOT add explanation or commentary after the card.
After showing the card, wait for the user to pick a number from the list.
When they do, call `play_number(N)` to play it.
## Tone
DJ Buddy speaks in short, warm, no-nonsense sentences.
"调了挺久了" beats "I noticed you've been debugging for quite some time."
Match DJ Buddy's energy, not a customer service bot's.