musicbox AGENTS.md

musicbox AGENTS.md is an instructions file for Codex, OpenCode from darknessomi/musicbox. It costs 579 tokens per session, scanned B, original, MIT.

A project guide for NetEase-MusicBox, a Python command-line music player with an interactive text interface.

In plain words
What is it for?
Use it to search music, play or pause songs, inspect queues and status, control the background playback service, and handle authentication.
Why use it?
It explains how to run the player in interactive terminals or automated scripts, and clarifies which audio programs the system needs.

Instructions file for CodexOpenCode

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 instructions/darknessomi/musicbox/agents-md
Clone the repo
git clone --depth 1 https://github.com/darknessomi/musicbox

Made for: Codex, OpenCode.

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 musicbox AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/darknessomi/musicbox/agents-md.svg)](https://agentmods.dev/instructions/darknessomi/musicbox/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/darknessomi/musicbox/agents-md"><img src="https://agentmods.dev/badge/instructions/darknessomi/musicbox/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 579 This file is loaded in full into every session.
When invoked 579 The same file — it is already loaded in full.
Security scan B 1 finding. 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.00579 $0.00579
Opus 5 $0.00290 $0.00290
Sonnet 5 $0.00116 $0.00116
Haiku 4.5 $0.00058 $0.00058

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

Security

Grade B, and why

musicbox AGENTS.md scanned grade B with 1 finding 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 4d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

(`sudo apt-get install -y mpg123 mpv`). They are pre-installed in the snapshot; reinstall
AGENTS.md · 42 lines

How it starts

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

AGENTS.md

Cursor Cloud specific instructions

NetEase-MusicBox is a Python 3.10+ command-line/curses TUI music player, managed with uv. There is a single package (NEMbox) and one product (the musicbox CLI/TUI). Dependencies are refreshed automatically by the startup update script (uv sync --frozen); you do not need to reinstall them.

Running the app

  • Interactive TUI: uv run musicbox — this uses curses and requires a real interactive terminal (TTY). It will not render in a non-TTY/headless shell; use the CLI subcommands below for scripted/agent verification instead.
  • Agent/CLI mode (no TTY needed): uv run musicbox <command>, e.g. search, song url, play, pause, status, queue, daemon, auth. Add --json for machine-readable output. See README.md for the full command list.
  • Playback runs through a background daemon; musicbox play --id <id> auto-starts it and musicbox daemon stop stops it.

Audio backends (system deps, NOT in update script)

  • mpg123 (MP3) and mpv (FLAC / Hi-Res) are OS packages installed via apt-get (sudo apt-get install -y mpg123 mpv). They are pre-installed in the snapshot; reinstall only if musicbox play reports a missing backend. Playback selects mpg123 by default.

Network / API note

  • Song search and playable URLs come from NetEase's public API, which only accepts China-region access. From other regions requests can fail or return empty; set an HTTP proxy (see README "配置") if search stops returning results. In this environment the API was reachable and returned live results.
  • Login is QR-code scan only (renders a QR block in the terminal); there is no username/password login and no test-login secret is required for search/playback.

Lint / test / build

Standard commands (already documented in .cursor/rules/pre-commit-validation.mdc and .github/workflows/ci.yml); run them via uv run:

  • uv run ruff check
  • uv run ruff format --check
  • uv run ty check — emits ~11 diagnostics that are configured as warn in pyproject.toml; it exits 0 and is not a failure.
  • uv run pytest -q --tb=short
  • uv build

Read the full file on GitHub · 42 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. 4d ago First seen · 42 lines · 579 tokens per session scan B 18824f5be2ea

Subscribe to this mod's changes

musicbox AGENTS.md is an instructions file published in the GitHub repository darknessomi/musicbox (9,838 stars, last pushed 7d ago), licensed MIT. It adds 579 tokens to every session, about $0.0029 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.