# Local Memory Skill

> Use when an agent needs to set up, read, write, or maintain a fully local Markdown-based memory system; when the user says "remember this", "save to memory", "set up local memory", or wants cross-session context without a cloud memory provider.

- **Type:** Skill
- **Install:** `agentstack add skill-yaoxiao99-local-memory-skill-local-memory-skill`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [yaoxiao99](https://agentstack.voostack.com/s/yaoxiao99)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [yaoxiao99](https://github.com/yaoxiao99)
- **Source:** https://github.com/yaoxiao99/local-memory-skill

## Install

```sh
agentstack add skill-yaoxiao99-local-memory-skill-local-memory-skill
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Local Memory Manager

> 把记忆还给本地。不上云，不分心，用自己的文件系统当数据库。

## 核心理念

本地记忆系统的三层结构：

```
MEMORY.md          ← 启动索引（/home/` |
| Claude Code | `~/.claude/` 或项目目录 |
| Codex | `~/.codex/` |
| Cursor | `~/.cursor/` |
| OpenClaw | `~/.openclaw/workspace/` |
| 其他 | 使用 workspace 根目录 |

完整结构：

```
/
├── MEMORY.md                    ← 启动索引（ **业务专属文件**（按需创建）：如 `flower-business.md` 用于特定业务资料。不同 profile 按业务需要创建不同文件。

---

## 二、默认不使用云端 Memory

本方案默认不需要外部 Memory Provider。除非用户明确要求，否则不要启用以下服务：
- Mem0、Honcho、OpenViking、Supermemory、ByteRover、RetainDB、Hindsight、Holographic

本方案完全本地化，不上云。

---

## 三、初始化操作

### 首次搭建

```bash
# 1. 确定 workspace 目录
# Hermes:
WORKSPACE=~/.hermes/profiles//home
# Claude Code / 其他:
WORKSPACE=.

# 2. 创建目录结构
mkdir -p $WORKSPACE/local-memory

# 3. 创建所有文件
touch $WORKSPACE/MEMORY.md
touch $WORKSPACE/USER.md
touch $WORKSPACE/local-memory/{index,user-profile,nas-docker,projects,ai-tools,troubleshooting,archive}.md
```

### 填充模板

用 `assets/templates/` 目录下的模板文件填充每个文件（见下方模板索引）。

**模板索引：**

| 文件 | 模板 | 说明 |
|------|------|------|
| `MEMORY.md` | `assets/templates/MEMORY.md` | 启动索引，保持 
```

或手动整理：

```
请整理 local-memory/ 下的所有记忆：
1. 删除重复内容
2. 删除过期内容
3. 把长句压缩成短句
4. 把临时记录移动到 archive.md
5. 保持 MEMORY.md 和 USER.md 不超过 1000 字
6. 不要删除长期稳定、有复用价值的信息
7. 整理后告诉我改动摘要
```

---

## Common Pitfalls

1. **把 MEMORY.md 当知识库用** — MEMORY.md 只放索引，详细资料必须放 local-memory
2. **自动把所有对话总结写入** — 只有长期稳定、有复用价值的信息才写入
3. **使用云端 Memory Provider** — 本方案完全本地化，不上云
4. **写入一次性任务** — 临时排错、当天计划、过程日志不写入任何 memory 文件
5. **不读取直接回答** — 回答问题前应先读取对应 local-memory 文件

---

## Verification Checklist

初始化完成后，验证：
- [ ] `MEMORY.md` 存在且 /skills/note-taking/local-memory-skill/` |
| 其他 | clone 到对应 runtime 的 `skills/` 目录 |

```bash
git clone https://github.com/yaoxiao99/local-memory-skill ~/.claude/skills/local-memory-skill
```

### 方式三：Agent 自动初始化

告诉任何兼容 Agent：

```
帮我搭建本地记忆系统
```

```
初始化 local memory
```

```
我要用本地 markdown 管理 memory，不使用云服务
```

Agent 会自动读取此 SKILL.md 并执行初始化。

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [yaoxiao99](https://github.com/yaoxiao99)
- **Source:** [yaoxiao99/local-memory-skill](https://github.com/yaoxiao99/local-memory-skill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-yaoxiao99-local-memory-skill-local-memory-skill
- Seller: https://agentstack.voostack.com/s/yaoxiao99
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
