skills/yunshu0909/memory-init/SKILL.md
在当前目录下初始化记忆系统,生成 CLAUDE.md(可选 AGENT.md 给 Cursor 用)、MEMORY.md 和 memory/ 目录。当用户说"初始化记忆"、"搭建记忆"、"memory init"、"/memory-init"时触发。
npx skillsauth add aiskillstore/marketplace memory-initInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
在当前工作目录下一键部署记忆系统,生成三个东西:
/memory-init → 交互式初始化,逐步收集信息后生成先检查当前目录下是否已存在 CLAUDE.md、AGENT.md、MEMORY.md 或 memory/ 目录。
先用 ls 和 Glob 检查当前目录是否已有实质性项目文件(代码、文档、配置文件等)。注意:.claude/、.git/、node_modules/ 等工具目录不算项目文件。
问用户以下问题:
根据收集到的信息生成 CLAUDE.md,包含以下模块:
# 项目简介
[根据扫描结果或用户描述生成,2-3句话概括项目是什么、做什么用的]
# 人设
[根据用户角色和用途生成,1-2句话]
# 对话风格
[根据用户偏好生成,3-5条规则]
# 思考方式
[根据用户角色生成,3-5条思考优先级]
# 记忆协议
## 长期记忆(MEMORY.md)
- 存放稳定的核心信息:客户画像、个人偏好、关键决策
- 每次对话自动加载,始终在上下文中
- 超过 150 行时主动提议精简
## 每日记忆(memory/YYYY-MM-DD.md)
- 存放当天对话产生的要点:结论、洞察、待办、决策
- 对话结束前问一句"这次有值得记住的吗?",确认后写入当天文件
- 需要回顾历史时,搜索 memory/ 目录检索
## 工作流
1. 对话开始 → 用 Read 工具读取本项目根目录下的 MEMORY.md,再用 Read 读取 memory/当天日期.md(如 memory/2026-03-02.md),了解今天已有的上下文
2. 涉及历史上下文 → 用 Grep 工具搜索本项目根目录下的 memory/ 目录
3. 对话结束 → 问是否要记录,确认后写入 memory/当天日期.md
4. 如果产出了值得长期记住的信息(如新客户、重要决策),同步更新 MEMORY.md
5. 注意:以上所有文件路径都是相对于本项目根目录,不是全局 ~/.claude/ 目录
## 补充规则
- 记忆以本项目根目录下的文件为准,忽略 ~/.claude/ 下的 auto-memory(内置记忆系统),不要读也不要写
- 对话开始时,除了读今天的记忆,也读昨天的(memory/昨天日期.md),保持跨天连续性
- 用户说"记住这个"、"这个记一下"时,立刻写入文件,不要只"记在心里"等结束再存
- 每日记忆积累超过 7 天时,主动提议做一次蒸馏:把仍然有价值的要点合并到 MEMORY.md,过时的标记或清理
注意:记忆协议部分是固定模板,不随用户输入变化。项目简介、人设、对话风格、思考方式根据用户输入定制。
生成 CLAUDE.md 之后,问用户:
"你还用 Codex 吗?要不要同时生成一份 AGENT.md?内容和 CLAUDE.md 一模一样,Codex 会自动读取 AGENT.md。"
AGENT.md 和 CLAUDE.md 内容完全相同,唯一区别是文件名。CLAUDE.md 给 Claude Code 用,AGENT.md 给 Codex 用。
创建初始的长期记忆文件:
# 记忆
## 关于我
- 角色:[用户的角色]
- 日常工作:[用户的主要用途]
## 项目与上下文
-(待补充)
## 工作习惯与偏好
- [如果用户提供了偏好,写在这里]
## 重要决策
- [今天日期]:初始化记忆系统
mkdir -p memory/
如果用户愿意,把当前对话的初始化过程作为第一条每日记忆写入 memory/当天日期.md。
告诉用户生成了什么,简要说明使用方法:
已生成:
- CLAUDE.md(人设 + 记忆协议,Claude Code 用)
- AGENT.md(同上,Cursor 用)← 如果用户选了才显示这行
- MEMORY.md(长期记忆)
- memory/(每日记忆目录)
使用方式:
- 正常对话即可,我会自动读取记忆
- 对话结束时我会问你要不要保存要点
- 说"记住这个"可以随时存记忆
- 积累一段时间后说"整理记忆"做一次蒸馏
人设和风格可以个性化,但记忆协议模块不要改——这是系统运行的基础逻辑,保持一致才能在不同目录下通用。
如果目录下已有 CLAUDE.md 或 AGENT.md,默认不覆盖。用户明确要求才覆盖。
初始化完成后,下次新开对话就应该能正常工作——读到 MEMORY.md、按协议执行。不需要额外配置。
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.