Agent SkillsMemPalace/mempalace › mempalace

mempalace

GitHub

指导安装、配置并运行 MemPalace 记忆宫殿,支持私有本地、共享大脑中心或客户端模式。涵盖环境检测、CLI 安装、拓扑选择、MCP 集成及身份认证设置。

skills/mempalace/SKILL.md MemPalace/mempalace

Trigger Scenarios

首次安装或配置 MemPalace 连接或初始化 MCP 服务 选择部署拓扑(本地/中心/客户端)

Install

npx skills add MemPalace/mempalace --skill mempalace -g -y
More Options

Use without installing

npx skills use MemPalace/mempalace@mempalace

指定 Agent (Claude Code)

npx skills add MemPalace/mempalace --skill mempalace -a claude-code -g -y

安装 repo 全部 skill

npx skills add MemPalace/mempalace --all -g -y

预览 repo 内 skill

npx skills add MemPalace/mempalace --list

SKILL.md

Frontmatter
{
    "name": "mempalace",
    "description": "Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing hub. Use for first-time setup, MCP wiring, mining, status, wings, rooms, drawers, shared-brain identity, or logstream readiness."
}

MemPalace Setup

A guided, skill-first setup for a searchable memory palace. The user may have installed this skill with npx skills add before the MemPalace Python package or MCP server exists; that is the normal bootstrap path.

Setup protocol

1. Inspect before changing anything

  • Detect the OS and current agent harness.
  • Run mempalace --version, uv --version, and an appropriate Python version check. Do not assume that an installed Python package is reachable on PATH.
  • Check for an existing palace and MCP registration. Never reinitialize or rebuild an existing palace just to make setup simpler.

2. Install the CLI when necessary

Prefer an isolated uv tool installation:

uv tool install mempalace

If uv is unavailable, use the PATH-visible Python installation:

python -m pip install mempalace

After installation, run mempalace --version. If it still is not reachable, fix PATH or use the matching uv tool run invocation before continuing.

3. Choose the topology with the user

Ask which outcome they want unless it is already clear:

  1. private local palace — one machine, local stdio MCP;
  2. shared-brain hub — this machine owns the palace and serves the fleet;
  3. client joining an existing hub — this machine connects to a hub owned elsewhere.

Also ask which project or conversation corpus should be initialized, offering the current working directory as the default. A shared-brain client does not initialize a second copy of the owner's palace.

4. Run version-correct initialization

MemPalace provides dynamic, version-correct instructions via the CLI. To get instructions for any operation:

mempalace instructions <command>

Where <command> is one of: help, init, mine, search, status.

Run the appropriate instructions command, then follow the returned instructions step by step.

For a new local palace or hub, follow mempalace instructions init, configure the selected corpus, then verify with mempalace status. For a client, skip local initialization and obtain the hub URL and bearer token from the user.

5. Configure MCP

For local stdio integrations, use the command printed by mempalace mcp. Typical registrations are:

claude mcp add mempalace -- mempalace-mcp
codex mcp add mempalace -- mempalace-mcp

For a shared-brain hub, guide the user through mempalace serve and the official shared-brain guide. Do not expose a non-loopback server without authentication. For a client joining an existing hub, configure the harness's HTTP MCP transport with the supplied bearer token; never print or store that token in project instructions, drawers, or logstream events.

Restart or reconnect the harness when required, then verify that the live MCP tool list includes MemPalace tools. Package installation alone is not proof that MCP is connected.

6. Configure shared-brain identity and coordination

When shared-brain mode is selected:

  • Agree on one stable <machine>-<harness> identity for this agent.

  • Render the canonical rules with:

    mempalace rules --agent <machine-harness>
    
  • Install the rendered marker-delimited block in the harness's durable agent instructions. Replace an existing marked block instead of appending a duplicate.

  • Check coordination access with a read-only mempalace logstream list or the equivalent MCP event-list call.

  • Ask whether the harness can maintain a background watcher. If it can, prepare the documented mempalace logstream watch --agent ... --state-file ... command for a local palace owner or synchronized replica. A remote-only MCP client must instead use repeated mempalace_event_wait calls, preserving the last event id as since_event_id; never point it at a local SQLite watcher. Explain any permission allowlisting needed. If it cannot maintain either loop, record that the agent is turn-based and must sweep its MCP inbox with mempalace_event_list on wake-up.

Do not post a test event without telling the user: logstream events are immutable. If the user approves a smoke event, address it narrowly and close the loop with an acknowledgement.

7. Report readiness

Summarize the installed version, palace location or hub URL (without secrets), MCP connection, stable agent identity, watcher mode, and the first safe next action. For active delegation, hand off to the mempalace-task skill.

Recalling past work

This skill covers setup, mining, and status. For questions about past work, prior decisions, or people that may already be filed in the palace, prefer the mempalace-recall skill — it enforces search-before-answer so the agent reads the palace instead of guessing.

Cursor-specific notes

  • The Cursor plugin auto-registers mempalace-mcp; a standalone npx skills add installation does not. Always verify the live tool list.
  • For automatic background saving every N agent turns plus session-start memory recall, also install the Cursor hooks separately by running hooks/cursor/install.sh --scope user from a cloned MemPalace repo. See the Cursor hooks guide for the full walkthrough.
  • The recommended agent_name when calling mempalace_diary_write from a Cursor session is cursor-ide (matches the precedent of claude-code and codex).

Canonical references

Version History

  • a54921f Current 2026-08-28 10:03

    从基础使用指南升级为技能优先的引导式设置协议,增加了环境检查、拓扑选择和 MCP 安全配置步骤。

  • aa89bd8 2026-07-25 05:32

Same Skill Collection

.antigravity-plugin/skills/mempalace-recall/SKILL.md
.antigravity-plugin/skills/mempalace/SKILL.md
.claude-plugin/skills/mempalace-recall/SKILL.md
.claude-plugin/skills/mempalace-task/SKILL.md
.claude-plugin/skills/mempalace/SKILL.md
integrations/openclaw/SKILL.md
skills/mempalace-recall/SKILL.md
skills/mempalace-task/SKILL.md
.codex-plugin/skills/help/SKILL.md
.codex-plugin/skills/init/SKILL.md
.codex-plugin/skills/mine/SKILL.md
.codex-plugin/skills/search/SKILL.md
.codex-plugin/skills/status/SKILL.md

Metadata

Files
0
Version
a54921f
Hash
1952a68e
Indexed
2026-07-25 05:32

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-02 22:04
浙ICP备14020137号-1 $bản đồ khách truy cập$