Daily Brief
leiting-eric/DailyBrief
Operational knowledge for the daily-brief digest pipeline (this project).
Migrate legacy Zhin.js plugins and projects to the convention-based Plugin Runtime — from usePlugin/getPlugin/addCommand/addMiddleware/addComponent/addTool/addCron/declareConfig/useContext and…
$ npx skills add zhinjs/zhin --skill migrate-zhin-plugin-runtime -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install zhinjs/zhin migrate-zhin-plugin-runtime --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/zhinjs/zhin.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/migrate-zhin-plugin-runtime .claude/skills/migrate-zhin-plugin-runtime && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "migrate-zhin-plugin-runtime" agent skill from https://github.com/zhinjs/zhin/tree/main/.github/skills/migrate-zhin-plugin-runtime into .claude/skills/migrate-zhin-plugin-runtime/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrate-zhin-plugin-runtime", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/zhinjs/zhin/tree/main/.github/skills/migrate-zhin-plugin-runtimeType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add zhinjs/zhin --skill migrate-zhin-plugin-runtime -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install zhinjs/zhin migrate-zhin-plugin-runtime --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zhinjs/zhin.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.github/skills/migrate-zhin-plugin-runtime .agents/skills/migrate-zhin-plugin-runtime && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "migrate-zhin-plugin-runtime" agent skill from https://github.com/zhinjs/zhin/tree/main/.github/skills/migrate-zhin-plugin-runtime into .agents/skills/migrate-zhin-plugin-runtime/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrate-zhin-plugin-runtime", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add zhinjs/zhin --skill migrate-zhin-plugin-runtime -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install zhinjs/zhin migrate-zhin-plugin-runtime --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zhinjs/zhin.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.github/skills/migrate-zhin-plugin-runtime .cursor/skills/migrate-zhin-plugin-runtime && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "migrate-zhin-plugin-runtime" agent skill from https://github.com/zhinjs/zhin/tree/main/.github/skills/migrate-zhin-plugin-runtime into .cursor/skills/migrate-zhin-plugin-runtime/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrate-zhin-plugin-runtime", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/zhinjs/zhin.git --path .github/skills/migrate-zhin-plugin-runtime--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add zhinjs/zhin --skill migrate-zhin-plugin-runtime -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install zhinjs/zhin migrate-zhin-plugin-runtime --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zhinjs/zhin.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.github/skills/migrate-zhin-plugin-runtime .gemini/skills/migrate-zhin-plugin-runtime && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "migrate-zhin-plugin-runtime" agent skill from https://github.com/zhinjs/zhin/tree/main/.github/skills/migrate-zhin-plugin-runtime into .gemini/skills/migrate-zhin-plugin-runtime/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrate-zhin-plugin-runtime", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install zhinjs/zhin migrate-zhin-plugin-runtimeInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add zhinjs/zhin --skill migrate-zhin-plugin-runtime -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/zhinjs/zhin.git skills-src && mkdir -p .github/skills && cp -r skills-src/.github/skills/migrate-zhin-plugin-runtime .github/skills/migrate-zhin-plugin-runtime && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "migrate-zhin-plugin-runtime" agent skill from https://github.com/zhinjs/zhin/tree/main/.github/skills/migrate-zhin-plugin-runtime into .github/skills/migrate-zhin-plugin-runtime/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrate-zhin-plugin-runtime", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add zhinjs/zhin --skill migrate-zhin-plugin-runtime -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install zhinjs/zhin migrate-zhin-plugin-runtime --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/zhinjs/zhin.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.github/skills/migrate-zhin-plugin-runtime .opencode/skills/migrate-zhin-plugin-runtime && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "migrate-zhin-plugin-runtime" agent skill from https://github.com/zhinjs/zhin/tree/main/.github/skills/migrate-zhin-plugin-runtime into .opencode/skills/migrate-zhin-plugin-runtime/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrate-zhin-plugin-runtime", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
migrate-zhin-plugin-runtimeMigrate legacy Zhin.js plugins and projects to the convention-based Plugin Runtime — from usePlugin/getPlugin/addCommand/addMiddleware/addComponent/addTool/addCron/declareConfig/useContext and…
Migrate Zhin Plugin Runtime is an agent skill from zhinjs/zhin. Migrate legacy Zhin.js plugins and projects to the convention-based Plugin Runtime — from usePlugin/getPlugin/addCommand/addMiddleware/addComponent/addTool/addCron/declareConfig/useContext and mutable registries to definePlugin + capability directories + Scope/Token resources. Use this whenever a Zhin plugin fails to load under zhin runtime start, errors with "does not default-export a Plugin definition", still imports zhin.js/@zhin.js/core/@zhin.js/kernel, or when asked to upgrade, port, modernize, or migrate a…
Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/manual-diagnostics.md` and `references/migration-map.md`).
It sits in Productivity & Automation, covering Scheduled and recurring tasks. It works with npm and TypeScript. The repository describes itself as: AI-native TypeScript bot framework — one codebase for 20+ chat platforms (QQ, Discord, Telegram, Slack, WeChat…). Opt-in AI agent with MCP, tools & security policies. <10MB core. The licence is MIT.
8 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit f38698f. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pnpmrgFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Migrate Zhin Plugin Runtime loads about 1.6k tokens when it runs, and up to ~4.3k if it reads all its reference files. Until then it costs about 182 tokens; SKILL.md has 345 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from zhinjs/zhin at commit f38698f, republished under its MIT licence (© zhinjs). 345 words, ~1,572 tokens.
.claude/skills/migrate-zhin-plugin-runtime/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.目标是产出纯新架构代码:plugin.ts 只做装配,能力按目录发现,共享状态走 Resource/Token。
不保留 compat runtime,不双写。
迁移最容易翻车的地方是凭印象改代码。zhin runtime migrate status 会静态分析整个项目并
返回一个状态机,它比任何猜测都准 —— 每一步都以它的输出为准:
zhin runtime migrate status # 输出 JSON;state 为 ready 时退出码 0,否则 1| state | 含义 | 下一步 |
|---|---|---|
blocked | 有 error 或 manual 诊断,自动迁移无法证明语义等价 | 人工清掉诊断,见 人工诊断处理 |
extraction-required | 还有能自动搬运的注册(automatic > 0) | zhin runtime migrate extract --write |
cutover-required | 能力已就位,但 package.json#zhin / plugin.ts 还没生成 | zhin runtime migrate cutover --write |
dual-run | 仍在从 zhin.js 导入经典 API(usePlugin / MessageCommand 等),或直接 import @zhin.js/core / @zhin.js/kernel | 改用门面约定 API(definePlugin / defineCommand 等),删掉旧入口 |
compat | 仍在 import @zhin.js/next-compat | 移除 compat 依赖 |
ready | 完成 | 跑构建与测试 |
状态是从上往下判定的:只要还有 manual/error 诊断就一直是 blocked,先清诊断再谈其它。
zhin runtime migrate extract --check,逐条读 changes 与 diagnostics。
--check 与 --write 必须二选一,同时给或都不给会直接报错。zhin runtime migrate extract --write。它只搬模块顶层、且闭包干净的注册,
已存在的目标文件不会被覆盖。manual 都要人工处理,见 人工诊断处理。
最常见的是 action 捕获了模块级变量 —— 把它提升为 owner Resource,能力文件再从执行上下文读。zhin runtime migrate cutover --write 生成 package.json#zhin 与 plugin.ts,
并补齐 zhin.js、@zhin.js/runtime;Stable Features 可由 Root 继承,不必再装 @zhin.js/command|middleware|component(cutover 仍可能按约定目录写入 features 挂载)。启动脚本统一是
zhin runtime start,不要再写失效的 zhin dev / zhin start / zhin build。package.json#private: true 的本地 TS root 使用 entry: "./plugin.ts",直接执行
pnpm dev 或 zhin runtime start。entry: "./plugin.js";cutover 生成独立的
tsconfig.zhin.json、zhin:build 与 prepack / prepublishOnly,以便 pnpm pack
和 npm publish 前把 plugin.ts、约定目录和 src/ 编译成可发布 JS。不要把
plugin.ts 作为发布 manifest 的入口。
已有合法 manifest 会被补齐到相应模式;其它 zhin 字段形态仍需人工处理。schema.json(只声明本包字段)、Feature mounts、child plugin mounts。第 2–5 步之间反复跑 status 是最省事的做法 —— 它会告诉你还差什么。
plugin.ts 只装配;能力一个文件一个,default export。完整对照见
迁移映射。
// plugin.ts
import { createToken, definePlugin, databaseHostToken } from 'zhin.js';
export const storeToken = createToken<Store>('my-plugin.store');
export default definePlugin({
name: 'my-plugin', // /^[a-z][a-z0-9-]*$/
setup(context) {
// Host 资源都是可选的:先 has 再 use,否则精简安装会装配失败
if (!context.resources.has(databaseHostToken)) return;
const db = context.resources.use(databaseHostToken);
context.resources.provide(storeToken, createStore(db));
return () => { /* disposer;HMR 回滚时调用 */ };
},
});// commands/profile/index.ts —— 目录路径即路由;参数写在目录名里
import { defineCommand } from 'zhin.js/command';
import { storeToken } from '../../plugin.js';
export default defineCommand({
description: 'Show current user profile',
async execute(context) {
const store = context.use(storeToken); // 能力上下文直接 use,不 import 单例
return store.describe(context.input.sender.id);
},
});两个 context 不是同一个东西,别混用:
setup(context)里context.resources是 Scope ——provide/use/has都挂在它上面。 能力的execute(context)拿到的是 CapabilityContext —— 直接context.use(token)/context.config,没有context.resources,写成context.resources.use(...)会在运行期 报Cannot read properties of undefined。
这些不是风格偏好,违反会让迁移在运行期而不是编译期爆炸:
usePlugin() / getPlugin() 不得出现在能力执行路径。 新运行时不建立
AsyncLocalStorage 上下文,调用它只会拿到一个挂空的孤儿 Plugin,注册的东西永远不生效。status 会一直停在 dual-run。@zhin.js/next-* 或 legacy callback adapter。register / 订阅都要有 disposer 交给 context.lifecycle,否则热更新会重复注册。zhin runtime migrate status # state 必须是 ready(退出码 0)
rg -n "usePlugin\(|getPlugin\(|add(Command|Middleware|Component|Tool|Cron)\(|@zhin.js/next-" .
pnpm --filter <plugin-package> build
pnpm --filter <plugin-package> test
pnpm check:plugin-runtime-migration-readiness
pnpm check:plugin-runtime-migration-verify公开插件还必须验证 tarball,而不是只验证源码类型检查:
pnpm --filter <plugin-package> run build
pnpm --filter <plugin-package> pack
# 解开 tarball,确认 package/plugin.js、package/plugin.d.ts 和已编译的能力目录存在rg 只允许命中文档与迁移测试。ready 意味着静态检查通过,不等于行为等价 —— 平台相关
行为(真实适配器收发、定时触发)要么实测,要么在交付说明里写清未验证项,不要用"编译通过"
替代运行时验证。
仓库内声明 zhin.type: "plugin" 的包会由 check:plugin-runtime-migration-readiness 做确定性检查。
它只扫描当前 checkout,不读取 cwd 之外的用户项目;tests/、test/、fixtures/、__fixtures__/
和带 zhin-migration-gate: legacy-fixture 标记的源码会被排除。因此迁移示例可以保留旧 API,
但 native Plugin Runtime 的生产源码不能在函数体内调用 usePlugin() 或 getPlugin()。
pnpm check:plugin-runtime-migration-verify 是 migration 的离线 E2E verify:先确认 cutover
已经无变更,再用不触发 install 的 pnpm run build 验证构建。私有 development root 额外要求
scripts.dev 与 scripts.start 都是 zhin runtime start;公开 publish package 会执行
pnpm pack,解读 tarball 后确认 package.json#zhin.entry、
plugin.js、plugin.d.ts 和每个已发现能力目录的 JS 产物一致。它不执行 install,也不会访问网络。
© zhinjs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in .github/skills/migrate-zhin-plugin-runtime of zhinjs/zhin.
Open the folder on GitHubat commit f38698f
Migrate Zhin Plugin Runtime next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Migrate Zhin Plugin Runtime this skillzhinjs/zhin | 136 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Daily Briefleiting-eric/DailyBrief | 367 | — | ~3k | Automated safety check: Notes | MIT | |
| Env Doctorcat-xierluo/legal-skills | 720 | — | ~756 | Automated safety check: Pass | MIT | |
| Nextclaw AutostartPeiiii/nextclaw | 260 | — | ~943 | Automated safety check: Notes | MIT | |
| Golem Recurring Task TSgolemcloud/golem | 1.5k | — | ~1.8k | Automated safety check: Pass | Custom licence | |
| Trigger.dev Background Taskspapermark/papermark | 9.2k | — | ~2.1k | Automated safety check: Pass | Custom licence |
leiting-eric/DailyBrief
Operational knowledge for the daily-brief digest pipeline (this project).
cat-xierluo/legal-skills
本机开发环境与全局包的体检、账本与安装纪律,覆盖所有包管理器(npm/npx、nvm、pip/pipx、uv、brew、bun)与运行时环境面(~/.local/bin 垫片、PATH、python 解释器版图、LaunchAgents、cron、shell rc 漂移对照)。当用户问「node/python 为什么是这个版本」「npm/pip…
Peiiii/nextclaw
A skill your agent uses when the user asks about NextClaw autostart, auto-start on login or reboot, daemon/service registration, LaunchAgent, systemd, Windows Scheduled Task, service autostart…
golemcloud/golem
Implementing a recurring (cron-like) task in a TypeScript Golem agent by self-scheduling future invocations.
papermark/papermark
Guides building durable background tasks, scheduled jobs and queues with Trigger.dev, including retries, waits, idempotency and concurrency limits.
code-yeongyu/senpi
Points the agent at Bun 1.4 built-in APIs before it installs an npm package, so image, browser, markdown, cron, PTY and test work uses what Bun already ships.
zhinjs/zhin
Refactor existing Zhin.js plugins into a cleaner standard structure.
zhinjs/zhin
Audit Zhin.js changes for security, performance, lifecycle, and architecture regressions.
zhinjs/zhin
Implement Zhin.js plugins with Plugin Runtime. An agent skill from zhinjs/zhin.
zhinjs/zhin
使用 gh CLI 处理内置 GitHub Tool 未覆盖的 Issue、PR、Release、Workflow、搜索和 API 操作。
zhinjs/zhin
企业微信平台管理能力。当用户在企业微信中请求用户信息查询、部门架构查询、 发送文本消息时使用。即使用户没有提到企业微信,只要上下文是企业微信/WeCom 场景且涉及用户查询、部门管理或消息发送,就应触发。
zhinjs/zhin
签到积分系统查询能力。当用户想查看自己的积分、签到排行榜、连签天数、 或了解签到奖励时使用。日常签到通过聊天命令触发,此技能提供积分查询的 AI 工具。
Works with
Categories
Migrate legacy Zhin.js plugins and projects to the convention-based Plugin Runtime — from usePlugin/getPlugin/addCommand/addMiddleware/addComponent/addTool/addCron/declareConfig/useContext and…. Migrate Zhin Plugin Runtime is an agent skill from zhinjs/zhin.js plugins and projects to the convention-based Plugin Runtime — from usePlugin/getPlugin/addCommand/addMiddleware/addComponent/addTool/addCron/declareConfig/useContext and mutable registries to definePlugin + capability directories + Scope/Token resources.
Migrate Zhin Plugin Runtime fits situations like: tasks that involve Scheduled and recurring tasks.
Run `npx skills add zhinjs/zhin --skill migrate-zhin-plugin-runtime -a claude-code`. Or copy the skill folder (.github/skills/migrate-zhin-plugin-runtime in zhinjs/zhin) into .claude/skills/migrate-zhin-plugin-runtime in your project. Claude Code loads it when a task matches its description.
Run `npx skills add zhinjs/zhin --skill migrate-zhin-plugin-runtime -a codex`. Or copy the skill folder (.github/skills/migrate-zhin-plugin-runtime in zhinjs/zhin) into .agents/skills/migrate-zhin-plugin-runtime in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zhinjs/zhin --skill migrate-zhin-plugin-runtime -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/migrate-zhin-plugin-runtime, .gemini/skills/migrate-zhin-plugin-runtime, .github/skills/migrate-zhin-plugin-runtime and .opencode/skills/migrate-zhin-plugin-runtime in your project.
Going by SKILL.md and its folder, Migrate Zhin Plugin Runtime needs the command-line tools its instructions call (pnpm and rg).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Migrate Zhin Plugin Runtime is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.8k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Migrate Zhin Plugin Runtime: Daily Brief (leiting-eric/DailyBrief, 367 stars), Env Doctor (cat-xierluo/legal-skills, 720 stars), Nextclaw Autostart (Peiiii/nextclaw, 260 stars) and Golem Recurring Task TS (golemcloud/golem, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
zhinjs (a GitHub organization) maintains it in zhinjs/zhin, which has 136 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 10, 2026.
Source: zhinjs/zhin on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.