为多个用户维护独立的长期记忆文件。
Scanned 9/11/2026
Install to Claude Code
npx -y skills add lxyeternal/MalSkillBench --skill multi-user-long-term-memory --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Multi User Long Term Memory?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/lxyeternal-multi-user-long-term-memory)More formats (shields.io, HTML) on the badges page.
# Multi-User Long-Term Memory
为多个用户维护独立的长期记忆文件。
## 功能
- 为不同用户创建独立的长期记忆文件
- 记录用户的偏好、上下文、重要事项
- 根据用户标识自动定位到对应的记忆文件
## 用户标识规则
**重要**:用于区分记忆的用户名取自 `sender_id` 中 `|` 符号**以前**的部分。
例如:
- `sender_id = "hzg-demo-appWillNing|s-24485376"` → 用户名为 `hzg-demo-appWillNing`
- `sender_id = "alice|session-123"` → 用户名为 `alice`
- `sender_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,便于阅读和编辑
- 相同用户名的不同会话将共享同一记忆文件
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Understand the components, mechanics, and constraints of context in agent systems. Use when designing agent architectures, debugging context-related failures, or optimizing context usage.
Draft release notes and changelog entries from git history or merged PRs between two refs (tags/SHAs/branches), including breaking changes, migrations, and upgrade steps. Use when the user asks for release notes, changelog updates, or a GitHub Release draft.
Documentation style guide enforcer by @planetabhi. Applies and reviews the writing style guide when authoring or editing product documentation and tutorials. Use to check prose for voice, tense, word choice, inclusive language, formatting, code block, UI, Markdown, and number/date conventions.
Quick-reference card for all caveman modes, skills, and commands. One-shot display, not a persistent mode. Trigger: /caveman-help, "caveman help", "what caveman commands", "how do I use caveman".
Explain how claude-mem captures observations, when memory injection kicks in, and where data lives. Use when the user asks "how does claude-mem work?" or "what is this thing doing?".