musicbox: Instructions file for Codex

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

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is darknessomi/musicbox's own configuration. It tells Codex and OpenCode how to work on musicbox itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything musicbox configures →

About the project

NetEase-MusicBox is a Python command-line client for searching, streaming, and managing music from NetEase Cloud Music. It is for terminal users who want music playback, playlists, recommendations, comments, lyrics, and playback controls, including on some older or low-powered devices. Its catalogue skill and instruction let coding agents operate MusicBox.

darknessomi/musicbox · 9,873 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to darknessomi/musicbox. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/darknessomi/musicbox/master/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/github.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/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 musicbox AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/darknessomi/musicbox/agents-md"><img src="https://agentmods.dev/badge/instructions/darknessomi/musicbox/agents-md.svg" alt="Reviewed on agentmods" width="80" 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. 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.00579 $0.00579
Opus 5.5 $0.00232 $0.00232
Sonnet 5.5 $0.00116 $0.00116
Haiku 4.5 $0.00058 $0.00058

Measured 2mo ago against content hash 18824f5be2ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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,873 stars, last pushed 5d ago), licensed MIT. It adds 579 tokens to every session, about $0.0023 per session on Opus 5.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.

Related

musicbox AGENTS.md compared with instructions from other repositories

musicbox AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
musicbox AGENTS.mddarknessomi/musicboxInstructions file9.9k5d agoMITB579Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode