模块 2:模块化架构与扩展点

新增一个扩展模块并验证 Hook 生命周期。

命令以模板为主,执行前请替换为你自己的 ID、密钥和地址。

实操步骤(可直接执行)

每一步都先执行命令,再记录结果和问题。

任务 1:Scaffold module

执行:
zeroclaw module create custom-audit

可复制命令
zeroclaw module create custom-audit

任务 2:Register module

执行:
zeroclaw module enable custom-audit

可复制命令
zeroclaw module enable custom-audit

任务 3:Run integration test

执行:
zeroclaw test --module custom-audit

可复制命令
zeroclaw test --module custom-audit

任务 4:Verify hook order

执行:
zeroclaw logs | rg "beforeHook|afterHook"

可复制命令
zeroclaw logs | rg "beforeHook|afterHook"

完成本模块后继续下一模块

建议把本页命令沉淀成团队 Runbook。

ZeroClaw 模块 2:模块化架构与扩展点 | BestClaw