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-developgit 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-develop)<a href="https://agentmods.dev/skills/zhinjs/zhin/plugin-develop"><img src="https://agentmods.dev/badge/skills/zhinjs/zhin/plugin-develop/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-develop"><img src="https://agentmods.dev/badge/skills/zhinjs/zhin/plugin-develop.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.00070 | $0.01266 |
| Opus 5.5 | $0.00028 | $0.00506 |
| Sonnet 5.5 | $0.00014 | $0.00253 |
| Haiku 4.5 | $0.00007 | $0.00127 |
Grade A, and why
plugin-develop 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 13d 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.
How it starts
The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Plugin Develop(Plugin Runtime)
在已有 Zhin 插件包内实现功能增量。能力按约定目录发现,一个文件一个能力;不要再写 MessageCommand / usePlugin() / addCommand(new …)。
何时使用
- 用户要在插件里「加一个命令 / 工具 / 定时任务 / 控制台页」
- 插件骨架已存在(
plugin-init或zhin new) - 大改目录 → 用仓库内
zhin-plugin-standard-development或迁移 skill
工作流
第 1 步:定位入口与范围
- 找到插件入口:
plugin.ts(或单文件 bot 的bot.ts) - 确认改动类型(只选一种主路径):
| 能力 | 做法 | 目录 / 位置 |
|---|---|---|
| 聊天命令 | defineCommand() default export |
commands/**/*/index.ts($ 入口路径即路由) |
| AI 工具 | defineAgentTool() |
tools/<name>/index.ts |
| 中间件 | defineMiddleware() |
middlewares/*/index.ts |
| 组件 | defineComponent() |
components/*/index.tsx |
| 定时任务 | scheduleHostToken.register(...) + lifecycle |
plugin.ts setup |
| 控制台页 | definePage() |
pages/*/index.tsx |
| 单文件 demo | setup({ addCommand }) |
仅 examples/single-file-bot 风格 |
- 确认
package.json#zhin.features已挂对应 Feature(如@zhin.js/command) - 输出:要新增/修改的文件清单
第 2 步:实现(禁止旧 API)
- 禁止:
usePlugin、getPlugin、MessageCommand、plugin.addCommand、addCron(new Cron)、useContext('web')旧写法 - 命令:文件路径是路由 SSOT;参数用 Next.js 风格文件名(
[name].ts必需 /[[name]].ts可选 /[...name].ts捕获所有),类型与默认值在defineCommand({ params })中声明;execute读params/args/input - 出站:走统一发送链(
$reply/ Adapter.sendMessage),禁止直调平台 Bot - 本地导入带
.js扩展名
命令示例 commands/greet/[name]/index.ts:
import { defineCommand } from 'zhin.js/command';
export default defineCommand({
description: '问候用户',
params: {
name: { type: 'string', description: '用户名字' },
},
execute({ params }) {
return `你好,${params.name}!`;
},
});
工具示例 tools/get_weather/index.ts:
import { defineAgentTool } from '@zhin.js/tool';
export default defineAgentTool({
description: '查询天气',
inputSchema: {
type: 'object',
properties: { city: { type: 'string', description: '城市名' } },
required: ['city'],
},
async execute({ city }) {
return `${city}:晴,25°C`;
},
});
What ships with it
1 file 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.
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.
- 13d ago Changed · +2 lines 7048cf89258d
- 17d ago Changed 0a928911da72
- 18d ago Changed abb819411aa0
- 2mo ago Changed 537038141d58
- 3mo ago First seen · 142 lines · 70 tokens per session scan A 83b3010cb0b3
plugin-develop is a skill published in the GitHub repository zhinjs/zhin (136 stars, last pushed yesterday), licensed MIT. It adds 70 tokens to every session and 1,266 once invoked, about $0.0003 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.
plugin-develop compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| plugin-developzhinjs/zhin | Skill | 136 | yesterday | MIT | A | 70 | Claude Code, Codex |
| create-toolagentfront/frontmcp | Skill | 154 | today | Apache-2.0 | A | 468 | Claude Code |
| fix-xml-globalsUI5/plugins-coding-agents | Skill | 48 | 3d ago | Apache-2.0 | A | 231 | Claude Code, Codex |
| fix-cyclic-depsUI5/plugins-coding-agents | Skill | 48 | 3d ago | Apache-2.0 | A | 165 | Claude Code, Codex |
| fix-deprecated-controlsUI5/plugins-coding-agents | Skill | 48 | 3d ago | Apache-2.0 | A | 175 | Claude Code, Codex |
| fix-fiori-elements-extensionsUI5/plugins-coding-agents | Skill | 48 | 3d ago | Apache-2.0 | A | 204 | Claude Code, Codex |
| fix-js-globalsUI5/plugins-coding-agents | Skill | 48 | 3d ago | Apache-2.0 | A | 243 | Claude Code, Codex |