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.
npx skills add zhinjs/zhin --skill plugin-qualitygit clone --depth 1 https://github.com/zhinjs/zhinWrote 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/skills/zhinjs/zhin/plugin-quality)<a href="https://agentmods.dev/skills/zhinjs/zhin/plugin-quality"><img src="https://agentmods.dev/badge/skills/zhinjs/zhin/plugin-quality/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/skills/zhinjs/zhin/plugin-quality"><img src="https://agentmods.dev/badge/skills/zhinjs/zhin/plugin-quality.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00049 | $0.00931 |
| Opus 5.5 | $0.00020 | $0.00372 |
| Sonnet 5.5 | $0.00010 | $0.00186 |
| Haiku 4.5 | $0.00005 | $0.00093 |
Grade A, and why
plugin-quality 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 26d 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.
What it actually says
Zhin 插件质量审查(Plugin Runtime)
对照 Plugin Runtime 审查插件:结构、约定目录、依赖方向、发送链与安全。发现仍用 usePlugin / MessageCommand 的新代码应标为缺陷并迁移。
适用场景
- 「检查插件质量」「审查代码」「发布前看看有没有问题」
- 重构现有插件使其符合 Runtime
审查维度
1. 结构规范性
| 项目 | 要求 | 严重程度 |
|---|---|---|
| 入口 | plugin.ts default-export definePlugin() |
🔴 严重 |
| manifest | package.json#zhin(protocol、entry、features) |
🔴 严重 |
| 能力放置 | 约定目录 + default export;非业务堆在 plugin.ts |
🔴 严重 |
| 旧 API | 新代码无 usePlugin / getPlugin / MessageCommand |
🔴 严重 |
| 导入路径 | 相对导入带 .js |
🔴 严重 |
| Feature 依赖 | 用到的能力已在 zhin.features 声明 |
🟡 中等 |
| 配置 | 自有字段在 schema.json,经 context.config 读取 |
🟡 中等 |
常见错误:
// ❌ 经典插件 API(Runtime 下不工作)
import { usePlugin, MessageCommand } from 'zhin.js'
const plugin = usePlugin()
plugin.addCommand(new MessageCommand('hi').action(() => 'hi'))
// ✅ Runtime
import { definePlugin } from 'zhin.js'
export default definePlugin({ name: 'my-plugin', setup() {} })
// + commands/hi/index.ts → defineCommand(...)
2. 生命周期与资源
- 清理走
context.lifecycle.add或setup返回 disposer - 共享连接/DB 用
context.resources.provide,禁止裸模块级单例或createGenerationStore - Host token 先
has再use(精简安装下可选)
3. 发送与安全
- 出站不绕过
Message.$reply/Adapter.sendMessage→before.sendMessage - 密钥只走环境变量 /
${VAR}配置引用 - AI 工具副作用边界清晰;危险操作有策略/确认
4. 测试与文档
- 至少覆盖核心
execute路径 - README 写明命令触发方式与 Feature 依赖
- 带能力目录的包检查
files/prepublishOnly(pnpm check:plugin-capability-publish)
审查流程
- 读
package.json#zhin+plugin.ts - 扫
commands//tools//middlewares/是否 default export 正确 API - ripgrep:
usePlugin|MessageCommand|getPlugin|bootstrapNode - 跑
pnpm --filter <pkg> test(及需要的 harness) - 输出问题清单(严重度 + 建议修复)
输出格式
## 结论
- 是否可发布:是 / 否
## 问题
| 严重度 | 位置 | 问题 | 建议 |
|--------|------|------|------|
| 🔴 | ... | ... | ... |
## 已通过
- definePlugin 入口 / 约定目录 / 发送链 …
迁移
旧插件迁 Runtime:.github/skills/migrate-zhin-plugin-runtime。
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.
- 26d ago Changed cb1a9b35b2c9
- 1mo ago First seen · 100 lines · 49 tokens per session scan A 84f018dddb7a
plugin-quality is a skill published in the GitHub repository zhinjs/zhin (136 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 931 once invoked, about $0.0002 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.
Other skills, from other repositories
code-review
Code review for issues, style consistency, best practices—use for full code evaluation; not for debugging specific errors or fixing individual style violations.
code-review
Comprehensive code review checklist for pull requests.
code-review
Comprehensive code review for security, performance, and best practices.
code-review
Review code for quality, maintainability, and correctness.
sage-review
Deep, platform-neutral code review for PRs and CRs in ONE thorough single pass — design reasoning (Problem Worth Solving & Solution Fit) as one dimension alongside the 9 code-level dimensions, with chain-of-consequences, self-critique, and draft-only comments. The single app-owned source of truth.
agent-review
Critically review a Stencila agent and suggest improvements. Use when asked to review, audit, critique, evaluate, or improve an agent directory or AGENT.md file. Covers frontmatter validation, system instruction quality, configuration correctness, and adherence to the Agent schema.