openloomi-hooks

$npx mdskill add melandlabs/openloomi/openloomi-hooks

Installs or removes Claude Code lifecycle hooks that mirror events onto the Loomi Pet.

  • Users need to explicitly install hooks to enable Loomi mirroring or auto-archive.
  • Depends on a Node.js bridge script and the Claude Code settings file.
  • Decides action based on user command: install, uninstall, or status.
  • Merges or removes the plugin's hook block in ~/.claude/settings.json.

SKILL.md

.github/skills/openloomi-hooksView on GitHub ↗
---
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:

```bash
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-hooks` is **merge-no-overwrite**: only adds the plugin's block
  under `hooks.__openloomi_claude_plugin_hooks__`. Existing hooks for
  other plugins are not touched.
- `uninstall-hooks` removes only the plugin-marked block; rerunning it
  after the first time reports `removed: false`, never deletes anything
  else's hooks.
- The merge is atomic (`writeFile` to a temp file, then `rename`).
- 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.json` without explicit consent.

More from melandlabs/openloomi

SkillDescription
openloomiOpenLoomi runtime integration for Claude Code. Use when the user mentions OpenLoomi, wants to install/configure it, query their local memory via the Loomi runtime, change the Loomi Pet state, view LLM usage, run a one-shot task through the local runtime, or install the optional hooks that mirror Claude Code's lifecycle onto the Loomi Pet and auto-archive every Stop into OpenLoomi memory. Triggers: openloomi, loomi, /openloomi:*, local memory, RAG search, insights, loop, pet state, openloomi tour, guided tour, walk me through openloomi, show me everything, 一条龙, 体验一下, 带我看一下.
openloomi-apiopenloomi HTTP API reference (local-first, served from the OpenLoomi Desktop app at http://localhost:3414). Use when working with openloomi backend routes — auth, AI, files, integrations, RAG, memory, Loop, pet, workspace, platform callbacks. Triggers: API endpoints, backend routes, /api/*, local API, port 3414, integrations REST, OAuth start, RAG search, loop state, memory search, pet state, audit logs
openloomi-connectorsopenloomi Connectors tools - manage the native 7 messaging integrations and pair with the composio skill for the 1000+ apps OAuth layer (Slack, Discord, X, Gmail, Outlook, Google Calendar/Drive/Docs, GitHub, Notion, Linear, HubSpot, LinkedIn, Jira, Asana). Triggers: connect platform, integration status, list accounts, disconnect, list-accounts, status, connect, send-reply, native vs composio, 1000+ apps, list connections.
openloomi-feature-guideUse this when users ask about openloomi features, capabilities, or how to use it. Examples: 'openloomi 怎么用', '你能做什么', 'What can you do?', 'How does openloomi work?', 'Tell me about openloomi features', 'What platforms does openloomi support?', 'How do I use scheduled tasks?', 'What is Loop?', 'How does the attention agent work?', 'What is a Decision Card?', 'How do connectors work?', 'How do I extend Loop with custom types?', 'What is a classifier rule?', 'How do I plug openloomi into Claude Code / Codex?'
openloomi-installOpenLoomi install & first-use setup helper for Claude Code. Use when the user wants to install OpenLoomi, configure it, or troubleshoot `OPENLOOMI_NOT_INSTALLED` / `OPENLOOMI_NOT_FINALIZED` errors after running `/openloomi:setup` or `/openloomi:status`. Triggers: install openloomi, 配置 openloomi, setup openloomi, openloomi not installed, openloomi not finalized, install_required, install missing, what now, what next, first time, what can i do.
openloomi-loopopenloomi's Loop — the proactive execution brain that runs inside the OpenLoomi desktop app. Use this skill to inspect state, run a tick, schedule / cancel decision actions, tune preferences, and extend Loop with user-defined decision types, Composio-backed signal channels, or deterministic classifier rules. Triggers: 'openloomi loop', 'loop tick', 'loop schedule', 'loop inbox', 'loop run', 'proactive decisions', 'signal → decision → execute', 'pull signals', 'decision queue', 'register loop type', 'add loop decision type', 'register custom channel', 'add composio channel', 'add loop rule', 'register classifier rule', 'force loop type', 'dry-run loop rule', 'list my loop extensions', 'remove loop type', 'delete loop channel'
openloomi-memoryopenloomi Memory tools - search and manage the holistic context (people, projects, decisions, knowledge base, chat insights). Triggers: memory search, knowledge base, search documents, list insights, who is John, what did we decide about X, tiered memory, knowledge graph, people/projects/decisions, search-all, conversation memory
openloomi-petOpenLoomi Pet sprite & state helper for Claude Code. Use when the user wants to change their Loomi Pet state, switch theme, drop in a custom character, override individual sprites, or ask Claude to mirror its lifecycle onto the pet. Triggers: pet state, /openloomi:pet, set pet, loomi pet, pet to happy, pet to working, pet to thinking, fox sprite, capybara sprite, custom pet theme, pet-custom, pet-config, override pet sprite.
openloomi-setupRun OpenLoomi one-time setup — auto-chains install → set Codex provider → launch → wait API → mint guest session token → ready in one call. Mirrors Claude's `/openloomi:setup`. Triggers: setup openloomi, install openloomi, install and run, 一键装好并跑起来, fix openloomi, finalize openloomi, install_required, awaiting_user_action, session_initialization_required, ai_provider_required, install_failed, api_not_ready, what now, what next, first time, what can i do.
openloomi-tourWalk a brand-new OpenLoomi user through the entire pipeline in one guided session: setup health → pet reaction → connector onboarding → run a Loop tick → inspect & approve a decision card → seed Memory → optionally register a custom Loop channel / classifier rule / decision type. Triggers: openloomi tour, guided tour, walk me through openloomi, show me everything, end-to-end demo, 带我看一下, 体验一下, 一条龙, 一键体验, first time using openloomi, what's next after setup.