zhin: Command for Claude Code

.github/prompts/zhin-create-plugin.prompt.md

Zhin Create Plugin is a command for Claude Code, GitHub Copilot from zhinjs/zhin. It costs 50 tokens per session (396 once invoked), scanned A, original, MIT.

A step-by-step guide for creating or extending a Zhin.js plugin. It covers plugin types such as commands, events, scheduled jobs, database work, web pages, and AI tools.

In plain words
What is it for?
Use it when adding a Zhin.js plugin or extending one with commands, middleware, events, scheduled tasks, components, services, database access, routing, or web-console features.
Why use it?
It prevents each plugin from using a different structure or ignoring project conventions. It also makes the final report cover what changed and how it was checked.

Command for Claude CodeGitHub Copilot

Written for Claude Code and GitHub Copilot: argument-hint in frontmatter, but also a Copilot chat mode or prompt. Also seen: agent in frontmatter.

This is zhinjs/zhin's own configuration. It tells Claude Code and GitHub Copilot how to work on zhin 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 zhin configures →

Reuse

Borrowing it

Nothing to install: this file belongs to zhinjs/zhin. 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/zhinjs/zhin/main/.github/prompts/zhin-create-plugin.prompt.md
Clone the repo
git clone --depth 1 https://github.com/zhinjs/zhin

Made for: Claude Code, GitHub Copilot.

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 Zhin Create Plugin

README.md
[![agentmods](https://agentmods.dev/badge/commands/zhinjs/zhin/zhin-create-plugin/github.svg)](https://agentmods.dev/commands/zhinjs/zhin/zhin-create-plugin)
Your own site
<a href="https://agentmods.dev/commands/zhinjs/zhin/zhin-create-plugin"><img src="https://agentmods.dev/badge/commands/zhinjs/zhin/zhin-create-plugin/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 Zhin Create Plugin

Your own site · 80×15
<a href="https://agentmods.dev/commands/zhinjs/zhin/zhin-create-plugin"><img src="https://agentmods.dev/badge/commands/zhinjs/zhin/zhin-create-plugin.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 396 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.
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.00050 $0.00396
Opus 5.5 $0.00020 $0.00158
Sonnet 5.5 $0.00010 $0.00079
Haiku 4.5 $0.00005 $0.00040

Measured 1mo ago against content hash 8648fb4d3504, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Zhin Create Plugin 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 1mo 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.

.github/prompts/zhin-create-plugin.prompt.md · 29 lines

What it actually says

Load and follow the zhin-plugin-standard-development skill.

Implement the requested Zhin.js plugin work using the repository's standard plugin workflow.

Requirements

  • First classify the plugin capability type (commands, middleware, events, cron, components, AI tools, services, database, web) and choose an appropriate structure
  • Use the skill assets and references when needed instead of inventing ad hoc layouts
  • Prefer minimal viable structure before expanding directories
  • Keep implementation aligned with repository conventions, especially .js import extensions and declareConfig() usage
  • When relevant, include commands, middleware, events, components, cron jobs, Contexts, database, router, web console integration, or AI tools
  • Validate the critical path after changes

Output Format

输出必须包含以下段落,不能省略:

  1. 任务类型:属于哪类插件能力(命令/中间件/事件/定时/组件/AI 工具/服务/数据/Web),为什么
  2. 结构选择:选了哪种目录骨架,判断依据是什么
  3. 实现内容:创建或修改了哪些文件,核心逻辑说明
  4. 约定检查:.js 导入、declareConfig()、usePlugin() 作用域、生命周期清理是否合规
  5. 验证结果:已执行的检查(类型/构建/测试/关键路径)及结果
  6. 残余风险:仅与当前改动直接相关的风险
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. 1mo ago First seen · 29 lines · 50 tokens per session scan A 8648fb4d3504

Subscribe to this mod's changes

Zhin Create Plugin is a command published in the GitHub repository zhinjs/zhin (136 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 396 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-09-07.