memory
Skill107 starsChanged 8 months agoMITView on GitHub
记忆管理:手动触发的全局/项目级记忆写入、查看、清理、迁移。 管理 ~/.claude/memory/(全局)和项目级 memory 目录。 触发词:/memory、记住、忘掉、清理记忆、记忆管理、看看记忆。 触发场景:用户想保存跨项目经验、清理过期记忆、查看当前记忆状态。
66 other projects use a version of this.
Adopted by
Most recently taken up by
- ProjectAJ14/eklavyatheir own version, first seen Oct 4, 2026
- DioNanos/nexuscrewtheir own version, first seen Oct 3, 2026
- Quad4-Software/skillstheir own version, first seen Oct 3, 2026
- pobsteta/aigoratheir own version, first seen Oct 2, 2026
- vbcherepanov/total-agent-memorytheir own version, first seen Sep 30, 2026
- harshanandak/forgetheir own version, first seen Sep 28, 2026
Used with
Projects with it also use harness-review, postmortem and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
fockusSkillharness-review
Harness v3 統合レビュースキル。コード・プラン・スコープを多角的にレビュー。以下で起動: レビュー、コードレビュー、プランレビュー、スコープ分析、セキュリティ、品質チェック、harness-review。実装・新機能・バグ修正・セットアップ・リリースには使わない。
Also in 3 projects that use this
Hongyu-yuSkillpostmortem
Use when analyzing failures, outages, incidents, or negative outcomes, conducting blameless postmortems, documenting root causes with 5 Whys or fishbone diagrams, identifying corrective actions with owners and timelines, learning from near-misses, establishing prevention strategies, or when user mentions postmortem, incident review, failure analysis, RCA, lessons learned, or after-action review.
Also in 4 projects that use this
MicrosoftSkilldev
Development workflows for the playwright-cli repository. Use when the user asks about rolling dependencies, releasing, or other repo maintenance tasks.
Also in 3 projects that use this
AnthropicSkillstart
Set up your bio-research environment and explore available tools. Use when first getting oriented with the plugin, checking which literature, drug-discovery, or visualization MCP servers are connected, or surveying available analysis skills before starting a new project.
Also in 4 projects that use this
MicrosoftSkillsync
Sync the current session branch with its upstream branch, or publish the current session branch to a remote. Use when the user asks to sync a branch, pull latest changes, rebase onto upstream, push current branch, publish branch, or set upstream.
Also in 3 projects that use this
GitHubSkillrefactor
Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.
Also in 4 projects that use this
- +1 more from microsoft
Other versions66 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 66
- google-gemini/gemini-cli★ 107ksame name
- Chachamaru127/claude-code-harness★ 3.1ksame name
- codeaholicguy/ai-devkit★ 1.6ksame name
- Muuuun/luxas★ 1.2ksame name
- rshankras/claude-code-apple-skills★ 777same name
- memvid/claude-brain★ 578same name
- shobcoder/shob★ 577same name
- boshu2/agentops★ 447same name
- lokikill123/codex-token-skills★ 119same name
- 686f6c61/alfred-dev★ 116same name
56 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- code-walkthroughSkill
- db-reviewSkill
- deep-researchSkill
- dependency-mapSkill
- diagramSkill
- docs-managementSkill
- env-troubleshootSkill
- learning-companionSkill
- log-analysisSkill
- perf-profilingSkill
- preview-mdSkill
- rapid-prototypeSkill
- refactoringSkill
- releaseSkill
- security-auditSkill
- task-executeSkill
- task-finishSkill
- task-managerSkill
- task-startSkill
- tech-evaluationSkill
- writingSkill
The file
Files
记忆管理(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 索引
│
└─ 确认:"已保存到 [全局/项目] 记忆:[一句话描述]"写入判断三连问
写之前过一遍:
- 下次对话还需要吗? → 不需要就不写
- 能从代码/git/docs 推导出来吗? → 能推导就不写
- 是否跨项目通用? → 通用放全局,特定放项目
不写的
- 代码结构、文件路径、函数签名(从代码看)
- 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"、"记忆过期了"时触发。
单条删除
用户指定要忘掉的内容:
- 在 MEMORY.md 中找到对应条目
- 删除记忆文件
- 从 MEMORY.md 移除索引行
- 确认:"已删除 [全局/项目] 记忆:[标题]"
批量清理
用户说"清理一下记忆"、"检查过期记忆"时:
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 负责(用户主动触发)
- 两者互补:自动写入保证不遗漏,手动管理保证不腐烂
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

