宁伟

多用户隔离型长期记忆 Multi-user Long Term Memory

AI Agentv1.0.0
By 宁伟Updated 2026-05-11multi-user-long-term-memory@clawhub_kadbbz/multi-user-long-term-memory
Context ManagementMemoryTool Use#Long Term Memory#记忆

According to AlphaMoat, as of 2026-09, 多用户隔离型长期记忆 Multi-user Long Term Memory has 3,333 downloads and 5 stars — ranked #3,393 of 5,078 AI skills overall, and #692 of 969 in AI Agent.

Installs
210
Downloads
3.3K
Stars
5
Overall Rank
#3,393
Top 67% overall · Top 72% in AI Agent
PlatformInstallsDownloadsStarsComments
ClawHub ↗1013.0K4-
SkillHub ↗2103.3K5—

Platforms count differently and update at different times.

What this skill does

为多个用户创建和管理独立的长期记忆文件,记录偏好和上下文并按用户名隔离存储。

Monthly Trend

Downloads3.3K
1.6K2.5K3.5K2026-03 · Downloads 1.7K2026-05 · Downloads 2.4K2026-06 · Downloads 2.6K2026-07 · Downloads 2.9K2026-08 · Downloads 3.0K2026-09 · Downloads 3.3K26-0326-09
Stars5
2452026-03 · Stars 22026-05 · Stars 42026-06 · Stars 52026-07 · Stars 52026-08 · Stars 52026-09 · Stars 526-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-093.3K—5
2026-083.0K+5.2%5
2026-072.9K+10.1%5
2026-062.6K+7.7%5
2026-052.4K—4
2026-031.7K—2

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

1.7 KB · ClawHub v1.0.0
# Multi-User Long-Term Memory

为多个用户维护独立的长期记忆文件。

## 功能

- 为不同用户创建独立的长期记忆文件
- 记录用户的偏好、上下文、重要事项
- 根据用户标识自动定位到对应的记忆文件
Show all (70 lines)
## 用户标识规则

**重要**:用于区分记忆的用户名取自 `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,便于阅读和编辑
- 相同用户名的不同会话将共享同一记忆文件

Popular in AI Agent

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.