qq-music-api: Instructions file for Codex

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

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

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

About the project

QQ Music API is a Koa2 and TypeScript web service that exposes data from QQ Music through HTTP endpoints. It is used for retrieving information about songs, artists, playlists, charts, and related music resources, with a built-in browser-based API explorer for testing requests. The catalogue skills and instruction relate to developing or operating this API service.

Rain120/qq-music-api · 1,106 stars · on GitHub · rain120.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to Rain120/qq-music-api. 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/Rain120/qq-music-api/next/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/github.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/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 qq-music-api AGENTS.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.02444 $0.02444
Opus 5.5 $0.00978 $0.00978
Sonnet 5.5 $0.00489 $0.00489
Haiku 4.5 $0.00244 $0.00244

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

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,581 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens