[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CENMZ335MSARWNSGQ33SJ2":3,"skill-same:01M7CENMZ335MSARWNSGQ33SJ2":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7CENMZ335MSARWNSGQ33SJ2","module-creator",null,"TopoRealm 模块创建指南：从 modules-template 模板起步创建一个新模块——命名规则、module.yaml 声明层、activate 可注册面（命令\u002F钩子\u002F表单）、自包含构建、安装与验证。当用户要求创建 TopoRealm 模块\u002F插件、脚手架模块，或询问模块结构时使用。","LUKAWI\u002Ftoporealm","LUKAWI","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F237365378?v=4","01M7CEMYEK2DC7S7Z99KP1R3EX","01M7CEMYF523PTP7QFE01KZSVJ",1,"MIT","https:\u002F\u002Fgithub.com\u002FLUKAWI\u002Ftoporealm\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-marketplace\u002Ftoporealm\u002Fskills\u002Fmodule-creator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: module-creator\ndescription: TopoRealm 模块创建指南：从 modules-template 模板起步创建一个新模块——命名规则、module.yaml 声明层、activate 可注册面（命令\u002F钩子\u002F表单）、自包含构建、安装与验证。当用户要求创建 TopoRealm 模块\u002F插件、脚手架模块，或询问模块结构时使用。\n---\n\n# TopoRealm 模块创建指南（module-creator）\n\n从基座自带模板起步：模板位于聚合包内 `template\u002Fmodules-template\u002F`\n（全局安装形态 = `$(npm root -g)\u002F@lukawi\u002Ftoporealm\u002Ftemplate\u002Fmodules-template`；\n本仓库内 = `packages\u002Ftoporealm\u002Ftemplate\u002Fmodules-template`）。**复制它，不要从零手写**——\n模板覆盖了模块所有可能板块，带完整注释。\n\n## 七步创建\n\n1. **复制**：`cp -r \u003C模板路径> \u002Fpath\u002Fto\u002Fyour-module`（复制到你自己的仓库，别留在\n   toporealm 仓里；`node_modules` 不要复制）。\n2. **改名**：`module.yaml` 改 `id`（全局唯一 kebab-case）、`namespace`\n   （全局唯一短小写，成为 kind\u002F命令前缀）；`package.json` 改 `name`\u002F`description`。\n   命名冲突 = 装载期命名空间冲突 \u002F 安装期 ID_EXISTS。\n3. **词汇表**：`kinds.objects\u002Frelations` 填你在图里的主类型（实际 kind =\n   `\u003Cnamespace>.\u003C主类型>`）。词汇**只增不删**（删除会让已入图数据成孤儿）。\n4. **写 activate**（`src\u002Findex.ts`）：按需注册——\n   - `api.command({name,title,target?,input}, handler)`：命令（目录 id =\n     `\u003Cnamespace>.\u003Cname>`；`title` 必填——agent 的唯一文档，要写明输入键；\n     `input` 是 JSON Schema 说明书，强烈建议写；`target` 绑定实体类型或全局）。\n   - `api.hook(\"before-commit\", fn)`：领域门禁——可 veto（返回 `{veto: 理由}`）；\n     对一切来源生效；`conversion === \"undo\"|\"redo\"` 时豁免（撤销是用户的手）。\n   - `api.hook(\"after-commit\", fn)`：响应式追加，可 `api.commit`（排队，不嵌套）。\n   - `api.form(kind, {fields})`：WebUI inspector 载荷表单。\n   - handler 内用 `api.commit\u002Fread\u002Fget\u002FbyKind`（同步内存态）；commit 以\n     `module:\u003Cid>` 来源过所有权法——**只能触碰自己 namespace.* 或公共\u002F无主 kind**。\n5. **模块技能**：`skills\u002F\u003Cname>\u002FSKILL.md` 教你的命令与领域规则（frontmatter 只要\n   `name`+`description`；技能随模块进池，`toporealm skills index` 对 agent 可见）。\n6. **构建**：`npm install && npm run build`。红线：`dist` 自包含——模块 SDK 只\n   `import type`（emit 后擦除），否则 daemon 装载会因缺 node_modules 失败。\n7. **安装与验证**：\n   - `toporealm module add \u003C目录>`（path 来源，开发期）或 `npm pack` 后装 tgz；\n     `--global` 进全局池。装了就生效（下次触达自动换载），没有第三步启用动作。\n   - 验证清单：`toporealm cmds --module \u003Cns>`（目录=注册事实）→ `toporealm skills\n     index`（技能可见）→ 跑一条命令 → 故意触发一次 veto（确认门禁与\n     `details.vetoes[].module`）→ `toporealm undo`（确认豁免）→ WebUI 看画布颜色\u002F图标。\n\n## 纪律红线（装载与执法边界）\n\n- 双层：module.yaml 只管协调，**不是执法依据**；行为全在 activate；注册面 activate\n  返回后冻结（迟到注册 = LATE_REGISTRATION）。\n- 钩子内禁止 commit（REENTRANT_COMMIT）；core 执法只有所有权法 + 悬空边两条，\n  你的领域规则全部走 before-commit 钩子。\n- 错误码封闭集：模块领域错误抛 `{code, message}` 鸭子形状由宿主认领，码只用既有集合。\n- 同名两套职责别混：`module.yaml` 的 `kinds` 是图数据词汇；`input` schema 是命令输入\n  契约——都要写，agent 靠它们干活。\n\n## 发布（可选）\n\n`prepack` 已接 build；`files` 只带 `dist`\u002F`module.yaml`\u002F`skills`\u002F`README.md`。\n包名可与模块 id 不同；包根 `package.json` 可用 `\"toporealm\": \"\u003C清单相对路径>\"`\n重定向清单位置（缺省 = 包根 module.yaml）。发布后用户 `toporealm module add \u003Cnpm 包名>` 即装。\n\n## 模板路径速查\n\n| 安装形态 | 模板位置 |\n|---|---|\n| 全局 npm（最常见） | `$(npm root -g)\u002F@lukawi\u002Ftoporealm\u002Ftemplate\u002Fmodules-template` |\n| 本仓库开发 | `packages\u002Ftoporealm\u002Ftemplate\u002Fmodules-template` |\n","# TopoRealm 模块创建指南（module-creator）\n\n从基座自带模板起步：模板位于聚合包内 `template\u002Fmodules-template\u002F`\n（全局安装形态 = `$(npm root -g)\u002F@lukawi\u002Ftoporealm\u002Ftemplate\u002Fmodules-template`；\n本仓库内 = `packages\u002Ftoporealm\u002Ftemplate\u002Fmodules-template`）。**复制它，不要从零手写**——\n模板覆盖了模块所有可能板块，带完整注释。\n\n## 七步创建\n\n1. **复制**：`cp -r \u003C模板路径> \u002Fpath\u002Fto\u002Fyour-module`（复制到你自己的仓库，别留在\n   toporealm 仓里；`node_modules` 不要复制）。\n2. **改名**：`module.yaml` 改 `id`（全局唯一 kebab-case）、`namespace`\n   （全局唯一短小写，成为 kind\u002F命令前缀）；`package.json` 改 `name`\u002F`description`。\n   命名冲突 = 装载期命名空间冲突 \u002F 安装期 ID_EXISTS。\n3. **词汇表**：`kinds.objects\u002Frelations` 填你在图里的主类型（实际 kind =\n   `\u003Cnamespace>.\u003C主类型>`）。词汇**只增不删**（删除会让已入图数据成孤儿）。\n4. **写 activate**（`src\u002Findex.ts`）：按需注册——\n   - `api.command({name,title,target?,input}, handler)`：命令（目录 id =\n     `\u003Cnamespace>.\u003Cname>`；`title` 必填——agent 的唯一文档，要写明输入键；\n     `input` 是 JSON Schema 说明书，强烈建议写；`target` 绑定实体类型或全局）。\n   - `api.hook(\"before-commit\", fn)`：领域门禁——可 veto（返回 `{veto: 理由}`）；\n     对一切来源生效；`conversion === \"undo\"|\"redo\"` 时豁免（撤销是用户的手）。\n   - `api.hook(\"after-commit\", fn)`：响应式追加，可 `api.commit`（排队，不嵌套）。\n   - `api.form(kind, {fields})`：WebUI inspector 载荷表单。\n   - handler 内用 `api.commit\u002Fread\u002Fget\u002FbyKind`（同步内存态）；commit 以\n     `module:\u003Cid>` 来源过所有权法——**只能触碰自己 namespace.* 或公共\u002F无主 kind**。\n5. **模块技能**：`skills\u002F\u003Cname>\u002FSKILL.md` 教你的命令与领域规则（frontmatter 只要\n   `name`+`description`；技能随模块进池，`toporealm skills index` 对 agent 可见）。\n6. **构建**：`npm install && npm run build`。红线：`dist` 自包含——模块 SDK 只\n   `import type`（emit 后擦除），否则 daemon 装载会因缺 node_modules 失败。\n7. **安装与验证**：\n   - `toporealm module add \u003C目录>`（path 来源，开发期）或 `npm pack` 后装 tgz；\n     `--global` 进全局池。装了就生效（下次触达自动换载），没有第三步启用动作。\n   - 验证清单：`toporealm cmds --module \u003Cns>`（目录=注册事实）→ `toporealm skills\n     index`（技能可见）→ 跑一条命令 → 故意触发一次 veto（确认门禁与\n     `details.vetoes[].module`）→ `toporealm undo`（确认豁免）→ WebUI 看画布颜色\u002F图标。\n\n## 纪律红线（装载与执法边界）\n\n- 双层：module.yaml 只管协调，**不是执法依据**；行为全在 activate；注册面 activate\n  返回后冻结（迟到注册 = LATE_REGISTRATION）。\n- 钩子内禁止 commit（REENTRANT_COMMIT）；core 执法只有所有权法 + 悬空边两条，\n  你的领域规则全部走 before-commit 钩子。\n- 错误码封闭集：模块领域错误抛 `{code, message}` 鸭子形状由宿主认领，码只用既有集合。\n- 同名两套职责别混：`module.yaml` 的 `kinds` 是图数据词汇；`input` schema 是命令输入\n  契约——都要写，agent 靠它们干活。\n\n## 发布（可选）\n\n`prepack` 已接 build；`files` 只带 `dist`\u002F`module.yaml`\u002F`skills`\u002F`README.md`。\n包名可与模块 id 不同；包根 `package.json` 可用 `\"toporealm\": \"\u003C清单相对路径>\"`\n重定向清单位置（缺省 = 包根 module.yaml）。发布后用户 `toporealm module add \u003Cnpm 包名>` 即装。\n\n## 模板路径速查\n\n| 安装形态 | 模板位置 |\n|---|---|\n| 全局 npm（最常见） | `$(npm root -g)\u002F@lukawi\u002Ftoporealm\u002Ftemplate\u002Fmodules-template` |\n| 本仓库开发 | `packages\u002Ftoporealm\u002Ftemplate\u002Fmodules-template` |\n",{"name":5,"description":7},"main","2c58c433fadb7967584214cb128e6f2e287aef01","plugins\u002Fdev-marketplace\u002Ftoporealm\u002Fskills\u002Fmodule-creator",0,"https:\u002F\u002Fgithub.com\u002FLUKAWI\u002Ftoporealm","https:\u002F\u002Fgithub.com\u002FLUKAWI","2026-09-30 20:26:11",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add LUKAWI\u002Ftoporealm --skill module-creator",{"tool":36,"command":37},"bunx","bunx skills add LUKAWI\u002Ftoporealm --skill module-creator",{"tool":39,"command":40},"pnpm","pnpm dlx skills add LUKAWI\u002Ftoporealm --skill module-creator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLUKAWI\u002Ftoporealm\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-marketplace\u002Ftoporealm\u002Fskills\u002Fmodule-creator\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M7CEP2E796YMCYXEB31NCFHR","example","Create example.card objects only when the current TopoRealm graph enables the example fixture module.","https:\u002F\u002Fgithub.com\u002FLUKAWI\u002Ftoporealm\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fpackages\u002Fexample-module\u002Fskills\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M7CEP12K3Y504FY10PQNAA50","skilled-demo","Skilled fixture 模块的演示技能（host sync 双宿主投影用）。","https:\u002F\u002Fgithub.com\u002FLUKAWI\u002Ftoporealm\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fmodules\u002Fskilled\u002Fskills\u002Fskilled-demo\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M7CENYM0VRED7YDAW0WGH0CY","toporealm","TopoRealm 图工作空间的 CLI 操作手册——建图选图、增删改查、撤销重做、模块能力动态发现。凡会话涉及图工作空间、TopoRealm、建图、任务拓扑、对象关系、工作流执行、undo 撤销、模块安装或技能发现——哪怕用户没明说\"图\"——都按本技能用 toporealm CLI 操作，绝不直接读写图文件。","https:\u002F\u002Fgithub.com\u002FLUKAWI\u002Ftoporealm\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-marketplace\u002Ftoporealm\u002Fskills\u002Ftoporealm\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M7CENV9X164JTQ2GWJ3NQPZX","toporealm-ops","TopoRealm 图生命周期运维——模块安装卸载与损坏自愈（module add\u002Frm\u002Flist）、0.x 旧图迁移（migrate）、WebUI 启动（serve）、多图与专注图切换纪律、TOPOREALM_* 环境变量体系、daemon 排障（启动失败死因、空闲退出、socket\u002F命名管道）。当用户要装\u002F卸模块、迁旧图、起 WebUI、切图配环境变量，或 daemon 连不上\u002F启动失败\u002FWebUI 白屏时使用。Do not 讲日常读写图的动词用法（那是 toporealm 技能的事）；Do not 触及图内数据建模（那是 toporealm-design 技能的事）。","https:\u002F\u002Fgithub.com\u002FLUKAWI\u002Ftoporealm\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-marketplace\u002Ftoporealm\u002Fskills\u002Ftoporealm-ops\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7CENRDRNXR1G994F6SMXXTS","toporealm-design","TopoRealm 图建模的机械原则——对象与关系怎么分、kind 粒度、payload 形状、id 策略与数据纪律。设计或评审图结构、决定一笔数据该 add 还是 link、规划 kind 与 payload、或遇到 UNKNOWN_KIND \u002F DANGLING_RELATION \u002F OWNERSHIP_VIOLATION 需要归因时使用。Do not 教任何业务方法论；Do not 替代 toporealm 技能的动词语法手册。","https:\u002F\u002Fgithub.com\u002FLUKAWI\u002Ftoporealm\u002Fblob\u002Fmain\u002Fplugins\u002Fdev-marketplace\u002Ftoporealm\u002Fskills\u002Ftoporealm-design\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M7CENHSFQCPADH7ZH2Q1P8VC","my-module","my-module 模块的使用方法：my.add-card 建卡（title 必填，钩子门禁拦截空标题）、my.stats 统计、my.card 表单投影。当用户要在图里建卡\u002F查卡，或会话中出现 my-module 时使用。","https:\u002F\u002Fgithub.com\u002FLUKAWI\u002Ftoporealm\u002Fblob\u002Fmain\u002Fpackages\u002Ftoporealm\u002Ftemplate\u002Fmodules-template\u002Fskills\u002Fmy-module\u002FSKILL.md",[],[]]