Reversible Migration
JuliusBrussee/caveman
Implement reversible compatibility-safe transitions. Use for schema, data, API, protocol, configuration, or dependency migrations requiring rollback and…
将 NcatBot 4.4/4.5 版本插件迁移到 5.0。包括导入路径、注册方式、Config/Data API、事件类型、消息构造的全面映射。Use when: 迁移插件、升级插件、4 转 5、老版本、旧版本、migration、upgrade、plugin migration、版本升级。
$ npx skills add ncatbot/NcatBot --skill plugin-migration -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ncatbot/NcatBot plugin-migration --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/ncatbot/NcatBot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/plugin-migration .claude/skills/plugin-migration && 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 "plugin-migration" agent skill from https://github.com/ncatbot/NcatBot/tree/main/.agents/skills/plugin-migration into .claude/skills/plugin-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "plugin-migration", 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/ncatbot/NcatBot/tree/main/.agents/skills/plugin-migrationType 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 ncatbot/NcatBot --skill plugin-migration -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ncatbot/NcatBot plugin-migration --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ncatbot/NcatBot.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/plugin-migration .agents/skills/plugin-migration && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "plugin-migration" agent skill from https://github.com/ncatbot/NcatBot/tree/main/.agents/skills/plugin-migration into .agents/skills/plugin-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "plugin-migration", 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 ncatbot/NcatBot --skill plugin-migration -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ncatbot/NcatBot plugin-migration --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ncatbot/NcatBot.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/plugin-migration .cursor/skills/plugin-migration && 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 "plugin-migration" agent skill from https://github.com/ncatbot/NcatBot/tree/main/.agents/skills/plugin-migration into .cursor/skills/plugin-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "plugin-migration", 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/ncatbot/NcatBot.git --path .agents/skills/plugin-migration--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 ncatbot/NcatBot --skill plugin-migration -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ncatbot/NcatBot plugin-migration --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ncatbot/NcatBot.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/plugin-migration .gemini/skills/plugin-migration && 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 "plugin-migration" agent skill from https://github.com/ncatbot/NcatBot/tree/main/.agents/skills/plugin-migration into .gemini/skills/plugin-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "plugin-migration", 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 ncatbot/NcatBot plugin-migrationInstalls 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 ncatbot/NcatBot --skill plugin-migration -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ncatbot/NcatBot.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/plugin-migration .github/skills/plugin-migration && 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 "plugin-migration" agent skill from https://github.com/ncatbot/NcatBot/tree/main/.agents/skills/plugin-migration into .github/skills/plugin-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "plugin-migration", 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 ncatbot/NcatBot --skill plugin-migration -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ncatbot/NcatBot plugin-migration --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ncatbot/NcatBot.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/plugin-migration .opencode/skills/plugin-migration && 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 "plugin-migration" agent skill from https://github.com/ncatbot/NcatBot/tree/main/.agents/skills/plugin-migration into .opencode/skills/plugin-migration/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "plugin-migration", 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.
plugin-migration将 NcatBot 4.4/4.5 版本插件迁移到 5.0。包括导入路径、注册方式、Config/Data API、事件类型、消息构造的全面映射。Use when: 迁移插件、升级插件、4 转 5、老版本、旧版本、migration、upgrade、plugin migration、版本升级。
Plugin Migration is an agent skill from ncatbot/NcatBot. 将 NcatBot 4.4/4.5 版本插件迁移到 5.0。包括导入路径、注册方式、Config/Data API、事件类型、消息构造的全面映射。Use when: 迁移插件、升级插件、4 转 5、老版本、旧版本、migration、upgrade、plugin migration、版本升级。
Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/api-mapping.md`, `references/checklist.md` and `references/import-mapping.md`).
The repository describes itself as: NapCat Python SDK;快速开发你的 QQ 机器人. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit c26300a. 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.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
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.
Plugin Migration loads about 1.2k tokens when it runs, and up to ~7.9k if it reads all its reference files. Until then it costs about 41 tokens; SKILL.md has 337 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 ncatbot/NcatBot at commit c26300a, republished under its MIT licence (© ncatbot). 337 words, ~1,209 tokens.
.claude/skills/plugin-migration/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.你是 NcatBot 插件迁移助手。帮助用户将 4.4/4.5 版本的插件迁移到 5.2.0+ 版本。
| 需要做什么 | 委托给 |
|---|---|
| 理解 5.0 框架用法、API | framework-usage |
| 定位框架内部实现细节 | codebase-nav |
| 验证迁移后的插件 | testing-framework |
| 修改框架本体(如发现兼容问题) | framework-dev |
1. 版本识别 → 2. 代码扫描 → 3. 逐项迁移 → 4. 清单验证读取插件源码,根据以下特征判断来源版本:
| 特征 | 版本 |
|---|---|
from ncatbot.plugin_system import NcatBotPlugin, filter_registry | 4.4 |
register_user_func() / register_admin_func() | 4.4 |
register_handler("event_type", handler) | 4.4 |
@command_registry.command("cmd") | 4.4 |
@filter_registry.group_filter / @filter_registry.private_filter | 4.4 |
from ncatbot.plugin_system.builtin_mixin import NcatBotPlugin | 4.5 |
self.register_config("key", default, description=..., value_type=...) | 4.5 |
| 方法名即命令名(无装饰器,方法名自动注册为命令) | 4.5 |
self.data['config']['key'] 嵌套访问配置 | 4.5 |
self.event_bus.publish_async() | 4.4 |
on_change_xxx 配置变更回调方法 | 4.5 |
dependencies = {} 类属性 | 4.4 / 4.5 |
部分插件可能混用 4.4 和 4.5 的模式。按出现的特征逐条迁移即可。
列出插件中需要迁移的所有项目,按类别分组:
按照 references 中的映射表执行变更。核心原则:一次改一类,改完立即验证。
建议顺序:
self.api.xxx() → self.api.qq.xxx() → api-mapping.md § BotAPI)__init__.py使用 checklist.md 逐项验证迁移结果。
验证手段:
get_errors 检查语法/类型错误以下要点来自 Lolicon4xx 插件的实际迁移实践:
Image(path) → Image(file=path):5.0 的 Image 是 Pydantic model,不接受位置参数,必须用关键字参数 file=。self.data['config']['key'] ≠ self.get_config('key'):4.5 中 data 结构嵌套了 config,5.0 中 config 和 data 完全分离。on_change_xxx 配置回调不存在于 5.0:5.0 ConfigMixin 没有配置变更回调机制,需自行处理。dependencies = {} 类属性需移除:依赖声明移至 manifest.toml 的 [dependencies]。msg,5.0 推荐 event。hasattr(msg, "group_id") → isinstance(event, GroupMessageEvent)。self.api.xxx() → self.api.qq.xxx():5.2.0+ 采用多平台架构,BotAPIClient 是纯路由器,QQ API 必须通过 self.api.qq 访问(如 self.api.qq.post_group_msg(...))。直接调用 self.api.post_group_msg(...) 会 AttributeError。registrar.on_command() vs registrar.qq.on_group_command():前者是跨平台装饰器(群+私聊均触发),后者仅限 QQ 群消息。QQ 专用插件推荐使用 registrar.qq.* 系列。self.api.qq.post_group_forward_msg() — 5.2 多平台架构下必须通过 api.qq 访问(注意:旧代码中的 self.api.post_group_forward_msg() 需要改为 self.api.qq.post_group_forward_msg())ForwardConstructor 的 attach_image()/attach_text()/attach_message() — 接口未变,仅导入路径变更。.to_forward() 和 .build() 均可用(互为别名),5.2.0+ 示例中多使用 .build()MessageArray 的生成器构造 — MessageArray(Image(file=x) for x in imgs) 仍有效event.reply() 方法 — 签名基本一致(5.2.0+ 新增 video 和 at_sender 参数)self.api 的注入 — 框架自动注入 BotAPIClient 实例,但 5.2.0+ 使用方式变为 self.api.qq.xxx() 而非直接 self.api.xxx()| 文件 | 内容 |
|---|---|
| import-mapping.md | 完整的 4.4/4.5 → 5.0 导入路径映射 |
| api-mapping.md | 注册方式、Config、消息构造、BotAPI、事件类型的全面映射 |
| checklist.md | 迁移完成后的逐项验证清单 |
| 路径 | 说明 |
|---|---|
docs/docs/examples/common/01_hello_world/main.py | 最简插件:registrar.on_group_command() + event.reply() 用法 |
docs/docs/examples/qq/01_event_registration/main.py | QQ 事件注册:on_command / on_message / on_notice / priority |
docs/docs/examples/qq/02_command_binding/main.py | 命令参数绑定:str / int / At / Optional / aliases |
plugins/version_notifier/ | 实际运行的跨平台插件,含 manifest.toml |
plugins/Lolicon/ | 从 4.5 迁移而来的实际插件 |
© ncatbot, 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 3 other files (references) in .agents/skills/plugin-migration of ncatbot/NcatBot.
Open the folder on GitHubat commit c26300a
Plugin Migration 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 |
|---|---|---|---|---|---|---|
| Plugin Migration this skillncatbot/NcatBot | 115 | — | ~1.2k | Automated safety check: Pass | MIT | |
| Reversible MigrationJuliusBrussee/caveman | 110k | 1 repos | ~196 | Automated safety check: Pass | Apache-2.0 | |
| Database Migrationsaffaan-m/ECC | 274k | 4 repos | ~3k | Automated safety check: Pass | MIT | |
| Database Migrationsaffaan-m/ECC | 274k | 1 repos | ~2.4k | Automated safety check: Pass | MIT | |
| Safe Database Migration Patternsaffaan-m/ECC | 274k | — | ~3.3k | Automated safety check: Pass | MIT | |
| Migrate Createruvnet/ruflo | 74k | — | ~583 | Automated safety check: Notes | MIT |
JuliusBrussee/caveman
Implement reversible compatibility-safe transitions. Use for schema, data, API, protocol, configuration, or dependency migrations requiring rollback and…
affaan-m/ECC
Safe, reversible database migration patterns: forward-only production changes, expand-contract zero-downtime renames, concurrent indexes, batched backfills, and per-tool workflows for PostgreSQL…
affaan-m/ECC
Şema değişiklikleri, veri migration'ları, rollback'ler ve PostgreSQL, MySQL ve yaygın ORM'ler (Prisma, Drizzle, Django, TypeORM, golang-migrate) arasında sıfır kesinti deployment'ları için…
affaan-m/ECC
Rules and examples for safe, reversible schema changes in production: zero-downtime column and index changes, large data backfills and ORM migration workflows.
ruvnet/ruflo
Create a new sequentially numbered database migration with up/down SQL files
kortix-ai/suna
How to change the database schema in this repo. An agent skill from kortix-ai/suna.
ncatbot/NcatBot
定位 NcatBot 代码实现:锁定模块目录、找到关键类/函数、追踪调用链。当文档不够时才读代码,用搜索而非遍历。Use when: 找代码实现、哪个文件、哪个类、追踪调用链、定位 bug 行号、代码在哪、模块目录、源码定位。
ncatbot/NcatBot
维护 NcatBot 项目文档、示例、Skills 知识资产。编写/编辑文档、修复文档问题、文档结构规范审查。Use when: 写文档、改文档、新增文档、修复断链、修复索引、修复代码块标注、文档规范、文档模板、文档结构设计、docs maintenance。
ncatbot/NcatBot
整体/局部防腐检查:Docs 内部链接断裂、README 索引不同步、guide↔reference 内容不一致、examples 导入过时、Code↔Docs API 对齐。逐文件检查,最大化并发 subagent。Use when: docs 防腐、docs 链接、docs 断链、断链检查、docs 审计、docs audit、code docs 对齐、reference 过时、guide…
ncatbot/NcatBot
使用 NcatBot 框架开发 QQ 机器人或跨平台 Bot。当用户需要快速体验、创建插件、注册事件处理、发送消息、调用 Bot API、使用 Mixin/Hook、使用 CLI 工具、编写插件测试、或调试运行问题时触发此技能。Use when: 开发…
ncatbot/NcatBot
发布 NcatBot 新版本到 PyPI 和 GitHub Release,或仅编排 Commit 推送到 main。从工作区变更编排 commit 到最终发布的全链路流程。Use when: 发版、release、发布、changelog、版本号、pick commits、挑选提交、release notes、编排 commit、push、推送。
ncatbot/NcatBot
检查、报告、修复 Skills 间链接内容不同步,以及 Skills↔Docs 内容链接不同步。逐文件检查,最大化并发 subagent。Use when: skill 同步、skill 断链、skill 引用、skill 过时、skill audit、skills 一致性、skill 检查、skill↔docs。
将 NcatBot 4.4/4.5 版本插件迁移到 5.0。包括导入路径、注册方式、Config/Data API、事件类型、消息构造的全面映射。Use when: 迁移插件、升级插件、4 转 5、老版本、旧版本、migration、upgrade、plugin migration、版本升级。. Plugin Migration is an agent skill from ncatbot/NcatBot.
Plugin Migration fits situations like: : 迁移插件、升级插件、4 转 5、老版本、旧版本、migration、upgrade、plugin migration、版本升级.
Run `npx skills add ncatbot/NcatBot --skill plugin-migration -a claude-code`. Or copy the skill folder (.agents/skills/plugin-migration in ncatbot/NcatBot) into .claude/skills/plugin-migration in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ncatbot/NcatBot --skill plugin-migration -a codex`. Or copy the skill folder (.agents/skills/plugin-migration in ncatbot/NcatBot) into .agents/skills/plugin-migration 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 ncatbot/NcatBot --skill plugin-migration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/plugin-migration, .gemini/skills/plugin-migration, .github/skills/plugin-migration and .opencode/skills/plugin-migration in your project.
SKILL.md names no scripts, command-line tools or credentials: Plugin Migration is instructions for the agent only.
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.
Plugin Migration is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 4.8k 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 6.7k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Plugin Migration: Reversible Migration (JuliusBrussee/caveman, 110k stars), Database Migrations (affaan-m/ECC, 274k stars), Database Migrations (affaan-m/ECC, 274k stars) and Safe Database Migration Patterns (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ncatbot (a GitHub organization) maintains it in ncatbot/NcatBot, which has 115 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 4, 2026.
Source: ncatbot/NcatBot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.