decky-music: Instructions file for Codex

AGENTS.md

decky-music AGENTS.md is an instructions file for Codex, OpenCode from jinzhongjia/decky-music. It costs 4,218 tokens per session, scanned B, original, MIT.

Repository instructions for Decky Music, a Steam Deck music plugin with a React interface, Python bridge, and separate music-provider and audio-player processes.

In plain words
What is it for?
Use them when changing the Decky UI, bridge methods, music providers, audio playback, plugin APIs, tests, or build configuration.
Why use it?
They explain how the plugin’s parts communicate and where code belongs, reducing the risk of breaking its interfaces or packaging.

Instructions file for CodexOpenCode

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

This is jinzhongjia/decky-music's own configuration. It tells Codex and OpenCode how to work on decky-music 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 decky-music configures →

Reuse

Borrowing it

Nothing to install: this file belongs to jinzhongjia/decky-music. 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/jinzhongjia/decky-music/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/jinzhongjia/decky-music

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 decky-music AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jinzhongjia/decky-music/agents-md/github.svg)](https://agentmods.dev/instructions/jinzhongjia/decky-music/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/jinzhongjia/decky-music/agents-md"><img src="https://agentmods.dev/badge/instructions/jinzhongjia/decky-music/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 decky-music AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/jinzhongjia/decky-music/agents-md"><img src="https://agentmods.dev/badge/instructions/jinzhongjia/decky-music/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,218 This file is loaded in full into every session.
When invoked 4,218 The same file — it is already loaded in full.
Security scan B 2 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.04218 $0.04218
Opus 5.5 $0.01687 $0.01687
Sonnet 5.5 $0.00844 $0.00844
Haiku 4.5 $0.00422 $0.00422

Measured yesterday against content hash 341c4b930540, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

decky-music AGENTS.md scanned grade B with 2 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 yesterday.

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.

# DECK_HOST 必填、无默认值(见 issue #48);远端 sudo 要口令时另加 DECK_PASS=<口令>

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- `py_modules/` —— bridge 实现:`bridge.py` 生命周期门面、`ipc.py` 连接与事件代次、`music_settings.py` 归一化与私有持久化、`child_process.py`/`supervision.py` 进程监督、`provider_rpc.py`/`playback_rpc.py` RPC、`playback*.py` 播放/队列/电台、`diagnostics.py`/`lo
AGENTS.md · 212 lines

How it starts

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

AGENTS.md

Library

以下为使用的库:

架构速览

UI 只跟 bridge 说话;bridge 是唯一常驻的真相源;provider / player 是插件沙盒外的独立二进制。 provider 是一个常驻进程,同时承载 QQ 与网易云两个后端:请求顶层带 provider 字段路由, 切换音源只换 bridge 的音源令牌(Selection),不再换进程。 bridge 包含播放与队列的控制决策(Playback):普通队列/电台、自动切歌、失败重试和状态回灌。 音源 API 与可播 URL 解析归 provider,拉流/解码/出声归 player;不能把队列决策移回 UI 或子进程。

UI (React)  ──Decky RPC(callable/emit)──  bridge (main.py)
                                              │  UDS + NDJSON,bridge 作 server
                            ┌─────────────────┴─────────────────┐
                      provider 进程                          player 进程
               Rust:qq + ncm 两个后端同进程                   Rust
                 出元数据·歌词·可播 URL                    拉流·解码·出声

目录:

  • main.py —— 只剩对外接口 facade:CALLABLES 白名单 + __getattr__ 转发给 bridge (Decky loader 按名 getattr 分发,不必逐个写同名方法;tests/test_callables.py 机械校验白名单 ↔ Bridge 方法 ↔ src/api.ts 三端一致)
  • py_modules/ —— bridge 实现:bridge.py 生命周期门面、ipc.py 连接与事件代次、music_settings.py 归一化与私有持久化、child_process.py/supervision.py 进程监督、provider_rpc.py/playback_rpc.py RPC、playback*.py 播放/队列/电台、diagnostics.py/log.py 安全诊断。配置模块避免使用宿主占用的 settings 名称;所有模块放这里才被 Decky 加进 sys.path 且被 CLI 打包。
  • src/ —— React UI:index.tsx(definePlugin 入口)/ QAM.tsx(QAM 面板)/ Page.tsx(大屏页,导出 ROUTE)/ api.ts(前端↔bridge 唯一接口层)/ errors.ts+ErrorBanner.tsx+Boundary.tsx(错误纵深)/ Footer.tsx / i18n.ts
  • player/ —— Rust,reqwest + rodio
  • provider/ —— Rust,统一音源进程:src/main.rs 按请求音源路由,src/ncm/(ncm-api-rs)、 src/qq/(QQMusicApi-rs)两个后端,src/lyric/ 两家共用的歌词解析

Coding rules

  • 不要写过长的代码,例如单文件超过 500 行,函数超过 50 行。
  • 插件支持 i18n,支持语言为 中文 和 英文。
  • 开发完一部分后就提示用户提交代码,避免一次性提交过多代码。

Read the full file on GitHub · 212 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. yesterday Changed · -14 lines · -577 tokens per session 341c4b930540
  2. 15d ago Changed · +3 lines · +125 tokens per session 5de2e9e99813
  3. 19d ago Changed · +1 lines · +47 tokens per session 8266fdaa7091
  4. 29d ago Changed · -1 lines · +162 tokens per session 6a20b9ee0fc8
  5. 1mo ago Changed · +2 lines · +288 tokens per session baf9f024c990
  6. 1mo ago Changed · +7 lines · +275 tokens per session 59de2636b194
  7. 1mo ago Changed · +5 lines · +163 tokens per session 87a25240744c
  8. 2mo ago First seen · 209 lines · 3,735 tokens per session scan B d52276e91020

Subscribe to this mod's changes

decky-music AGENTS.md is an instructions file published in the GitHub repository jinzhongjia/decky-music (125 stars, last pushed 2d ago), licensed MIT. It adds 4,218 tokens to every session, about $0.0169 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks for root, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

decky-music AGENTS.md compared with instructions from other repositories

decky-music AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
decky-music AGENTS.mdjinzhongjia/decky-musicInstructions file1252d agoMITB4,218Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode