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.
curl -O https://raw.githubusercontent.com/jinzhongjia/decky-music/main/AGENTS.mdgit clone --depth 1 https://github.com/jinzhongjia/decky-musicWrote 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.
[](https://agentmods.dev/instructions/jinzhongjia/decky-music/agents-md)<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.
<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>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.
| Model | Per session | Once 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 |
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 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
以下为使用的库:
- https://github.com/jinzhongjia/QQMusicApi-rs —— QQ 音乐后端(Rust 库,L-1124/QQMusicApi 的 Rust 实现)
- https://github.com/jinzhongjia/ncm-api-rs(`feat/sync-upstream-2026-10` 分支)—— 网易云后端(Rust 库)
- https://github.com/SteamDeckHomebrew/decky-loader —— 插件宿主 / API 来源
- rodio + reqwest(rustls-tls)—— player 拉流/解码/输出
- @decky/api + @decky/ui —— 前端
架构速览
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.pyRPC、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.tsplayer/—— Rust,reqwest+rodioprovider/—— Rust,统一音源进程:src/main.rs按请求音源路由,src/ncm/(ncm-api-rs)、src/qq/(QQMusicApi-rs)两个后端,src/lyric/两家共用的歌词解析
Coding rules
- 不要写过长的代码,例如单文件超过 500 行,函数超过 50 行。
- 插件支持 i18n,支持语言为 中文 和 英文。
- 开发完一部分后就提示用户提交代码,避免一次性提交过多代码。
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.
- yesterday Changed · -14 lines · -577 tokens per session 341c4b930540
- 15d ago Changed · +3 lines · +125 tokens per session 5de2e9e99813
- 19d ago Changed · +1 lines · +47 tokens per session 8266fdaa7091
- 29d ago Changed · -1 lines · +162 tokens per session 6a20b9ee0fc8
- 1mo ago Changed · +2 lines · +288 tokens per session baf9f024c990
- 1mo ago Changed · +7 lines · +275 tokens per session 59de2636b194
- 1mo ago Changed · +5 lines · +163 tokens per session 87a25240744c
- 2mo ago First seen · 209 lines · 3,735 tokens per session scan B d52276e91020
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.
decky-music AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| decky-music AGENTS.mdjinzhongjia/decky-music | Instructions file | 125 | 2d ago | MIT | B | 4,218 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |