five-layer-memory-method

A five-layer memory management system designed to give AI long-term memory. It uses a five-layer hierarchical architecture, BM25 for precise search, includes 80+ synonym expansions, supports one-click export and import migration, and is implemented in pure Python with zero dependencies. Suitable for preserving preferences, rules, and progress across different conversation windows.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "five-layer-memory-method" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-dbd99dcec2082ecc26cad3d5a6ea3547f7883519b7b3ad72b48a455db832e037. Verify the upstream source and version against https://skillhub.cn/skills/org-l7548nxs/five-layer-memory-method before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

A five-layer memory management system designed to give AI long-term memory. It uses a five-layer hierarchical architecture, BM25 for precise search, includes 80+ synonym expansions, supports one-click export and import migration, and is implemented in pure Python with zero dependencies. Suitable for preserving preferences, rules, and progress across different conversation windows.

0 Downloads

Introduction source: third_party · org-l7548nxs · 1.0.3 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: five-layer-memory-method
description: 跟AI聊了半小时项目,转头它就忘光?换个对话窗口,偏好、规则、进度全清零?

AI长期记忆管理·专业版【煋旺智能·出品】

专业版 · 全功能解锁 给AI装个"最强大脑",BM25精准搜索 + 同义词扩展 + 一键迁移 重度用户/团队首选,越用越聪明


😤 受够了AI"金鱼记忆"?

跟AI聊了半天的项目方案,下次对话从头再来? 想找上次讨论的那个决策,翻了几十条聊天记录找不到? 换个工具、换个设备,所有记忆全清零? 团队协作的时候,每个人的AI各记各的,信息不同步?

你需要的不是更聪明的AI,而是能"记住"的AI。

普通的AI对话,就像在白板上写字——写完就擦,擦完就没。 而拥有长期记忆的AI,才是真正能帮你干活的生产力工具。


🎯 这是什么?

这是一套为重度AI用户和团队打造的专业级长期记忆管理系统。

不只是简单的"记笔记"——它有五层记忆架构、精准搜索引擎、自动维护机制、一键迁移能力。 你的AI用得越久,积累越多,就越懂你、越好用。


✨ 7大核心能力,一个比一个狠

1️⃣ 五层记忆体系,什么重要什么次要,门儿清

就像人脑有瞬时记忆、短期记忆、长期记忆一样,AI的记忆也不能乱塞。 五层架构,从"每次都要加载的核心规则"到"偶尔才用的技能卡片",分层管理,效率拉满。

层级 存什么 特点
L1 规则记忆 核心原则、做事风格、硬性要求 每次自动加载,AI一上来就懂你
L2 用户画像 身份、职业、偏好、常用工具 不用每次自我介绍
L3 情节记忆 项目、决策、待办、经验、知识 动态管理,按需搜索调取
L4 工作记忆 当前会话临时状态 上下文不串台
L5 技能记忆 工具用法、操作技巧、模板 随用随查,即插即用

2️⃣ BM25精准搜索,搜得准,相关内容一个不漏

普通的关键词搜索,搜"bug"就只能找到"bug",找不到写着"问题""故障""报错"的内容? 专业版用的是信息检索领域的BM25算法,配合TF-IDF加权和多粒度n-gram匹配,搜索精度直接拉满。

  • 标题命中、标签匹配、内容关键词,多维度加权打分
  • 文档长度自动归一化,不会因为文章长就排前面
  • 词频饱和度控制,重复堆砌关键词没用

存了几百条记忆也不怕,一搜就能找到你想要的那条。

3️⃣ 80+同义词扩展,怎么说都能搜到

你说"bug",它知道找"问题""故障""报错""坑" 你说"优化",它知道找"改进""提升""升级""完善" 你说"部署",它知道找"发布""上线""推送"

覆盖开发、产品、运营等高频场景的80+组同义词映射,怎么说都能搜到,不怕因为说法不一样就漏了。

4️⃣ 一键导出导入,3种合并模式,迁移备份随心所欲

换电脑了?换工具了?想跟团队共享记忆? 一键导出成单个JSON文件,到哪儿都能用。

3种导入模式,想怎么合就怎么合:

  • 合并模式:新老记忆都保留,冲突的取最新
  • 替换模式:用导入的完全替换当前的
  • 跳过模式:只加新的,冲突的保留原来的

还支持试运行(dry-run),先预览效果再执行,不怕搞乱。

跨设备迁移、定期备份、团队协作,全都搞定。

5️⃣ 自动维护,记忆越多越清爽,不是越堆越乱

记忆不是越多越好,没用的记忆多了反而干扰搜索。 自动维护机制,帮你"忘掉"该忘掉的,"记住"该记住的:

  • 按重要度分级过期(1星7天,5星永久)
  • 低价值的过期记忆自动删除
  • 长期不用的自动归档,不占注意力
  • 高价值的提醒你提炼到核心层

就像大脑会整理记忆一样,你的AI记忆系统也会自己收拾。

6️⃣ 多项目隔离切换,同时干N件事也不串台

同时管好几个项目? 每个项目独立记忆空间,一键切换,A项目的记忆不会混到B项目里。 项目做完了还能归档,留着以后复盘用。

7️⃣ 10个命令,覆盖记忆系统全生命周期

init / add / search / list / maintain / status / switch / archive / export / import

从初始化到日常使用,从维护到迁移,一个脚本全搞定。 纯Python标准库实现,不用装任何依赖,复制就能用。


🚀 3分钟上手

第一步:初始化

python memory_manager.py init --name "我的工作记忆" --project "主项目"

第二步:存点东西

# 存一条经验教训
python memory_manager.py add --layer l3 --type lesson \
  --title "数据库索引踩坑" \
  --content "大表加索引要先测性能,不然可能锁表" \
  --tags "数据库,踩坑" --importance 5

# 存一条规则
python memory_manager.py add --layer l1 \
  --title "回复风格" --content "简洁直接,不说废话"

第三步:搜搜看

python memory_manager.py search --query "数据库性能问题"

(注意:搜"性能问题"也能找到"索引踩坑"那条,因为同义词扩展生效了)


💡 这些人特别需要

人群 痛点 用了之后
重度AI用户 每次对话都要从头讲背景 AI越用越懂你,省一半解释时间
开发者 踩过的坑下次还踩 经验教训全记下来,搜一下就有
产品经理 项目多了记不清每个决策 决策记录一键查,为啥这么选一目了然
团队协作 每个人的AI各记各的 共享记忆仓库,新人快速上手
知识工作者 碎片化知识散落在各处 统一管理,一搜即得

📁 技能包里有什么?

├── SKILL.md                    # 你正在看的这个文件
├── scripts/
│   ├── memory_manager.py       # 核心管理脚本(主入口)
│   ├── deep_memory_engine.py   # 深度记忆引擎
│   ├── data_provider.py        # 数据提供层
│   └── services/               # 服务模块
│       ├── search_service.py   # 搜索服务
│       └── layer_scheduler.py  # 层级调度
├── references/                 # 详细文档
│   ├── 使用指南.md
│   ├── 最佳实践.md
│   ├── 常见问题.md
│   └── 更新日志.md
├── templates/                  # 各层级模板文件
└── examples/                   # 完整示例项目

🔒 数据安全

所有记忆数据全部存在你本地,不上传任何服务器。 敏感信息(密钥、密码等)默认排除在导出之外,安全可控。


🤝 生态伙伴

伙伴 定位 协同价值
QA质检框架 开发期质量守门员 记忆管"记得住",QA管"做得对"。18模块全量检查,从代码到架构四层质量门禁
节能阀 · AI成本优化专家 运行期成本优化器 记忆系统越用越大,调用成本跟着涨?节能阀6大降本手段帮你省50%-90%

AI应用成长三段论:先用QA打好质量地基 → 再用节能阀控制成本 → 最后用五层记忆法积累长期资产


版本:v5.1.0(专业版) | 出品:煋旺智能

Current listing version

1.0.3

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 解决AI对话记忆丢失的核心痛点,具有高频刚需价值
  • 五层记忆架构设计合理,覆盖从核心规则到技能卡片的完整记忆体系
  • 支持BM25精准搜索和80+同义词扩展,搜索精度高
  • 一键导出导入功能完善,支持多设备迁移和团队协作
Trigger Precision95/100

Highlights

  • description清晰准确,突出核心价值和解决痛点
  • 触发词覆盖全面,边界清晰,能有效引导目标用户
Structure and Standards90/100

Highlights

  • 文档结构完整,包含功能介绍、使用示例、适用人群等必要章节
  • 提供具体命令示例和使用场景,便于用户快速上手
  • frontmatter完整,文件结构说明清晰
Execution Reliability93/100

Highlights

  • 纯Python标准库实现,零依赖,部署简单
  • 支持dry-run试运行模式,降低操作风险
  • 数据本地存储,安全可控,敏感信息默认排除导出
Evidence Verifiability (mean of the first four)93/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Accounts, secrets or authorization

    Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.

    Mentioned in main document · lines 180

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.