qq-music-api: Skill for Claude Code

.skills/completion-rule/SKILL.md

completion-rule is a skill for Claude Code, Codex from Rain120/qq-music-api. It costs 98 tokens per session (1,313 once invoked), scanned A, original, MIT.

A code-generation checklist that makes the agent implement code, test it, and check its style. It supports Python, TypeScript, Go, and Java.

In plain words
What is it for?
Use it when generating or changing code that must work, include unit tests, and follow a linting standard.
Why use it?
It catches missing requirements, edge cases, test failures, and style problems before the work is considered complete. Failed checks trigger corrections for a set number of attempts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is Rain120/qq-music-api's own configuration. It tells Claude Code and Codex 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,068 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/.skills/completion-rule/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Rain120/qq-music-api

Made for: Claude Code, Codex.

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 completion-rule

README.md
[![agentmods](https://agentmods.dev/badge/skills/rain120/qq-music-api/completion-rule.svg)](https://agentmods.dev/skills/rain120/qq-music-api/completion-rule)
Your own site
<a href="https://agentmods.dev/skills/rain120/qq-music-api/completion-rule"><img src="https://agentmods.dev/badge/skills/rain120/qq-music-api/completion-rule.svg" alt="Measured on agentmods" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,313 The whole file, excluding the scripts and references it only reads on demand.
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.1 $0.00098 $0.01313
Opus 5 $0.00049 $0.00656
Sonnet 5 $0.00020 $0.00263
Haiku 4.5 $0.00010 $0.00131

Measured 6d ago against content hash 1039e2532e7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

completion-rule 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 6d 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.

.skills/completion-rule/SKILL.md · 169 lines

How it starts

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

Completion Rule

角色

同时扮演三个角色:

  1. 代码实现者 — 编写功能代码。
  2. 自测工程师 — 设计测试、推演逻辑。
  3. 代码审查员 — 检查规范与缺陷。

任一角色发现问题 = 未通过。

参数

使用前替换:

占位符 含义
<MAX_ITERATIONS> 最大循环次数(如 3
<TARGET_LANGUAGE> 目标语言(如 Python 3.11+
<TEST_FRAMEWORK> 测试框架(如 pytest
<LINTER_STANDARD> Lint 规范(如 ruff
<MIN_TEST_COVERAGE> 覆盖要求(如 所有 public 函数:正向+异常
<REQUIREMENT_REF> 需求描述位置

语言配置

根据目标语言读取对应 reference 文件:

语言 文件
Python references/python.md
TypeScript references/typescript.md
Go references/go.md
Java references/java.md

未列出的语言:选择社区主流工具,在输出中声明选择及理由。

流程

步骤1:实现

  1. 按 <REQUIREMENT_REF> 完成代码,输出完整代码,不省略。
  2. 一句话概述方案。

步骤2:功能自测

对照 <REQUIREMENT_REF> 检查:

维度 操作
需求覆盖 每条需求映射到代码位置
边界条件 ≥3 个边界场景,逐一推演
逻辑推演 ≥2 条正向路径,手动 trace
数据流 验证初始化/变更/返回值全分支一致
编译期约束 按语言 reference

输出:

[功能自测]
- 需求覆盖:PASS/FAIL
- 边界条件:PASS/FAIL
- 逻辑推演:PASS/FAIL
- 数据流:PASS/FAIL
- 编译期约束:PASS/FAIL/N/A
→ 总结:PASS/FAIL

步骤3:单元测试

使用 <TEST_FRAMEWORK> 及语言 reference 中的规范:

  1. 编写测试:每个 public 函数 ≥1 正向、每个边界场景 1 个、≥1 异常路径。
  2. 逐个测试对步骤1代码推演。
  3. 对照 <MIN_TEST_COVERAGE> 评估覆盖。

输出:

[单元测试报告]
- 用例数:N,通过:M/N
- 覆盖:满足/不满足 <MIN_TEST_COVERAGE>
→ 总结:PASS/FAIL

输出完整测试代码。

步骤4:Linter 检查

按 <LINTER_STANDARD> 及语言 reference:

维度 检查
语法/编译 无错误
命名 符合规范
结构 函数 ≤50 行,嵌套 ≤3 层
类型 public 签名有注解
安全/性能 无硬编码密钥,无性能陷阱
导入 无未使用,无循环
语言专项 按 reference

输出:

[Linter 报告]
- 语法:PASS/FAIL
- 命名:PASS/FAIL
- 结构:PASS/FAIL
- 类型:PASS/FAIL/N/A
- 安全/性能:PASS/FAIL
- 导入:PASS/FAIL
- 语言专项:PASS/FAIL
→ 总结:PASS/FAIL

步骤5:修正循环

IF 全部 PASS → 步骤6
ELSE IF 迭代 < <MAX_ITERATIONS>:
  1. 汇总 FAIL(优先级:功能 > 测试 > 规范)
  2. 逐项:根因 → 修复 → 输出完整代码
  3. 代码变更则更新测试
  4. 从步骤2重新执行
  标记:[迭代 X/<MAX_ITERATIONS>]
ELSE → 步骤6 附风险说明

多语言任务:按语言独立执行步骤2-4,全部通过才算整体通过。

步骤6:最终输出

全部通过:

[结果:ALL PASS]
迭代次数:X/<MAX_ITERATIONS>

输出:最终代码 + 最终测试。

达到上限:

Read the full file on GitHub · 169 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 169 lines · 98 tokens per session scan A 1039e2532e7e

Subscribe to this mod's changes

completion-rule is a skill published in the GitHub repository Rain120/qq-music-api (1,068 stars, last pushed 2d ago), licensed MIT. It adds 98 tokens to every session and 1,313 once invoked, about $0.0005 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.