plugin-develop

plugin-develop is a skill for Claude Code, Codex from zhinjs/zhin. It costs 70 tokens per session (1,253 once invoked), scanned A, original, MIT.

A development guide for adding features to Zhin.js plugins, such as chat commands, AI tools, middleware, scheduled tasks, and console pages. Zhin.js is the plugin system it targets.

In plain words
What is it for?
Use it when extending an existing Zhin.js plugin with a command, tool, scheduled task, middleware, component, or console page.
Why use it?
It shows the current file and registration patterns, helping avoid older APIs and misplaced code that no longer works with the runtime.

Skill for Claude CodeCodex

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

Good fit Use it when extending an existing Zhin.js plugin with a command, tool, scheduled task, middleware, component, or console page.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhinjs/zhin/plugin-develop
Install

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.

Any agent
npx skills add zhinjs/zhin --skill plugin-develop
Clone the repo
git clone --depth 1 https://github.com/zhinjs/zhin

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 plugin-develop

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhinjs/zhin/plugin-develop/github.svg)](https://agentmods.dev/skills/zhinjs/zhin/plugin-develop)
Your own site
<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.

agentmods 80×15 button for plugin-develop

Your own site · 80×15
<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>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,253 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00070 $0.01253
Opus 5.5 $0.00028 $0.00501
Sonnet 5.5 $0.00014 $0.00251
Haiku 4.5 $0.00007 $0.00125

Measured 25d ago against content hash 537038141d58, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

packages/toolkit/create-zhin/template/skills/plugin-develop/SKILL.md · 142 lines

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 步:定位入口与范围

  1. 找到插件入口:plugin.ts(或单文件 bot 的 bot.ts)
  2. 确认改动类型(只选一种主路径):
能力 做法 目录 / 位置
聊天命令 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 风格
  1. 确认 package.json#zhin.features 已挂对应 Feature(如 @zhin.js/command)
  2. 输出:要新增/修改的文件清单

第 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`;
  },
});

Read the full file on GitHub · 142 lines

Files

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.

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. 25d ago Changed 537038141d58
  2. 1mo ago First seen · 142 lines · 70 tokens per session scan A 83b3010cb0b3

Subscribe to this mod's changes

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.

Related

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.

SystemTce/dify-skills · 24 tokens

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…

mahmoud20138/Tradecraft · 80 tokens

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.

TencentCloud/Octop · 68 tokens

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…

bytedance/agentkit-samples · 104 tokens

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.

wecode-ai/Wegent · 49 tokens

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…

aristoteleo/PantheonOS · 129 tokens