← 返回 Skills 市场
ianthereal

ClawMem

作者 Ian · GitHub ↗ · v0.2.4 · MIT-0
cross-platform ⚠ suspicious
317
总下载
0
收藏
0
当前安装
5
版本数
在 OpenClaw 中安装
/install clawmem
功能描述
Bootstrap, repair, and verify the ClawMem OpenClaw plugin. Use when ClawMem is not yet installed, not selected as the active memory plugin, missing per-agent...
使用说明 (SKILL.md)

ClawMem Setup

This file is only for installing, activating, verifying, or repairing ClawMem.

Once the plugin is active, stop using this bootstrap document as the runtime memory playbook. The plugin now ships a bundled clawmem skill that handles:

  • the turn-by-turn recall and save loop
  • shared and team memory routing
  • the runtime mental model, communication, and console-link guidance
  • schema and label discipline
  • raw gh and curl fallback flows

Install and activate the plugin

openclaw plugins install @clawmem-ai/clawmem
openclaw plugins enable clawmem
openclaw config set plugins.slots.memory clawmem
openclaw config validate
openclaw gateway restart

If a gateway restart may interrupt the current reply stream, send the user a short notice before restarting.

Verify activation

First verify that ClawMem is selected as the active memory plugin:

openclaw status
python3 - \x3C\x3C'PY'
import json, os, subprocess
cfg_path = subprocess.check_output(["openclaw", "config", "file"], text=True).strip()
with open(os.path.expanduser(cfg_path)) as f:
    root = json.load(f)
slots = (root.get("plugins") or {}).get("slots") or {}
print(f"plugins.slots.memory = {slots.get('memory', 'MISSING')}")
PY

Expected:

  • OpenClaw status shows ClawMem as the active memory plugin
  • plugins.slots.memory = clawmem

If the active memory slot is not clawmem, fix that first and restart the gateway again.

Verify per-agent provisioning

ClawMem provisions credentials per agent identity and writes them back to:

openclaw.json -> plugins.entries.clawmem.config.agents.\x3CagentId>

Check the current agent route:

AGENT_ID="${OPENCLAW_AGENT_ID:-main}"
python3 - "$AGENT_ID" \x3C\x3C'PY'
import json, os, subprocess, sys
agent_id = sys.argv[1]
cfg_path = subprocess.check_output(["openclaw", "config", "file"], text=True).strip()
with open(os.path.expanduser(cfg_path)) as f:
    root = json.load(f)
cfg = (((root.get("plugins") or {}).get("entries") or {}).get("clawmem") or {}).get("config") or {}
route = (cfg.get("agents") or {}).get(agent_id) or {}
base_url = route.get("baseUrl") or cfg.get("baseUrl") or "MISSING"
default_repo = route.get("defaultRepo") or route.get("repo") or cfg.get("defaultRepo") or cfg.get("repo") or "MISSING"
token = "SET" if route.get("token") else "MISSING"
print(f"agentId: {agent_id}")
print(f"baseUrl: {base_url}")
print(f"defaultRepo: {default_repo}")
print(f"token: {token}")
PY

If defaultRepo or token is MISSING, the current agent has not been provisioned yet. Trigger one real turn with that agent so the plugin can finish provisioning, then rerun the check.

Verify read access without manual login

After provisioning, confirm the current route can read ClawMem without interactive gh auth login:

AGENT_ID="${OPENCLAW_AGENT_ID:-main}"
eval "$(
  python3 - "$AGENT_ID" \x3C\x3C'PY'
import json, os, shlex, subprocess, sys
agent_id = sys.argv[1]
cfg_path = subprocess.check_output(["openclaw", "config", "file"], text=True).strip()
with open(os.path.expanduser(cfg_path)) as f:
    root = json.load(f)
cfg = (((root.get("plugins") or {}).get("entries") or {}).get("clawmem") or {}).get("config") or {}
route = (cfg.get("agents") or {}).get(agent_id) or {}
base_url = (route.get("baseUrl") or cfg.get("baseUrl") or "https://git.clawmem.ai/api/v3").rstrip("/")
if not base_url.endswith("/api/v3"):
    base_url = f"{base_url}/api/v3"
repo = route.get("defaultRepo") or route.get("repo") or cfg.get("defaultRepo") or cfg.get("repo") or ""
token = route.get("token") or ""
host = base_url.removesuffix("/api/v3").replace("https://", "").replace("http://", "")
for key, value in {
    "CLAWMEM_BASE_URL": base_url,
    "CLAWMEM_HOST": host,
    "CLAWMEM_REPO": repo,
    "CLAWMEM_TOKEN": token,
}.items():
    print(f"export {key}={shlex.quote(value)}")
PY
)"

test -n "$CLAWMEM_REPO" || { echo "Current agent route has no repo yet"; exit 1; }
test -n "$CLAWMEM_TOKEN" || { echo "Current agent route has no token yet"; exit 1; }

GH_HOST="$CLAWMEM_HOST" GH_ENTERPRISE_TOKEN="$CLAWMEM_TOKEN" \
  gh issue list --repo "$CLAWMEM_REPO" --limit 1 --json number,title

If gh is unavailable or not the official GitHub CLI, use curl instead:

curl -sf -H "Authorization: token $CLAWMEM_TOKEN" \
  "$CLAWMEM_BASE_URL/repos/$CLAWMEM_REPO/issues?state=open&per_page=1&type=issues" | \
  jq 'map({number,title})'

If either command returns JSON, even [], the route is usable.

What happens after install

After ClawMem is active:

  • the bundled clawmem skill becomes the runtime source of truth
  • the agent should use plugin tools such as memory_recall, memory_store, memory_update, memory_list, and memory_forget
  • setup and repair guidance stays in this bootstrap file
  • day-to-day memory behavior moves to the bundled plugin skill and its references

Do not keep pasting large setup instructions into every session once the plugin is already active.

Optional compatibility files

If your OpenClaw environment still relies on file-injected reminders, keep them short:

Optional SOUL.md snippet

## Memory System — ClawMem
I use ClawMem as my memory system.
When prior context may help, I search ClawMem before answering.

Optional AGENTS.md snippet

Before ending every response, ask: "Did I learn anything durable this turn?"
If yes or unsure, save it to ClawMem now.

These compatibility snippets are optional. The bundled plugin skill is the primary runtime behavior source.

Repair checklist

  • If plugins.slots.memory is wrong, set it back to clawmem, validate config, and restart the gateway.
  • If defaultRepo or token is missing, trigger a real turn with the current agent and rerun provisioning checks.
  • If a fresh session gets 401 Unauthorized, reread the current route instead of assuming the previous repo or token still applies.
  • If ClawMem is active but the agent is still not using it well, inspect the bundled clawmem skill rather than expanding this bootstrap document again.

Definition of done

  • ClawMem is installed and enabled
  • plugins.slots.memory = clawmem
  • The current agent route has a repo and token
  • Read access works without manual login
  • The bundled clawmem skill is available for runtime memory behavior
安全使用建议
This SKILL.md mostly does what it claims (install/verify a ClawMem plugin), but it asks you to read and export plugin tokens and to run commands that will use those tokens. Before running: 1) verify the source of the @clawmem-ai/clawmem package (review its repository or release host); 2) ensure the required tools (openclaw, python3, gh or curl, jq) are present and come from trusted installs; 3) inspect your openclaw config file yourself (openclaw config file) to see what tokens would be read or exported; 4) avoid running the exports/automation blindly — run the verification steps manually the first time; 5) if you plan to let an agent invoke this skill autonomously, be aware it will be reading local plugin configuration and could access tokens — only allow autonomous runs if you fully trust the skill and its source. If you want a cleaner safety profile, ask the skill author to declare required binaries/env vars and explain where tokens are stored and why each read is necessary.
功能分析
Type: OpenClaw Skill Name: clawmem Version: 0.2.4 The skill bundle is a bootstrap and diagnostic utility for the ClawMem plugin. It provides instructions and scripts for the agent to install the '@clawmem-ai/clawmem' plugin, configure the system's memory slot, and verify API connectivity to 'git.clawmem.ai' using authentication tokens retrieved from the local OpenClaw configuration. The operations, including shell execution and network requests, are transparently documented and strictly aligned with the stated purpose of provisioning and repairing the memory integration.
能力评估
Purpose & Capability
The SKILL.md content is consistent with a bootstrap/repair utility for a memory plugin (it calls openclaw to install/enable the plugin, checks plugin slots, and verifies per-agent provisioning). However, the skill metadata declares no required binaries or env vars while the document clearly expects tools like openclaw, python3, gh (or curl + jq), and optional OPENCLAW_AGENT_ID. That mismatch is an omission in declared requirements.
Instruction Scope
The instructions explicitly read the OpenClaw configuration file and per-agent plugin entries, extract tokens and repo names, print shell export lines, and run GH/curl calls using those tokens. Those actions are necessary for verifying provisioning, but they involve accessing potentially sensitive configuration and token data. The instructions also suggest restarting the gateway — an action that may interrupt service and should be done with caution.
Install Mechanism
This is an instruction-only skill with no install spec or code files; nothing is written by the skill itself. The install actions in the document are commands the operator is expected to run (openclaw plugins install ...). Not having an install spec reduces the skill's direct attack surface, but it also means the document relies on external binaries whose provenance you must verify.
Credentials
Although the registry lists no required environment variables, the runtime steps reference OPENCLAW_AGENT_ID and produce CLAWMEM_* exports from stored plugin config values (baseUrl, repo, token). The playbook reads secrets (tokens) from local config and uses them to query an API; this is proportionate to provisioning verification but is sensitive and should be explicitly declared and reviewed before automated execution.
Persistence & Privilege
The skill is not marked always:true and does not request modifying other skills or system-wide agent settings beyond telling the operator to set the plugin slot and restart the gateway. It relies on the operator running commands; it does not itself persist code or credentials on disk.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install clawmem
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /clawmem 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.2.4
clawmem-setup v0.2.4 - Adds comprehensive SKILL.md focused on ClawMem installation, activation, verification, and repair. - Separates setup/repair guidance from runtime memory operations now managed by the bundled `clawmem` plugin skill. - Includes step-by-step instructions and Python snippets for verifying activation, agent provisioning, and read access. - Provides optional SOUL.md and AGENTS.md snippets for compatibility with prior systems. - Lists a repair checklist and clear "definition of done" for successful setup.
v0.2.3
ClawMem 0.2.3 Changelog - Updated onboarding instructions: clarified plugin activation steps and explicit check for ClawMem as the active memory backend. - Added and detailed usage of new plugin memory tools (`memory_repos`, `memory_repo_create`, `memory_list`, etc.) as the default interface for memory actions. - Enhanced shell helper (`clawmem_exports`) to support repo overrides and provide both default and current repo values. - Updated documentation to emphasize per-agent identity routing and repo config, replacing the generic `repo`/`token` with `defaultRepo` and tool-first behavior. - Removed unused file: `favicon.svg`.
v0.2.2
clawmem 0.2.2 - Initial public release of skill documentation (SKILL.md). - Details behavior, setup, and required agent memory interaction loop. - Includes per-agent memory routing and onboarding process. - No code changes; documentation for correct use and onboarding of ClawMem memory in OpenClaw.
v0.2.1
clawmem 0.2.1 - Updated first-run onboarding instructions in the SKILL.md, clarifying mandatory steps. - Improved clarity on how to install and enable the clawmem skill in the agent skill library (Step 3). - Added a new onboarding step to write behavior rules to TOOLS.md, with all-caps warnings emphasizing critical actions. - Minor adjustments to onboarding order and persistent storage description for better usability.
v0.2.0
ClawMem 0.2.0 — Major Update - Establishes ClawMem as the mandatory, default long-term memory for all OpenClaw agents, with strong emphasis to always consult and update it on every turn. - Clarifies automated plugin behavior vs. required manual agent workflows, with a detailed mandatory turn loop for memory recall and saving. - Introduces robust agent-specific routing and provisioning via openclaw config, including provided shell helpers for runtime setup. - Formalizes three memory persistence layers (SOUL.md, AGENTS.md, ClawMem Issues) with clear guidance on what belongs in each. - Adds explicit, step-by-step first-run onboarding and verification procedures for plugin installation, provisioning, and skill registration.
元数据
Slug clawmem
版本 0.2.4
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 5
常见问题

ClawMem 是什么?

Bootstrap, repair, and verify the ClawMem OpenClaw plugin. Use when ClawMem is not yet installed, not selected as the active memory plugin, missing per-agent... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 317 次。

如何安装 ClawMem?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install clawmem」即可一键安装,无需额外配置。

ClawMem 是免费的吗?

是的,ClawMem 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ClawMem 支持哪些平台?

ClawMem 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ClawMem?

由 Ian(@ianthereal)开发并维护,当前版本 v0.2.4。

💬 留言讨论