qq-music-api AGENTS.md

qq-music-api AGENTS.md is an instructions file for Codex, OpenCode from Rain120/qq-music-api. It costs 2,444 tokens per session, scanned A, original, MIT.

Project instructions for qq-music-api, a TypeScript server built with Koa that provides a consistent interface to QQ Music services. They explain its request flow, API Explorer, and main directories.

In plain words
What is it for?
Use them when developing, debugging, or extending the QQ Music API server and its local API Explorer.
Why use it?
They help an agent understand how requests move through middleware, routes, controllers, and services before changing the code. They also clarify that the described AI-agent support is an extension direction, not a complete runtime.

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/rain120/qq-music-api/agents-md
Clone the repo
git clone --depth 1 https://github.com/Rain120/qq-music-api

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/rain120/qq-music-api/agents-md.svg)](https://agentmods.dev/instructions/rain120/qq-music-api/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/rain120/qq-music-api/agents-md"><img src="https://agentmods.dev/badge/instructions/rain120/qq-music-api/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,444 This file is loaded in full into every session.
When invoked 2,444 The same file — it is already loaded in full.
Security scan A 0 findings. 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.02444 $0.02444
Opus 5 $0.01222 $0.01222
Sonnet 5 $0.00489 $0.00489
Haiku 4.5 $0.00244 $0.00244

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

Security

Grade A, and why

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

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.

AGENTS.md · 245 lines

How it starts

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

🤖 QQ Music API - AI Agents 指南 (AGENTS.md)

本文档用于说明 qq-music-api 当前的真实项目架构、API Explorer 的模块分层,以及 AI 代理能力在本仓库中的落点与扩展方式。它既面向开发者,也面向需要理解代码结构的大语言模型(LLM)或自动化工作流。

🎯 目录

  1. 项目概览
  2. 项目架构
  3. Explorer 架构
  4. AI 代理能力定位
  5. 建议的调用与扩展方式
  6. 开发约束

项目概览

qq-music-api 是一个基于 Koa2 + TypeScript 的服务端项目,核心职责是:

  • 对外暴露统一的 QQ 音乐接口。
  • 在控制器层接收请求、做参数整理并调用服务层。
  • 在服务层请求 QQ 音乐上游能力并返回结构化结果。
  • 提供一个内置的本地 API Explorer 页面,方便开发环境调试接口。

当前仓库的主体是标准的 Koa 服务和 Explorer 调试工作台。文档中提到的 AI 代理,更适合作为“能力边界”和“扩展方向”来理解,而不是一个已经完整落地的独立运行时框架。


项目架构

1. 服务端主链路

当前请求链路如下:

HTTP Request
  -> Koa App (src/app.ts)
  -> Middlewares (body parser / cookie / cors / response time / logger)
  -> Router (src/routes/router.ts)
  -> Controllers (src/controllers/*)
  -> Services (src/services/*)
  -> QQ Music upstream / data parsing
  -> HTTP Response

2. 主要目录说明

qq-music-api/
├── src/
│   ├── app.ts                  # Koa 应用入口,注册中间件、Explorer 路由与静态资源
│   ├── config/                 # 服务配置、Explorer 元数据配置
│   ├── controllers/            # 控制器层,处理入参并编排服务调用
│   ├── explorer/               # Explorer 的 contracts/domain/application 逻辑
│   ├── middlewares/            # Koa 中间件
│   ├── routes/                 # 路由注册
│   ├── services/               # QQ 音乐能力封装与数据获取
│   ├── types/                  # 共享类型定义
│   └── util/                   # 公共工具,如 logger、cookie、lyricParse
├── public/
│   └── explorer/               # Explorer 静态页面资源(index.html / app.js / styles.css)
├── tests/                      # Jest + Supertest 测试
├── docs/                       # Docsify 文档与静态截图资源
└── README.md                   # 项目主说明

3. 关键模块职责

  • src/app.ts
    • 启动 Koa 服务。
    • 暴露 /explorer/explorer/index.html/explorer/metadata
    • 托管 public/ 下的静态资源。
    • 在开发环境中配合 AUTO_OPEN_EXPLORER 自动打开 Explorer。
  • src/controllers/*
    • 负责解析查询参数与请求体。
    • 将请求转发到对应 services
    • 封装统一的 HTTP 返回结构。
  • src/services/*
    • 负责实际的数据拉取、协议拼装与结果加工。
    • 是当前最接近“数据获取代理”的能力落点。
  • src/util/logger.ts
    • 统一日志出口。
    • Explorer 的服务端调试日志也通过这里输出。
  • tests/*
    • 覆盖控制器、服务、Explorer 元数据、Explorer 领域逻辑与页面路由。

Read the full file on GitHub · 245 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 · 245 lines · 2,444 tokens per session scan A 99591b1f2585

Subscribe to this mod's changes

qq-music-api AGENTS.md is an instructions file published in the GitHub repository Rain120/qq-music-api (1,064 stars, last pushed 13d ago), licensed MIT. It adds 2,444 tokens to every session, about $0.0122 per session on Opus 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.

Related

Other instructions, from other repositories

pi-extensions AGENTS.md

AGENTS.md instructions for narumiruna/pi-extensions, covering repository guidelines, documentation and communication, repository structure, commands and tooling and dependency safety.

narumiruna/pi-extensions · 3,365 tokens

sportsdataverse-js CLAUDE.md

Instructions for sportsdataverse/sportsdataverse-js, covering claude.md — sportsdataverse (node.js) development guide, package overview, commit convention, branches and build & development commands.

sportsdataverse/sportsdataverse-js · 6,452 tokens

webiny-js CLAUDE.md

Claude Code instructions for webiny/webiny-js, covering context, claude project guidelines, reading code, development commands and install dependencies (suppress all output – it's noise).

webiny/webiny-js · 555 tokens

webiny-js copilot-instructions.md

Copilot instructions for webiny/webiny-js, a project described as: Open-source, self-hosted CMS platform on AWS serverless (Lambda, DynamoDB, S3). TypeScript framework with multi-tenancy, lifecycle hooks, GraphQL API, and AI-assisted development via MCP server. Built for developers at large organizations.

webiny/webiny-js · 57 tokens

wa-automate-nodejs AGENTS.md

AGENTS.md instructions for open-wa/wa-automate-nodejs, covering repository instructions, commit policy, no ai attribution, commit grouping and gitmoji reference.

open-wa/wa-automate-nodejs · 1,586 tokens

keryx CLAUDE.md

Instructions for actionhero/keryx, covering claude.md, project overview, monorepo structure, development environment and environment setup.

actionhero/keryx · 2,225 tokens