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.01253 |
| Opus 5.5 | $0.00028 | $0.00501 |
| Sonnet 5.5 | $0.00014 | $0.00251 |
| Haiku 4.5 | $0.00007 | $0.00125 |
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 25d 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 — 142 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.
- 25d ago Changed 537038141d58
- 1mo 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 today), licensed MIT. It adds 70 tokens to every session and 1,253 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.
Other skills, from other repositories
dify-skills
A collection of guides for developing Dify workflows and plugins, covering the platform's skills and development practices. Dify is a platform for building applications from connected workflow steps.
agent-development
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development…
tcapi
A helper for managing Tencent Cloud resources through Tencent Cloud's command-line API tool. Tencent Cloud is a cloud-services provider offering products such as virtual servers, storage, networks, and containers.
byted-mediakit-voiceover-editing
Volcano Engine AI MediaKit talking-head video editing Skill: a one-stop workflow from environment setup through media management, audio processing, talking-head cuts, video export, review UI, and iterative refinement. You MUST invoke this Skill when the user mentions talking-head editing, cutting talking video, video…
subscription-manager
Create and manage scheduled subscription tasks. Use when the user wants to set up recurring reminders, periodic reports, scheduled checks, or any automated tasks that run on a schedule. Supports cron expressions, fixed intervals, and one-time executions.
Developmental Gene Panel Design Workflow
Panel design for DEVELOPING / dynamic systems (embryonic organs, differentiation, regeneration). The target experiment is usually a LATE / terminal stage, but the biology is a trajectory: terminal cell types are end-products of earlier lineage programs. A panel built from the target stage alone resolves terminal…