← Back to Skills Marketplace
1824
Downloads
2
Stars
16
Active Installs
1
Versions
Install in OpenClaw
/install multi-user-long-term-memory
Description
为多个用户创建和管理独立的长期记忆文件,记录偏好和上下文并按用户名隔离存储。
README (SKILL.md)
Multi-User Long-Term Memory
为多个用户维护独立的长期记忆文件。
功能
- 为不同用户创建独立的长期记忆文件
- 记录用户的偏好、上下文、重要事项
- 根据用户标识自动定位到对应的记忆文件
用户标识规则
重要:用于区分记忆的用户名取自 sender_id 中 | 符号以前的部分。
例如:
sender_id = "hzg-demo-appWillNing|s-24485376"→ 用户名为hzg-demo-appWillNingsender_id = "alice|session-123"→ 用户名为alicesender_id = "bob_channel|xyz"→ 用户名为bob_channel
使用场景
当需要:
- 记住特定用户的信息或偏好
- 跨会话保持对某用户的记忆
- 为不同用户维护独立的上下文
文件结构
~/.openclaw/workspace/skills/multi-user-long-term-memory/
├── SKILL.md
├── README.md
├── references/
│ └── user-memory.js # 记忆管理逻辑
└── users/
└── {username}.md # 各用户的记忆文件(按|前的用户名命名)
API
获取用户记忆
user-memory.get(senderId) → 返回该用户的记忆内容
保存用户记忆
user-memory.save(senderId, content) → 保存内容到用户记忆文件
追加用户记忆
user-memory.append(senderId, content) → 追加内容到用户记忆文件
初始化用户记忆
user-memory.init(senderId, userName) → 初始化用户记忆文件
注意事项
- 记忆文件按用户名(|前的部分)命名,存储在 users/ 目录下
- 文件格式为 Markdown,便于阅读和编辑
- 相同用户名的不同会话将共享同一记忆文件
Usage Guidance
This skill appears to do what it says: it creates and manages per-user Markdown files in the skill's users/ directory. Before installing, consider: 1) Privacy: memories are stored as plaintext under the workspace — do not allow the skill to store sensitive secrets (passwords, tokens, PII) unless you accept plaintext storage. 2) Access control: any user or process with read access to the workspace can read these files; restrict filesystem permissions accordingly. 3) Retention and cleanup: decide a retention policy and how to purge old memories. 4) Username mapping: the skill extracts the username as the part before '|' and sanitizes characters; verify this matches your platform's sender_id format to avoid accidental collisions or shared memory between distinct users. 5) If you need stronger guarantees, modify the code to encrypt stored data or store memory in a secured secret store. If any of these concerns are unacceptable, do not enable the skill or run it only in a trusted, isolated workspace.
Capability Analysis
Type: OpenClaw Skill
Name: multi-user-long-term-memory
Version: 1.0.0
This skill bundle provides a legitimate mechanism for maintaining multi-user long-term memory by storing user-specific data in Markdown files. The core logic in references/user-memory.js includes input sanitization to prevent path traversal and uses standard Node.js file system APIs. The instructions in SKILL.md are consistent with the stated purpose, and no evidence of data exfiltration, malicious execution, or prompt injection was found.
Capability Assessment
Purpose & Capability
Name/description describe per-user long-term memory. The code and SKILL.md implement exactly that: extracting a username from sender_id (part before '|'), and reading/writing per-username .md files under the skill's users/ directory. No unrelated env vars, binaries, or network access are requested.
Instruction Scope
Instructions and code operate only on workspace-local files (users/*.md) and expose get/save/append/init APIs and a CLI. This stays within the stated purpose. Important note: memories are stored as plaintext Markdown in the workspace, so sensitive information will be written to disk unencrypted and accessible to anyone with filesystem access to the workspace.
Install Mechanism
No install spec; this is instruction-plus-reference-code only. The code uses only built-in Node.js modules (fs, path). No downloads, package installs, or external installers are present.
Credentials
The skill requires no environment variables, no credentials, and no config paths beyond its own workspace. The requested (absent) privileges are proportionate to the stated functionality.
Persistence & Privilege
The skill does persist data to the agent workspace (users/*.md) which is expected for a memory skill. It does not request always:true or elevated privileges. Ensure workspace file permissions and retention policies are acceptable because stored memories persist on disk.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install multi-user-long-term-memory - After installation, invoke the skill by name or use
/multi-user-long-term-memory - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release: Manage long-term memory files for multiple users.
- Creates and maintains independent memory files per user, tracking preferences, context, and important info.
- Automatically identifies users using the part of `sender_id` before the `|` symbol.
- Provides APIs to get, save, append, and initialize user memory files.
- Memory files are stored in Markdown format for each user in a dedicated directory, enabling easy editing and persistent user context.
Metadata
Frequently Asked Questions
What is 多用户隔离型长期记忆 Multi-user Long Term Memory?
为多个用户创建和管理独立的长期记忆文件,记录偏好和上下文并按用户名隔离存储。 It is an AI Agent Skill for Claude Code / OpenClaw, with 1824 downloads so far.
How do I install 多用户隔离型长期记忆 Multi-user Long Term Memory?
Run "/install multi-user-long-term-memory" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 多用户隔离型长期记忆 Multi-user Long Term Memory free?
Yes, 多用户隔离型长期记忆 Multi-user Long Term Memory is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does 多用户隔离型长期记忆 Multi-user Long Term Memory support?
多用户隔离型长期记忆 Multi-user Long Term Memory is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 多用户隔离型长期记忆 Multi-user Long Term Memory?
It is built and maintained by 宁伟 (@kadbbz); the current version is v1.0.0.
More Skills