Xpersona
M

Memory Tree

CLAWHUB · Unverified

🌳 记忆树 — 周报自动生成,永久记忆标记,关键词搜索。说句话就能用。 Skill: Memory Tree Owner: masongmx Summary: 🌳 记忆树 — 周报自动生成,永久记忆标记,关键词搜索。说句话就能用。 Tags: embedding:0.2.0, latest:2.0.1, memory:0.2.0, ollama:0.2.0, search:0.2.0 Version history: v2.0.1 | 2026-03-25T03:14:20.398Z | user 精简项目介绍,优化可读性 v2.0.0 | 2026-03-25T03:02:05.134Z | user v2.0: 周报生成、永久记忆标记、关键词搜索;删除无效的decay和embedding依赖 v0.2.0 | 2026-03-18T16:24:57.518Z | user Multi-backend search (Ollama/Zhipu/OpenAI/Keyword), auto-dete

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s172s1ebhwphf9jykj45m59mx183k8c7:memory-tree
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-masongmx-memory-tree/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

18,635 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: memory-tree
description: 🌳 记忆树 — 周报自动生成,永久记忆标记,关键词搜索。说句话就能用。
---

# 🌳 记忆树

让 OpenClaw 拥有人类般的记忆——记住重要的,忘记过期的。

## 核心功能

| 功能 | 命令 |
|------|------|
| 生成周报 | `python3 scripts/memory_tree.py weekly` |
| 搜索记忆 | `python3 scripts/memory_tree.py search "关键词"` |
| 标记永久 | `python3 scripts/memory_tree.py mark "标题"` |

## 一句话使用

- 「生成周报」— 自动统计本周新记、遗忘、永久记忆
- 「搜索记忆 关键词」— 本地关键词搜索
- 「记住这个」— 标记为永久记忆 📌

## 特点

- **零依赖**:无需 Ollama,纯本地运行
- **自动推送**:周报自动检测已启用的渠道(飞书等)
- **永久记忆**:📌 标记永不衰减

## 安装

```bash
clawhub install memory-tree
```

## License

MIT

README.md

# 🌳 记忆树

让龙虾记住重要的事,忘记不重要的。

**装上就自动运行**:每天衰减、每周归档,无需任何操作。

---

## 为什么做这个项目?

