agent-memory by yamadashy/repomix
npx skills add https://github.com/yamadashy/repomix --skill agent-memory一个持久的记忆空间,用于存储跨对话保留的知识。
位置: .claude/skills/agent-memory/memories/
当发现值得保存的内容时,保存记忆:
开始相关工作前检查记忆:
需要时整理记忆:
尽可能将记忆组织到分类文件夹中。没有预定义的结构 - 根据内容创建有意义的分类。
指导原则:
示例:
memories/
├── file-processing/
│ └── large-file-memory-issue.md
├── dependencies/
│ └── iconv-esm-problem.md
└── project-context/
└── december-2025-work.md
这只是一个示例。根据实际内容自由构建结构。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
所有记忆必须包含带有 summary 字段的 frontmatter。摘要应足够简洁,以便决定是否阅读完整内容。
摘要是决策点:代理通过 rg "^summary:" 扫描摘要,以决定完整阅读哪些记忆。编写的摘要应包含足够的上下文来做出此决定 - 记忆是关于什么的,关键问题或主题,以及为什么它很重要。
必需项:
---
summary: "1-2 行描述此记忆包含的内容"
created: 2025-01-15 # YYYY-MM-DD 格式
---
可选项:
---
summary: "处理大文件时工作线程内存泄漏 - 原因与解决方案"
created: 2025-01-15
updated: 2025-01-20
status: in-progress # in-progress | resolved | blocked | abandoned
tags: [performance, worker, memory-leak]
related: [src/core/file/fileProcessor.ts]
---
使用摘要优先的方法高效查找相关记忆:
# 1. 列出分类
ls .claude/skills/agent-memory/memories/
# 2. 查看所有摘要
rg "^summary:" .claude/skills/agent-memory/memories/ --no-ignore --hidden
# 3. 在摘要中搜索关键词
rg "^summary:.*keyword" .claude/skills/agent-memory/memories/ --no-ignore --hidden -i
# 4. 按标签搜索
rg "^tags:.*keyword" .claude/skills/agent-memory/memories/ --no-ignore --hidden -i
# 5. 全文搜索(当摘要搜索不够时)
rg "keyword" .claude/skills/agent-memory/memories/ --no-ignore --hidden -i
# 6. 如果相关,读取特定的记忆文件
注意: 记忆文件被 gitignore 忽略,因此使用 ripgrep 时需要 --no-ignore 和 --hidden 标志。
date +%Y-%m-%d 获取当前日期)mkdir -p .claude/skills/agent-memory/memories/category-name/
# 注意:写入前检查文件是否存在,以避免意外覆盖
cat > .claude/skills/agent-memory/memories/category-name/filename.md << 'EOF'
---
summary: "此记忆的简要描述"
created: 2025-01-15
---
# 标题
内容在此...
EOF
更新:当信息发生变化时,更新内容并在 frontmatter 中添加 updated 字段
删除:删除不再相关的记忆
trash .claude/skills/agent-memory/memories/category-name/filename.md
# 移除空的分类文件夹
rmdir .claude/skills/agent-memory/memories/category-name/ 2>/dev/null || true
合并:当相关记忆增多时进行合并
重组:随着知识库的发展,将记忆移动到更合适的分类中
编写详细记忆时,考虑包括:
并非所有记忆都需要所有部分 - 使用相关的内容。
每周安装次数
259
仓库
GitHub Stars
22.6K
首次出现
2026年1月20日
安全审计
安装于
opencode218
gemini-cli212
codex210
github-copilot199
cursor190
amp174
A persistent memory space for storing knowledge that survives across conversations.
Location: .claude/skills/agent-memory/memories/
Save memories when you discover something worth preserving:
Check memories when starting related work:
Organize memories when needed:
When possible, organize memories into category folders. No predefined structure - create categories that make sense for the content.
Guidelines:
Example:
memories/
├── file-processing/
│ └── large-file-memory-issue.md
├── dependencies/
│ └── iconv-esm-problem.md
└── project-context/
└── december-2025-work.md
This is just an example. Structure freely based on actual content.
All memories must include frontmatter with a summary field. The summary should be concise enough to determine whether to read the full content.
Summary is the decision point : Agents scan summaries via rg "^summary:" to decide which memories to read in full. Write summaries that contain enough context to make this decision - what the memory is about, the key problem or topic, and why it matters.
Required:
---
summary: "1-2 line description of what this memory contains"
created: 2025-01-15 # YYYY-MM-DD format
---
Optional:
---
summary: "Worker thread memory leak during large file processing - cause and solution"
created: 2025-01-15
updated: 2025-01-20
status: in-progress # in-progress | resolved | blocked | abandoned
tags: [performance, worker, memory-leak]
related: [src/core/file/fileProcessor.ts]
---
Use summary-first approach to efficiently find relevant memories:
# 1. List categories
ls .claude/skills/agent-memory/memories/
# 2. View all summaries
rg "^summary:" .claude/skills/agent-memory/memories/ --no-ignore --hidden
# 3. Search summaries for keyword
rg "^summary:.*keyword" .claude/skills/agent-memory/memories/ --no-ignore --hidden -i
# 4. Search by tag
rg "^tags:.*keyword" .claude/skills/agent-memory/memories/ --no-ignore --hidden -i
# 5. Full-text search (when summary search isn't enough)
rg "keyword" .claude/skills/agent-memory/memories/ --no-ignore --hidden -i
# 6. Read specific memory file if relevant
Note: Memory files are gitignored, so use --no-ignore and --hidden flags with ripgrep.
date +%Y-%m-%d for current date)mkdir -p .claude/skills/agent-memory/memories/category-name/
# Note: Check if file exists before writing to avoid accidental overwrites
cat > .claude/skills/agent-memory/memories/category-name/filename.md << 'EOF'
---
summary: "Brief description of this memory"
created: 2025-01-15
---
# Title
Content here...
EOF
Update : When information changes, update the content and add updated field to frontmatter
Delete : Remove memories that are no longer relevant
trash .claude/skills/agent-memory/memories/category-name/filename.md
# Remove empty category folders
rmdir .claude/skills/agent-memory/memories/category-name/ 2>/dev/null || true
Consolidate : Merge related memories when they grow
Reorganize : Move memories to better-fitting categories as the knowledge base evolves
When writing detailed memories, consider including:
Not all memories need all sections - use what's relevant.
Weekly Installs
259
Repository
GitHub Stars
22.6K
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode218
gemini-cli212
codex210
github-copilot199
cursor190
amp174
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
106,200 周安装