cwb

cwb is a command for Claude Code from jaychempan/coding-with-beat. It costs 37 tokens per session (2,738 once invoked), scanned A, original, MIT.

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 for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit 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.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jaychempan/coding-with-beat/cwb
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.

Clone the repo
git clone --depth 1 https://github.com/jaychempan/coding-with-beat

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cwb

README.md
[![agentmods](https://agentmods.dev/badge/commands/jaychempan/coding-with-beat/cwb/github.svg)](https://agentmods.dev/commands/jaychempan/coding-with-beat/cwb)
Your own site
<a href="https://agentmods.dev/commands/jaychempan/coding-with-beat/cwb"><img src="https://agentmods.dev/badge/commands/jaychempan/coding-with-beat/cwb/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cwb

Your own site · 80×15
<a href="https://agentmods.dev/commands/jaychempan/coding-with-beat/cwb"><img src="https://agentmods.dev/badge/commands/jaychempan/coding-with-beat/cwb.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00037 $0.02738
Opus 5.5 $0.00015 $0.01095
Sonnet 5.5 $0.00007 $0.00548
Haiku 4.5 $0.00004 $0.00274

Measured 1mo ago against content hash 2b0de0dba47c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (113 stars, last pushed 3mo ago), licensed MIT. It adds 37 tokens to every session and 2,738 once invoked, about $0.0001 per session on Opus 5.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.