灵感来自 [Memory-Like-A-Tree](https://github.com/loryoncloud/Memory-Like-A-Tree),但原项目有几个问题:

| 原项目的问题 | 我们的解法 |
|-------------|-----------|
| 需要手动配置环境变量、路径 | **零配置**:自动检测 OpenClaw 环境 |
| 只有关键词搜索,搜"辣的"找不到"火锅" | **语义搜索**:多后端自动切换,理解语义 |
| 独立工具,要自己跑脚本 | **OpenClaw 技能**:一句话调用 |
| 10+ 个脚本,架构复杂 | **单文件**:300 行 Python,易维护 |
| 需要 Obsidian 才能查看归档 | **内置归档**:精华自动提取到 JSON |

---

## 我们的优化带来什么价值?

### 1. 小白友好
- 不用改配置文件
- 不用手动设置 crontab
- 一句话初始化,之后全自动

### 2. 语义搜索
- 搜"火锅"能找到"老板喜欢吃辣"
- 自动检测:Ollama(免费本地)→ API → 关键词 fallback
- 用户不用关心后端

### 3. 零依赖 / 少依赖
- 纯 Python 标准库,不需要 pip install
- Ollama 可选,没有也能用关键词搜索
- 不依赖 Obsidian

### 4. 归档精华提取
- 低置信度记忆归档到 `archive.json`
- 自动提取关键词、摘要、经验教训
- 随时可导出或迁移

---

## 核心原理:置信度

每条记忆有个"健康值"(0.0–1.0):

| 状态 | Emoji | 含义 |
|------|-------|------|
| 活跃 | 🌿 | 经常用,置信度 ≥0.8 |
| 衰减中 | 🍂 | 偶尔用,0.5–0.8 |
| 已归档 | 🪨 | 不用了,<0.3 |

**变化规则**:
- 被搜索命中:+0.03(用进)
- 每天未访问:-0.004 到 -0.008(废退)
- 标记 [P0]:永不衰减

就像人类的记忆——常回忆的记得牢,不回忆的慢慢淡忘。

---

## 你只需要知道两件事

### 1. 想回忆某事?
说:「帮我回忆一下 xxx」

语义搜索,能理解"辣的"和"火锅"相关。

### 2. 某条记忆特别重要?
说:「把这条标记为 P0」

永久保护,永不衰减。

---

## 其他的全自动

装好初始化后:
- 每天凌晨 3 点自动衰减
- 每周自动归档死亡记忆
- 搜索引擎自动检测最佳后端

**你不用管它,它自己会跑。**

---

## 搜索后端

自动检测优先级:

1. **Ollama**(本地,免费,隐私)— 默认
2. **智谱 / OpenAI API**(云端)
3. **关键词搜索**(零依赖 fallback)

用 Ollama 时,记忆数据永不离开你的机器。

---

## 安装

```bash
git clone https://github.com/Masongmx/memory-tree.git
cp -r memory-tree/skill ~/.openclaw/workspace/skills/memory-tree
```

初始化:「帮我初始化记忆树」——之后全自动。

---

## 技术规格

- Python 3.8+,零外部依赖
- 本地运行,隐私安全
- macOS / Linux / WSL

---

## 相关项目

- [Lobster Doctor](https://github.com/Masongmx/lobster-doctor) — workspace 健康管理

---

## 致谢

灵感来自 [@loryoncloud](https://x.com/loryoncloud) 的 [Memory-Like-A-Tree](https://github.com/loryoncloud/Memory-Like-A-Tree) 项目。

---

## License

MIT

_meta.json

{
  "ownerId": "kn72fxnf4w217gawwwdx3y8hm98240ra",
  "slug": "memory-tree",
  "version": "2.0.1",
  "publishedAt": 1774408460398
}

SECURITY.md

# Security Statement

## Why ClawHub Flagged This Skill

ClawHub Security flagged this skill as "suspicious" due to these concerns:

### 1. Misleading "Local-Only" Claim
The SKILL.md previously emphasized "local Ollama — no cloud API" while the code actually supports cloud backends (Zhipu, OpenAI) if API keys are configured.

**Resolution in v0.3.0:** SKILL.md now clearly documents the privacy implications of each backend.

### 2. Cloud API Fallback
If `ZHIPU_API_KEY` or `OPENAI_API_KEY` environment variables are set, MEMORY.md content will be sent to cloud embedding endpoints.

**Mitigation:**
- To stay fully local, ensure Ollama is running and DO NOT set cloud API keys
- Use `python3 memory_tree.py config backend keyword` to force local keyword mode
- The skill auto-detects backends and prefers local Ollama when available

### 3. Cron Job Creation
The `setup` command creates persistent cron jobs for automatic indexing/decay/cleanup.

**Mitigation:**
- Review what the setup script writes to crontab before running
- You can also run index/decay/cleanup manually without cron
- Cron jobs are user-level (not system-wide) and can be removed anytime

## What This Skill Does

- ✅ Reads `~/.openclaw/workspace/MEMORY.md`
- ✅ Writes to `~/.openclaw/workspace/memory-tree/data/` (confidence, embeddings, archive)
- ⚠️ May send memory content to cloud embedding APIs (if configured)
- ✅ Creates cron jobs (only when you run `setup`)

## What This Skill Does NOT Do

- ❌ No hidden data exfiltration
- ❌ No execution of external code
- ❌ No network calls unless you configure cloud backends
- ❌ No modification of files outside its designated directories

## Verdict

🟡 **INSTALL WITH AWARENESS**

This is a legitimate memory management tool. The "suspicious" flag comes from:
1. Previously unclear documentation about cloud fallbacks
2. Automatic cron creation (user-visible, not hidden)

If you want **strictly local** operation:
1. Run `ollama serve` with an embedding model
2. Don't set `ZHIPU_API_KEY` / `OPENAI_API_KEY`
3. Verify with `python3 memory_tree.py config show`

## Source Code Review

All logic is in `scripts/memory_tree.py` — a single Python file using only standard library modules.

skill-card.md

## Description:

Memory Tree helps OpenClaw generate weekly memory reports, search saved memories by keyword, and mark important memories as permanent.

This skill is ready for commercial/non-commercial use.

## Publisher:

[masongmx](https://clawhub.ai/user/masongmx)

### License/Terms of Use:

MIT-0

## Use Case:

OpenClaw users and developers use this skill to inspect local memory files, produce weekly memory summaries, search remembered items, and pin important memories for long-term retention.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill reads local OpenClaw memory files and channel configuration, which may contain sensitive personal or workspace information.

Mitigation: Install only if this access is acceptable and review generated weekly reports before sharing them.

Risk: Generated weekly reports may be sent to a configured Feishu destination if a user runs the printed send command.

Mitigation: Review the generated report path and Feishu target before running any printed send command.

Risk: Documentation and inspected behavior differ around cron, cloud APIs, and automatic decay.

Mitigation: Use the server security guidance as authoritative and do not rely on unsupported documentation claims about automation, cloud APIs, or decay behavior.

## Reference(s):

- [ClawHub Skill Page](https://clawhub.ai/masongmx/skills/memory-tree)
- [Memory-Like-A-Tree](https://github.com/loryoncloud/Memory-Like-A-Tree)
- [Lobster Doctor](https://github.com/Masongmx/lobster-doctor)

## Skill Output:

**Output Type(s):** [text, markdown, shell commands, configuration]

**Output Format:** [Terminal text, Markdown weekly reports, and suggested shell commands]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Weekly reports are written under the local OpenClaw memory workspace; send commands are printed for review rather than executed by the skill.]

## Skill Version(s):

2.0.1 (source: server release evidence)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Memory Tree and adjacent AI workflows.