Agent Skills
› melandlabs/openloomi
› openloomi-hooks
openloomi-hooks
GitHub安装或管理 OpenLoomi 与 Claude Code 的生命周期挂钩。支持将会话事件映射至 Loomi Pet,并自动归档停止事件。提供安装、卸载及状态检查功能,确保配置安全合并且不覆盖其他插件设置。
触发场景
用户希望将 Claude Code 生命周期映射到 Loomi Pet
需要安装 hooks 以启用自动化归档
执行 /openloomi:hooks install/uninstall/status 命令
查询 hooks 安装状态
安装
npx skills add melandlabs/openloomi --skill openloomi-hooks -g -y
SKILL.md
Frontmatter
{
"name": "openloomi-hooks",
"description": "OpenLoomi × Claude Code hooks installer. Use when the user wants Claude Code's lifecycle (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop, SubagentStart, SubagentStop, Notification) to mirror onto the Loomi Pet, or wants to auto-archive every Stop into OpenLoomi memory. Triggers: install hooks, \/openloomi:hooks, hooks install, hooks uninstall, hooks status, mirror claude on pet, auto-archive stop.",
"allowed-tools": "Bash(node ${CLAUDE_PLUGIN_ROOT}\/scripts\/loomi-bridge.mjs *)"
}
OpenLoomi Hooks Sub-skill
The plugin ships a hook bundle in hooks/hooks.json but never installs it
automatically. Users must explicitly run one of:
/openloomi:hooks install— merge the bundle into~/.claude/settings.json/openloomi:hooks uninstall— strip only the plugin's block (other plugins' hooks are preserved)/openloomi:hooks status— report whether the bundle is currently active
Under the hood this calls:
node ${CLAUDE_PLUGIN_ROOT}/scripts/loomi-bridge.mjs install-hooks
node ${CLAUDE_PLUGIN_ROOT}/scripts/loomi-bridge.mjs uninstall-hooks
node ${CLAUDE_PLUGIN_ROOT}/scripts/loomi-bridge.mjs hooks-status
Safety guarantees
install-hooksis merge-no-overwrite: only adds the plugin's block underhooks.__openloomi_claude_plugin_hooks__. Existing hooks for other plugins are not touched.uninstall-hooksremoves only the plugin-marked block; rerunning it after the first time reportsremoved: false, never deletes anything else's hooks.- The merge is atomic (
writeFileto a temp file, thenrename). - The Stop hook always exits 0 — archive failures are reported as
JSON
{continue: true, _openloomi: {archive: "skipped", reason: ...}}so they can never block Claude Code's response stream.
Suggested user prompt
This plugin can mirror Claude Code's lifecycle onto your Loomi Pet. To enable this, run
/openloomi:hooks install. To disable, run/openloomi:hooks uninstall. The plugin never modifies your~/.claude/settings.jsonwithout explicit consent.
版本历史
- 23e340f 当前 2026-07-19 17:58


