SkillAgentSearch skills...

openclaw

This guide walks through setting up the claude-mem plugin on an OpenClaw gateway. By the end, your agents will have persistent memory across sessions via system prompt context injection, and optionally a real-time observation feed streaming to a messaging channel.

Install / Use

npx skills add thedotmack/claude-mem --skill openclaw

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

100/100

Category

Automation

Supported Platforms

Claude Code

Tags

Our assessment of openclaw

openclaw scores 100/100 on our quality scale, 4th of 860 Automation skills we index (top 1%).

Its SKILL.md is 15 KB long, well organised into 34 sections with 29 code examples: a thorough specification that gives an agent plenty to work with.

With 94,599 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
30/30
Structure
20/20
Description
15/15
Adoption
20/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated today, so openclaw is actively maintained.
  • It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

Review

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands (3 minor notes below). An AI review judged it risky: The SKILL.md repeatedly instructs the agent to run curl -fsSL ... | bash, both for the cmem installer and for bun, which means executing unverified remote shell code.

  • noteInstalls by piping a downloaded script into a shellline 10
    curl -fsSL https://install.cmem.ai/openclaw.sh | bash
  • noteInstalls by piping a downloaded script into a shellline 20
    curl -fsSL https://install.cmem.ai/openclaw.sh | bash -s -- --provider=gemini --api-key=YOUR_KEY
  • noteInstalls by piping a downloaded script into a shellline 26
    curl -fsSL https://install.cmem.ai/openclaw.sh | bash -s -- --non-interactive

AI review: risky

  • The SKILL.md repeatedly instructs the agent to run curl -fsSL ... | bash, both for the cmem installer and for bun, which means executing unverified remote shell code.
  • As a skill/rules file, these commands are directives the agent may follow, directly weakening safeguards by piping remote scripts into a shell.
  • Other content (repo cloning, npm install, plugin config, observation feed) is normal setup/documentation and not malicious by itself.

AI review by kimi-k2.7-code on 2026-09-25. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

openclaw compared with similar skills

openclaw has the highest quality score among these 4 similar skills.

SkillScoreStarsUpdatedFormat
openclaw (this skill)by thedotmack10094.6ktodaySKILL.md
Agent-Reachby Panniantong10085.3k9d agoCLAUDE.md
rufloby ruvnet10073.2ktodayCLAUDE.md
Scraplingby D4Vinci10083.4ktodayMCP Server
algorithmic-artby anthropics100177.9k2d agoSKILL.md

Frequently asked questions

How do I install openclaw?
Run npx skills add thedotmack/claude-mem --skill openclaw. The install tabs above show the steps for each supported agent.
Which AI agents does openclaw work with?
It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
Is openclaw safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands (3 minor notes below). An AI review judged it risky: The SKILL.md repeatedly instructs the agent to run curl -fsSL ... | bash, both for the cmem installer and for bun, which means executing unverified remote shell code. It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is openclaw still maintained?
The repository was last updated today, so openclaw is actively maintained.

Claude-Mem OpenClaw Plugin — Setup Guide

This guide walks through setting up the claude-mem plugin on an OpenClaw gateway. By the end, your agents will have persistent memory across sessions via system prompt context injection, and optionally a real-time observation feed streaming to a messaging channel.

Quick Install (Recommended)

Run this one-liner to install everything automatically:

curl -fsSL https://install.cmem.ai/openclaw.sh | bash

The installer handles dependency checks (Bun, uv), plugin installation, memory slot configuration, AI provider setup, worker startup, and optional observation feed configuration — all interactively.

Install with options

Pre-select your AI provider and API key to skip interactive prompts:

curl -fsSL https://install.cmem.ai/openclaw.sh | bash -s -- --provider=gemini --api-key=YOUR_KEY

For fully unattended installation (defaults to Claude Max Plan, skips observation feed):

curl -fsSL https://install.cmem.ai/openclaw.sh | bash -s -- --non-interactive

To upgrade an existing installation (preserves settings, updates plugin):

curl -fsSL https://install.cmem.ai/openclaw.sh | bash -s -- --upgrade

After installation, skip to Step 4: Restart the Gateway and Verify to confirm everything is working.


Manual Setup

The steps below are for manual installation if you prefer not to use the automated installer, or need to troubleshoot individual steps.

Step 1: Clone the Claude-Mem Repo

First, clone the claude-mem repository to a location accessible by your OpenClaw gateway. This gives you the worker service source and the plugin code.

cd /opt  # or wherever you want to keep it
git clone https://github.com/thedotmack/claude-mem.git
cd claude-mem
npm install
npm run build

You'll need bun installed for the worker service. If you don't have it:

curl -fsSL https://bun.sh/install | bash

Step 2: Get the Worker Running

The claude-mem worker is an HTTP service on port 37777. It stores observations, generates summaries, and serves the context timeline. The plugin talks to it over HTTP — it doesn't matter where the worker is running, just that it's reachable on localhost:37777.

Check if it's already running

If this machine also runs Claude Code with claude-mem installed, the worker may already be running:

curl http://localhost:37777/api/health

Got {"status":"ok"}? The worker is already running. Skip to Step 3.

Got connection refused or no response? The worker isn't running. Continue below.

If Claude Code has claude-mem installed

If claude-mem is installed as a Claude Code plugin (at ~/.claude/plugins/marketplaces/thedotmack/), start the worker from that installation:

cd ~/.claude/plugins/marketplaces/thedotmack
npm run worker:restart

Verify:

curl http://localhost:37777/api/health

Got {"status":"ok"}? You're set. Skip to Step 3.

Still not working? Check npm run worker:status for error details, or check that bun is installed and on your PATH.

If there's no Claude Code installation

Run the worker from the cloned repo:

cd /opt/claude-mem  # wherever you cloned it
npm run worker:start

Verify:

curl http://localhost:37777/api/health

Got {"status":"ok"}? You're set. Move to Step 3.

Still not working? Debug steps:

  • Check that bun is installed: bun --version
  • Check the worker status: npm run worker:status
  • Check if something else is using port 37777: lsof -i :37777
  • Check logs: npm run worker:logs (if available)
  • Try running it directly to see errors: bun plugin/scripts/worker-service.cjs start

Step 3: Add the Plugin to Your Gateway

Add the claude-mem plugin to your OpenClaw gateway configuration:

{
  "plugins": {
    "claude-mem": {
      "enabled": true,
      "config": {
        "project": "my-project",
        "syncMemoryFile": true,
        "workerPort": 37777
      }
    }
  }
}

Config fields explained

  • project (string, default: "openclaw") — The project name that scopes all observations in the memory database. Use a unique name per gateway/use-case so observations don't mix. For example, if this gateway runs a coding bot, use "coding-bot".

  • syncMemoryFile (boolean, default: true) — When enabled, the plugin injects the observation timeline into each agent's system prompt via the before_prompt_build hook. This gives agents cross-session context without writing to MEMORY.md. Set to false to disable context injection entirely (observations are still recorded).

  • syncMemoryFileExclude (string[], default: []) — Agent IDs excluded from automatic context injection. Useful for agents that curate their own memory. Observations are still recorded for excluded agents.

  • workerPort (number, default: 37777) — The port where the claude-mem worker service is listening. Only change this if you configured the worker to use a different port.


Step 4: Restart the Gateway and Verify

Restart your OpenClaw gateway so it picks up the new plugin configuration. After restart, check the gateway logs for:

[claude-mem] OpenClaw plugin loaded — v1.0.0 (worker: 127.0.0.1:37777)

If you see this, the plugin is loaded. You can also verify by running /claude_mem_status in any OpenClaw chat:

Claude-Mem Worker Status
Status: ok
Port: 37777
Active sessions: 0
Observation feed: disconnected

The observation feed shows disconnected because we haven't configured it yet. That's next.

Step 5: Verify Observations Are Being Recorded

Have an agent do some work. The plugin automatically records observations through these OpenClaw events:

  1. before_agent_start — Initializes a claude-mem session when the agent starts
  2. before_prompt_build — Injects the observation timeline into the agent's system prompt (cached for 60s)
  3. tool_result_persist — Records each tool use (Read, Write, Bash, etc.) as an observation
  4. agent_end — Summarizes the session and marks it complete

All of this happens automatically. No additional configuration needed.

To verify it's working, check the worker's viewer UI at http://localhost:37777 to see observations appearing after the agent runs.

You can also check the worker's viewer UI at http://localhost:37777 to see observations appearing in real time.

Step 6: Set Up the Observation Feed (Streaming to a Channel)

The observation feed connects to the claude-mem worker's SSE (Server-Sent Events) stream and forwards every new observation to a messaging channel in real time. Your agents learn things, and you see them learning in your Telegram/Discord/Slack/etc.

What you'll see

Every time claude-mem creates a new observation from your agent's tool usage, a message like this appears in your channel:

🧠 Claude-Mem Observation
**Implemented retry logic for API client**
Added exponential backoff with configurable max retries to handle transient failures

Pick your channel

You need two things:

  • Channel type — Must match a channel plugin already running on your OpenClaw gateway
  • Target ID — The chat/channel/user ID where messages go

Telegram

Channel type: telegram

To find your chat ID:

  1. Message @userinfobot on Telegram — https://t.me/userinfobot
  2. It replies with your numeric chat ID (e.g., 123456789)
  3. For group chats, the ID is negative (e.g., -1001234567890)
"observationFeed": {
  "enabled": true,
  "channel": "telegram",
  "to": "123456789"
}

Discord

Channel type: discord

To find your channel ID:

  1. Enable Developer Mode in Discord: Settings → Advanced → Developer Mode
  2. Right-click the target channel → Copy Channel ID
"observationFeed": {
  "enabled": true,
  "channel": "discord",
  "to": "1234567890123456789"
}

Slack

Channel type: slack

To find your channel ID (not the channel name):

  1. Open the channel in Slack
  2. Click the channel name at the top
  3. Scroll to the bottom of the channel details — the ID looks like C01ABC2DEFG
"observationFeed": {
  "enabled": true,
  "channel": "slack",
  "to": "C01ABC2DEFG"
}

Signal

Channel type: signal

Use the phone number or group ID configured in your OpenClaw gateway's Signal plugin.

"observationFeed": {
  "enabled": true,
  "channel": "signal",
  "to": "+1234567890"
}

WhatsApp

Channel type: whatsapp

Use the phone number or group JID configured in your OpenClaw gateway's WhatsApp plugin.

"observationFeed": {
  "enabled": true,
  "channel": "whatsapp",
  "to": "+1234567890"
}

LINE

Channel type: line

Use the user ID or group ID from the LINE Developer Console.

"observationFeed": {
  "enabled": true,
  "channel": "line",
  "to": "U1234567890abcdef"
}

Add it to your config

Your complete plugin config should now look like this (using Telegram as an example):

{
  "plugins": {
    "claude-mem": {
      "enabled": true,
      "config": {
        "project": "my-project",
        "syncMemoryFile": true,
        "workerPort": 37777,
        "observationFeed": {
          "enabled": true,
          "channel": "telegram",
          "to": "123456789"
        }
      }
    }
  }
}

Restart and verify

Restart the gateway. Check the logs for these three lines in order:

[claude-mem] Observation feed starting — channel: telegram, target: 123456789
[claude-mem] Connecting to SSE stream at http://localhost:37777/stream
[claude-mem] Connected to SSE stream

Then run /claude_mem_feed in any OpenClaw chat:

Claude-Mem Observation Feed
Enabled: yes
Channel: telegram
Target: 123456789
Connection: connected

If Connection shows connected, you're done. Have an agent do some work and watch observations stream to your channel.

Commands Reference

The plugin registers two commands:

/claude_mem_status

Reports worker health and current session state.

/claude_mem_status

Output:

Claude-Mem Worker Status
Status: ok
Port: 37777
Active sessions: 2
Observation feed: connected

/claude_mem_feed

Shows observation feed status. Accepts optional on/off argument.

/claude_mem_feed          — show status
/claude_mem_feed on       — request enable (update config to persist)
/claude_mem_feed off      — request disable (update config to persist)

How It All Works

OpenClaw Gateway
  │
  ├── before_agent_start ───→ Init session
  ├── before_prompt_build ──→ Inject context into system prompt
  ├── tool_result_persist ──→ Record observation
  ├── agent_end ────────────→ Summarize + Complete session
  └── gateway_start ────────→ Reset session tracking + context cache
                    │
                    ▼
         Claude-Mem Worker (localhost:37777)
           ├── POST /api/sessions/init
           ├── POST /api/sessions/observations
           ├── POST /api/sessions/summarize
           ├── POST /api/sessions/complete
           ├── GET  /api/context/inject ──→ System prompt context
           └── GET  /stream ─────────────→ SSE → Messaging channels

System prompt context injection

The plugin injects the observation timeline into each agent's system prompt via the before_prompt_build hook. The content comes from the worker's GET /api/context/inject endpoint. Context is cached for 60 seconds per project to avoid re-fetching on every LLM turn. The cache is cleared on gateway restart.

This keeps MEMORY.md under the agent's control for curated long-term memory, while the observation timeline is delivered through the system prompt.

Observation recording

Every tool use (Read, Write, Bash, etc.) is sent to the claude-mem worker as an observation. The worker's AI agent processes it into a structured observation with title, subtitle, facts, concepts, and narrative. Tools prefixed wit

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars94.6k
CategoryAutomation
Updated23h ago
Forks8.4k

Languages

TypeScript

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions