feat: add OpenClaw/ClawHub skill for MemPalace - #491
Conversation
Complete OpenClaw skill exposing all MCP tools with session protocol, auto-install spec, and setup instructions for OpenClaw + other MCP hosts. Covers all 20 tools: search, check_duplicate, status, list_wings, list_rooms, get_taxonomy, get_aaak_spec, kg_query, kg_add, kg_invalidate, kg_timeline, kg_stats, traverse, find_tunnels, graph_stats, add_drawer, delete_drawer, diary_write, diary_read. Based on PR #207 by @wanikua — updated to v3.1.0, added missing tools (check_duplicate, get_aaak_spec), expanded parameter docs, added OpenClaw CLI setup command. Co-Authored-By: wanikua <wanikua@users.noreply.github.com>
web3guru888
left a comment
There was a problem hiding this comment.
Really well done, @bensig. We've been running MemPalace as a production memory layer for a while now and this SKILL.md hits the important things.
The 5-step session protocol is the part I'd highlight most. Specifically: search before responding and diary after session are the two habits that make the biggest difference in practice. We follow something almost identical and it's what keeps memory from drifting into vague soup over time. Good to see it codified formally.
The query sanitization guidance is also exactly right. We ran into system prompt leakage into queries early on (opened #385 about it) — keeping queries short and stripped of system context is non-obvious to new users, so making it explicit in the skill docs is genuinely useful.
One minor note on : the threshold default of may be conservative in practice. We run a tiered approach — hard dedup at , soft dedup at — and catch substantially more near-duplicates as a result. Worth mentioning in the param docs that lowering toward – often improves recall without meaningfully increasing false positives.
The direction defaulting to is the right call (aligns with #492).
Is the plan to publish this to ClawHub as a discoverable skill, or is this primarily docs for manual setup? The test plan mentions so guessing yes — just wondering about the timeline.
web3guru888
left a comment
There was a problem hiding this comment.
Really well done, @bensig. We've been running MemPalace as a production memory layer for a while now and this SKILL.md hits the important things.
The 5-step session protocol is the part I'd highlight most. Specifically: search before responding and diary after session are the two habits that make the biggest difference in practice. We follow something almost identical and it's what keeps memory from drifting into vague soup over time. Good to see it codified formally.
The query sanitization guidance is also exactly right. We ran into system prompt leakage into queries early on (opened #385 about it) — keeping queries short and stripped of system context is non-obvious to new users, so making it explicit in the skill docs is genuinely useful.
One minor note on mempalace_check_duplicate: the threshold default of 0.9 may be conservative in practice. We run a tiered approach — hard dedup at 0.86, soft dedup at 0.55 — and catch substantially more near-duplicates as a result. Worth mentioning in the param docs that lowering toward 0.85–0.87 often improves recall without meaningfully increasing false positives.
The kg_query direction defaulting to "both" is the right call (aligns with #492).
Is the plan to publish this to ClawHub as a discoverable skill, or is this primarily docs for manual setup? The test plan mentions clawhub skill publish so guessing yes — just wondering about the timeline.
|
Thanks — glad the protocol matches what you've been running in production. That's the best validation. Good call on the dedup threshold. Updated the On ClawHub — yes, plan is to publish as soon as this merges. |
2953a55 to
4729221
Compare
4729221 to
3a0f782
Compare
|
Good to hear on the ClawHub publish — same-day discoverability via On tiered dedup in the MCP tool itself: if you do pursue that as a follow-up, the key design decision is where the threshold config lives. We store |
Following up on the "mirror openclaw" choice in the previous commit: investigated PR MemPalace/mempalace#491 (the one that introduced ``integrations/openclaw/SKILL.md`` in April 2026) and discovered the "mirror" rationale was wrong. * At #491 merge time: mempalace had 19 ``tool_*`` functions; the skill covered all 19. * As of today: mempalace has 32 ``tool_*`` functions; the skill still covers only the original 19. The "intentionally omitted" tools I justified as deliberate design choices (drawer CRUD beyond add, tunnel management) **didn't exist yet** when openclaw was written. The skill is a stale snapshot, not a curated agent surface. Restored the 8 agent-facing tools openclaw missed by accident of timing: * Drawer CRUD: ``update_drawer``, ``list_drawers``, ``get_drawer`` (the original ``add_drawer`` agent reproduction asked for ``update_drawer`` specifically — issue #206's wording "drawer CRUD" meant all of these, not just add+delete) * Tunnel management: ``create_tunnel``, ``list_tunnels``, ``delete_tunnel``, ``follow_tunnels`` * Session: ``memories_filed_away`` Still omitted (genuine admin / not agent-facing): * ``sync`` — admin: mines a project directory into the palace; writes to disk; reserve for explicit user-initiated terminal commands. * ``hook_settings`` / ``reconnect`` — admin operations. * ``status_via_sqlite`` (internal status fallback) and ``error`` (response-shape helper) — not user-facing tools. Tests pin the 27-name set. Module-level comment cross-references MemPalace/mempalace#491 so the next person to revisit this knows why the count diverged from openclaw's.
…not curated Following up on the prior commit's "mirror openclaw" rationale: investigated MemPalace#491 (the PR that introduced ``integrations/openclaw/SKILL.md``) and discovered the rationale was wrong. * At MemPalace#491 merge time (Apr 2026): mempalace had 19 ``tool_*`` functions; the skill covered all 19. * As of today: mempalace has 32 ``tool_*`` functions; the skill still covers only the original 19. The "intentionally omitted" tools I justified as deliberate design (drawer CRUD beyond add, tunnel management) **didn't exist yet** when openclaw was written. The skill is a stale snapshot; carrying its omissions forward handicaps Hermes without principle. Restored the 8 agent-facing tools openclaw missed by accident of timing — drawer CRUD (``update_drawer`` / ``list_drawers`` / ``get_drawer``), tunnel management (``create_tunnel`` / ``list_tunnels`` / ``delete_tunnel`` / ``follow_tunnels``), and session-level (``memories_filed_away``). Still omitted (genuine admin, not stale coverage): * ``sync`` — mines a project directory into the palace; writes to disk; reserve for user-initiated terminal commands. * ``hook_settings`` / ``reconnect`` — admin operations. Dispatch refactored — the 19 new-style tools (those delegating to ``mempalace.mcp_server.tool_*``) now route through a small helper ``_dispatch_mcp_passthrough`` that derives the function name from the tool name (``mempalace_X`` → ``tool_X``) with one explicit remap (``mempalace_traverse`` → ``tool_traverse_graph`` per mempalace's naming). Keeps ``handle_tool_call`` under the McCabe complexity ceiling and makes adding tools a one-line change in the allowlist.
Summary
Complete OpenClaw skill exposing all 20 MCP tools with a 5-step session protocol, auto-install via
uv, and setup instructions for OpenClaw + other MCP hosts.Based on PR #207 by @wanikua — updated to v3.1.0 with the following additions:
mempalace_check_duplicate,mempalace_get_aaak_specopenclaw mcp set)Closes #206. Supersedes #207.
Test plan
clawhub skill validate ./integrations/openclaw~/.openclaw/skills/mempalace/openclaw mcp set mempalace '{"command":"python3","args":["-m","mempalace.mcp_server"]}'clawhub skill publish ./integrations/openclaw --slug mempalaceCredit: @wanikua for the original skill implementation in #207.