cwb

A command for controlling the coding-with-beat music player through its command-line program. It accepts requests such as play, pause, search, skip, library, and status.

In plain words
What is it for?
Use it to start or resume music, pause it, skip tracks, search the library, view what is playing, change the music source, or manage playback modes.
Why use it?
It turns natural-language music requests into one player action, so you do not need to remember the program's command syntax.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/jaychempan/coding-with-beat/cwb
Clone the repo
git clone --depth 1 https://github.com/jaychempan/coding-with-beat
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,738 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00037 $0.02738
Opus 5 $0.00018 $0.01369
Sonnet 5 $0.00007 $0.00548
Haiku 4.5 $0.00004 $0.00274

Measured 2d ago against content hash 2b0de0dba47c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cwb scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/cwb.md · 191 lines

How it starts

The opening of the file, as written. The whole thing — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.

If the coding-with-beat UserPromptExpansion hook is installed, this command is handled by a private one-shot headless Claude session. The child session interprets the intent, runs a validated coding-with-beat action, returns a short result, and blocks this fallback prompt so the main conversation context stays clean.

You are driving the local coding-with-beat music player via its globally-installed CLI. Do NOT call any MCP tools — they may not be loaded. Always shell out via Bash to the cwb command (installed by install.sh at ~/.local/bin/coding-with-beat, backed by a venv at ~/.coding-with-beat/venv).

User intent: $ARGUMENTS

How to interpret

Parse the intent and pick exactly ONE action. If empty or ambiguous, default to status.

Intent keywords Command
play/start + <query> cwb play <query>
play/resume with no query cwb play
resume/继续/恢复 (after interruption) cwb resume
search/find/搜索/找 + <query> cwb search <query>
list/library/资料库/列表 cwb list
pause/stop cwb pause
next/skip cwb next
previous/back cwb prev
source/music source + `<apple_music qq_music
like/favorite current cwb like
shuffle/sequential/repeat `cwb mode <shuffle
now playing/what's playing cwb np
show player/player cwb player
status cwb status
lyrics/karaoke cwb karaoke
anything else (mood, scene, vibe, free-form description) multi-angle smart search (see below)

Routing rule: if the argument does NOT start with one of the fixed verbs above (play, search, list, pause, next, prev, source, like, mode, np, player, status, karaoke, resume), treat the entire argument as a mood/scene description and run multi-angle smart search.

For search or play-by-query, the <query> is the rest of the text after the verb (artist name, song name, mood — pass it through verbatim, including Chinese). Quote it.

Read the full file on GitHub · 191 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 191 lines · 37 tokens per session scan A 2b0de0dba47c

Subscribe to this mod's changes

cwb is a command published in the GitHub repository jaychempan/coding-with-beat (114 stars, last pushed 2mo ago), licensed MIT. It adds 37 tokens to every session and 2,738 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.