什么是 moonbit-refactoring?
将 MoonBit 代码重构为惯用的方式:缩小公共 API、将函数转换为方法、使用视图的模式匹配、添加循环不变量以及确保测试覆盖率而不会出现回归。在更新 MoonBit 包或重构 MoonBit API、模块或测试时使用。 来源:moonbitlang/moonbit-agent-guide。
将 MoonBit 代码重构为惯用的方式:缩小公共 API、将函数转换为方法、使用视图的模式匹配、添加循环不变量以及确保测试覆盖率而不会出现回归。在更新 MoonBit 包或重构 MoonBit API、模块或测试时使用。
通过命令行快速安装 moonbit-refactoring AI 技能到你的开发环境
来源:moonbitlang/moonbit-agent-guide。
Avoid local cleanups (renaming, pattern matching) until the high-level structure is sound.
Splitting Files Treat files in MoonBit as organizational units; move code freely within a package as long as each file stays focused on one concept.
Splitting Packages When spinning off package A into A and B:
将 MoonBit 代码重构为惯用的方式:缩小公共 API、将函数转换为方法、使用视图的模式匹配、添加循环不变量以及确保测试覆盖率而不会出现回归。在更新 MoonBit 包或重构 MoonBit API、模块或测试时使用。 来源:moonbitlang/moonbit-agent-guide。
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/moonbitlang/moonbit-agent-guide --skill moonbit-refactoring将 MoonBit 代码重构为惯用的方式:缩小公共 API、将函数转换为方法、使用视图的模式匹配、添加循环不变量以及确保测试覆盖率而不会出现回归。在更新 MoonBit 包或重构 MoonBit API、模块或测试时使用。 来源:moonbitlang/moonbit-agent-guide。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/moonbitlang/moonbit-agent-guide --skill moonbit-refactoring 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/moonbitlang/moonbit-agent-guide