CommunityWriting & Editinggithub.com

wowohhh/auto-memory

Claude Code Auto Memory workflow: four-phase cross-session memory management with slash commands

What is auto-memory?

auto-memory is a Claude Code agent skill that claude Code Auto Memory workflow: four-phase cross-session memory management with slash commands.

Works withClaude Code~Codex CLI~Cursor
npx skills add wowohhh/auto-memory

Installed? Explore more Writing & Editing skills: steipete/notion, affaan-m/seo, affaan-m/brand-voice · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Auto Memory 工作流

解决 Claude Code 跨会话知识丢失问题。四阶段:初始化 → 旧对话收尾 → 新对话恢复 → 定期维护。

核心理念

Compact 会丢失细节。把决策、进度、失败方案结构化存入文件系统,每次新对话自动恢复上下文。记忆库是索引 + 子文件的二维结构,不是长上下文窗口的替代品,而是补充。

适用场景

  • 项目跨多个会话开发,经常忘记之前的决策
  • 对话快满时需要把进度写入记忆
  • 新对话开始时需要快速恢复上下文
  • 记忆库混乱,需要清理重复/冲突/过时内容

不适用场景

  • 单次对话就能完成的小任务
  • 已经有完善项目文档且容易查找的工程
  • Agent 行为本身的指南(那应该放 CLAUDE.md)

工作流

阶段 1:初始化(一次性)

确认 Auto Memory 开启,创建 MEMORY.md 索引和 10 条维护纪律。详见 references/init-prompt.md

阶段 2:旧对话收尾 → /memory-sync

对话快满或任务告一段落时,把有价值内容写入记忆:进度、决策、失败方案、关键文件修改、下一步行动。详见 commands/memory-sync.md

阶段 3:新对话恢复 → /memory-resume

新对话开始,从 MEMORY.md 定位相关记忆,读取子文件,汇报进度并继续。详见 commands/memory-resume.md

阶段 4:定期维护 → /memory-clean

全量审查记忆库:合并重复、更新冲突、删除过时内容、检查敏感信息、统计大小。详见 commands/memory-clean.md

安装

# 克隆到项目级 skills 目录
mkdir -p .claude/skills && git clone https://github.com/YOUR_USERNAME/auto-memory.git .claude/skills/auto-memory

# 复制斜杠命令到项目
cp .claude/skills/auto-memory/commands/*.md .claude/commands/

文件结构

auto-memory/
├── SKILL.md                          # 本文件
├── README.md                         # 用户文档
├── LICENSE                           # MIT
├── commands/                         # 斜杠命令(复制到 .claude/commands/)
│   ├── memory-resume.md
│   ├── memory-sync.md
│   └── memory-clean.md
└── references/                       # 详细参考
    ├── maintenance-rules.md          # 10 条纪律 + 字段模板
    └── init-prompt.md                # 初始化提示词

记忆库结构(项目侧)

.claude/projects/<project>/memory/
├── MEMORY.md                         # 索引:一行一个主题
├── memory-maintenance-rules.md       # 10 条纪律(本 skill 写入)
├── <project>-progress.md             # 进度记忆
├── <decision-slug>.md                # 决策记忆
└── ...                               # 更多主题文件

Related Skills

steipete/notion

Notion CLI/API for pages, Markdown content, data sources, files, comments, search, Workers, and raw API calls.

community

affaan-m/seo

Audit, plan, and implement SEO improvements across technical SEO, on-page optimization, structured data, Core Web Vitals, and content strategy. Use when the user wants better search visibility, SEO remediation, schema markup, sitemap/robots work, or keyword mapping.

community

affaan-m/brand-voice

Build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then reuse that profile across content, outreach, and social workflows. Use when the user wants voice consistency without generic AI writing tropes.

community

affaan-m/crosspost

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

community

affaan-m/x-api

X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.

community

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

community