with one click
ai-memory
记忆系统 - 搜索、添加长期/短期记忆、获取记忆。用于跨对话存储和检索信息。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
记忆系统 - 搜索、添加长期/短期记忆、获取记忆。用于跨对话存储和检索信息。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | ai-memory |
| description | 记忆系统 - 搜索、添加长期/短期记忆、获取记忆。用于跨对话存储和检索信息。 |
你可以访问记忆系统,跨对话存储和检索信息。记忆分为长期记忆(MEMORY.md)和短期记忆(每日文件)。
在 Skills/ai-memory/ 目录运行:
cd Skills/ai-memory
bash install.sh
这会自动:
安装 ai-memory 包(从 PyPI):
pip install ai-memory
复制 Skills/ai-memory/SKILL.md 到 Claude Code 技能目录:
~/.claude/skills/ai-memory/%APPDATA%\.claude\skills\ai-memory\~/.claude/skills/ai-memory/重启 Claude Code
如果你正在开发此项目,可以使用开发模式安装:
# 从本地源码安装(开发模式)
cd /path/to/AI-Memmory_plugin
pip install -e .
这会在修改代码后立即生效,无需重新安装。
搜索过去的工作、决策、用户偏好或项目历史:
/ai-memory search "项目技术栈是什么?"
保存需要长期保留的结构化信息到 MEMORY.md:
# 用户偏好
/ai-memory add-long-term "用户喜欢使用深色主题的界面" --tags preference,ui
# 项目信息
/ai-memory add-long-term "后端使用 Python 3.8+ 和 FastAPI 框架" --tags project,tech-stack
# 重要决策
/ai-memory add-long-term "决定使用 ChromaDB 作为向量存储方案" --tags decision,architecture --category "重要决策"
保存临时性、可能过期的信息到今日文件:
# 对话上下文
/ai-memory add-daily "今天讨论了认证模块的实现方案" --tags discussion,auth
# 调试信息
/ai-memory add-daily "遇到 ChromaDB 连接超时错误,可能是网络问题" --tags debug,error
# 每日活动
/ai-memory add-daily "完成了用户注册功能的单元测试" --tags progress,testing
读取特定记忆文件的内容:
# 获取长期记忆
/ai-memory get MEMORY.md
# 获取今日记忆
/ai-memory get memory/07-02-2026.md --from 1 --lines 20
用于保存需要长期保留的结构化信息:
命令: add-long-term
用于保存临时性、可能过期的信息:
命令: add-daily
在回答以下问题前,先搜索记忆:
决策规则:
add-long-termadd-long-termadd-long-termadd-dailyadd-daily(安全默认)按 5 个章节组织:用户偏好、项目信息、重要决策、工作流程、联系人信息
按日期分文件存储
path#Lstart-Lend(如:MEMORY.md#L10-L15)
所有操作通过 ai-memory CLI 执行(需要先安装包):
# 方式 1:从 PyPI 安装(推荐)
pip install ai-memory
# 方式 2:从本地源码安装(开发模式)
cd /path/to/AI-Memmory_plugin
pip install -e .
# 使用 CLI
ai-memory search "查询内容"
ai-memory add-long-term "记忆内容" --tags preference
ai-memory add-daily "临时记忆" --tags debug
ai-memory get MEMORY.md --from 1 --lines 20
注意:CLI 通过已安装的 ai-memory 包提供,不依赖项目根目录。