Install
openclaw skills install @rainypilgrimage-beep/persistent-memory-skillUse when a user wants cross-session personal context shared by compatible AI agents, or asks to load, save, inspect, archive, recover, clean up, or upgrade local memory files.
openclaw skills install @rainypilgrimage-beep/persistent-memory-skillPersistent Memory is a transparent local context layer. It stores reviewed user context as Markdown files so compatible agents can read the same source of truth.
v0.7.1: This release hardens lifecycle safety and existing-memory upgrades. It does not add Summary-first or section-level loading.
The skill is an instruction set, not a background service. Shared memory works only when all of these conditions hold:
~/.persistent-memory/ path;Platform memory may coexist. Persistent Memory does not import historical chats or replace an agent's built-in memory.
~/.persistent-memory/
~/.persistent-memory/
├── _core/ # Baseline context; loaded when the skill is activated
│ ├── profile.md
│ └── preferences.md
├── _index.md # One-line routes for active on-demand memory
├── projects/ # Active, on-demand Markdown memory
├── notes/ # Active, on-demand Markdown memory
└── _archive/ # Excluded from normal loading
├── _index.md # Archive and trash records
└── _trash/ # Recoverable deletion buffer
Store stable context, decisions, concise project state, and pointers to source material. Keep raw repositories, downloads, media files, and datasets in their project workspaces; store a short description and path in memory instead.
Trigger: load memory, 加载记忆, what do you know about me, or 我的背景.
When this skill is active:
_core/._index.md.Never read _archive/ or _archive/_index.md during normal loading.
Trigger: the active conversation matches an entry in _index.md.
Trigger: remember this, 记住这个, save this, 更新记忆, update memory, update my profile, or add to notes.
_index.md for active on-demand files.For a vague update request, list explicit facts and inferred patterns separately, then wait for the user to approve individual items.
When the memory root does not exist and the user confirms the first save:
_core/, projects/, notes/, _archive/, and _archive/_trash/._index.md and _archive/_index.md.Trigger: memory upgrade or 升级记忆.
Use this for a memory root created before lifecycle support, or whenever _archive/, _archive/_trash/, or _archive/_index.md is missing.
Before archive, delete, recover, or memory health, verify that lifecycle structure exists. If it does not, direct the user to memory upgrade; do not perform the requested lifecycle mutation.
Every lifecycle command requires this validation before any move:
projects/old.md....~/.persistent-memory/._core/, _index.md, _archive/_index.md, hidden metadata, or lifecycle control directories.Trigger: archive <relative-path>, 归档 <相对路径>, or move to archive.
Archive only an active on-demand file that passed the safety contract.
Use these categories:
After confirmation:
_archive/<relative-path>._index.md entry._archive/_index.md.Trigger: delete <relative-path>, 删除 <相对路径>, or remove file.
Delete only a previously archived file. If the user supplies an active file, explain that it must be archived first and offer the archive preview instead.
After confirmation:
_archive/<relative-path> to _archive/_trash/<relative-path>._archive/_index.md.Never permanently remove a file automatically. During a health check, list expired trash items and wait for a separate explicit confirmation before permanent removal.
Trigger: recover <relative-path>, 恢复 <相对路径>, or restore file.
Recover only from _archive/<relative-path> or _archive/_trash/<relative-path> after the safety contract passes.
Before the recovery preview, retrieve the saved exact active index line. If a legacy archive record lacks that line, read the archived file, propose a replacement line, and obtain confirmation; the agent must not guess.
After confirmation:
_index.md entry exactly._archive/_index.md record.Trigger: memory health, 记忆体检, or clean up memory.
_core/ or control files.Also list expired trash items separately and request a separate explicit confirmation before permanent deletion.
Trigger: memory status, 记忆状态, what's saved, or 存了什么.
Read _core/ and _index.md, then report active file count, approximate size, and one-line summaries. Do not load archive contents unless the user explicitly asks.
_core/ small and protected._index.md synchronized with active on-demand memory.