Memory logo

Memory

Community
312362115
memory

记忆管理:手动触发的全局/项目级记忆写入、查看、清理、迁移。 管理 ~/.claude/memory/(全局)和项目级 memory 目录。 触发词:/memory、记住、忘掉、清理记忆、记忆管理、看看记忆。 触发场景:用户想保存跨项目经验、清理过期记忆、查看当前记忆状态。

Overview

Publisher312362115
Repositoryclaude
Skill namememory
Stars
107
Forks
17
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by 312362115 on GitHub. Read the source before you install it.

Installation

Install the Memory AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/312362115/claude/tree/main/skills/memory
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/312362115/claude.git /tmp/claude
mkdir -p .claude/skills
cp -r /tmp/claude/skills/memory .claude/skills/memory
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Memory in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Memory on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Memory is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

记忆管理(Memory)

记忆是跨会话的备忘录。全局记忆跨项目,项目记忆跟项目走。

Slash 命令

命令作用
/memory list查看全局 + 项目级所有记忆
/memory save <内容>保存一条记忆(自动判断层级和类型)
/memory clean批量检查过期/重复记忆,给出清理建议
/memory forget <关键词>删除指定记忆
/memory move <关键词> --to global项目记忆迁移到全局
/memory move <关键词> --to project全局记忆迁移到项目

也可以用自然语言触发:"记住 xxx"、"看看记忆"、"忘掉 xxx"、"清理记忆"。


记忆体系

~/.claude/
├── memory/                              ← 全局记忆(所有项目可见)
│   ├── MEMORY.md                            索引文件
│   └── *.md                                 记忆文件
└── projects/<path>/memory/              ← 项目记忆(仅当前项目可见)
    ├── MEMORY.md                            索引文件
    └── *.md                                 记忆文件
层级存什么示例
全局跨项目通用的个人偏好、工作习惯、通用经验"我喜欢简洁的提交信息"、"大表加索引用 CONCURRENTLY"
项目项目特定的决策、约束、坑"这个项目用 SQLite 不支持 ALTER COLUMN"

操作 1:写入记忆(save)

用户说"记住xxx"、"保存到记忆"、"这个经验记下来"时触发。

执行流程

用户要求保存
  │
  ├─ 判断层级
  │   ├─ 跨项目通用?→ 全局(~/.claude/memory/)
  │   └─ 项目特定?→ 项目级
  │   └─ 不确定?→ 问用户
  │
  ├─ 判断类型
  │   ├─ 用户偏好/角色信息 → user 类型
  │   ├─ 做法纠正/做法确认 → feedback 类型
  │   ├─ 项目阶段性目标/约束 → project 类型
  │   └─ 外部资源位置 → reference 类型
  │
  ├─ 检查去重
  │   └─ 读 MEMORY.md 索引,确认没有重复或矛盾的条目
  │
  ├─ 写入
  │   ├─ 创建记忆文件(带 frontmatter)
  │   └─ 更新 MEMORY.md 索引
  │
  └─ 确认:"已保存到 [全局/项目] 记忆:[一句话描述]"

写入判断三连问

写之前过一遍:

  1. 下次对话还需要吗? → 不需要就不写
  2. 能从代码/git/docs 推导出来吗? → 能推导就不写
  3. 是否跨项目通用? → 通用放全局,特定放项目

不写的

  • 代码结构、文件路径、函数签名(从代码看)
  • Bug 修复方案(从 git 看)
  • 已经写在 CLAUDE.md 或 docs/ 里的(已有持久化)

操作 2:查看记忆(list)

用户说"看看记忆"、"当前有哪些记忆"、"memory list"时触发。

执行流程

1. 读取全局 MEMORY.md(如存在)
2. 读取项目级 MEMORY.md(如存在)
3. 汇总输出,按类型分组

输出格式:
## 全局记忆(X 条)
### Feedback
- [标题](文件) — 描述

### User
- [标题](文件) — 描述

## 项目记忆(X 条)
### Feedback
- [标题](文件) — 描述

合计:全局 X 条 + 项目 X 条

操作 3:清理记忆(clean)

用户说"清理记忆"、"忘掉xxx"、"记忆过期了"时触发。

单条删除

用户指定要忘掉的内容:

  1. 在 MEMORY.md 中找到对应条目
  2. 删除记忆文件
  3. 从 MEMORY.md 移除索引行
  4. 确认:"已删除 [全局/项目] 记忆:[标题]"

批量清理

用户说"清理一下记忆"、"检查过期记忆"时:

1. 读取所有记忆文件
2. 逐条检查:
   │
   ├─ project 类型超过 1 个月?→ 标记待确认
   ├─ feedback 引用的代码/模块还存在吗?→ 不存在则标记
   ├─ 内容已写入 CLAUDE.md 或 docs/?→ 标记可删除
   ├─ 两条内容重复或矛盾?→ 标记合并
   └─ reference 引用的资源还有效吗?→ 无法验证则标记

3. 输出清理建议(不自动删,让用户确认):

## 记忆清理建议

### 建议删除(X 条)
- [标题] — 原因:内容已沉淀到 CLAUDE.md
- [标题] — 原因:引用的模块 src/old/ 已删除

### 建议合并(X 组)
- [标题A] + [标题B] — 内容重叠

### 建议保留(X 条)
- [标题] — 仍然有效

4. 用户确认后批量执行

操作 4:迁移记忆(move)

在项目记忆和全局记忆之间迁移。

用户说"这条移到全局"、"这个经验其他项目也能用"时触发。

1. 复制记忆文件到目标层级的 memory 目录
2. 更新目标层级的 MEMORY.md
3. 删除源层级的记忆文件和索引条目
4. 确认:"已将 [标题] 从 [项目/全局] 迁移到 [全局/项目]"

与其他 skill 的关系

task-manager 标 done → 自动写入项目记忆(Step 5,按写入规则判断)
docs-management Lint → 顺带检查记忆健康
memory-manage(本 skill)→ 用户手动触发写入/查看/清理/迁移
  • 自动写入由 task-manager 负责(复盘时提取经验)
  • 手动管理由本 skill 负责(用户主动触发)
  • 两者互补:自动写入保证不遗漏,手动管理保证不腐烂

Frequently asked questions

What does the Memory AI skill do?

记忆管理:手动触发的全局/项目级记忆写入、查看、清理、迁移。 管理 ~/.claude/memory/(全局)和项目级 memory 目录。 触发词:/memory、记住、忘掉、清理记忆、记忆管理、看看记忆。 触发场景:用户想保存跨项目经验、清理过期记忆、查看当前记忆状态。

Why use Memory on TypingMind?

Because you install it once and use it with any model. Memory is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Memory in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/312362115/claude/tree/main/skills/memory. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Memory?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Memory?

As many as you like. As long as a model supports skills, you can use Memory with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Memory AI skill free?

Yes. It is published on GitHub by 312362115 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