Skip to content

Claude Memory Engine

Claude Code 的記憶系統 | A memory system built with hooks + markdown. Zero dependencies.

Install

$git clone https://github.com/HelloRuru/claude-memory-engine

Install command taken from the project's README or registry entry. Always review code before running it.

Claude Memory Engine

Not just memory — it learns. Learn from mistakes. Learn to improve. AI can be a student too, growing through every cycle.

Built with hooks and markdown. No database. No external API. Just scripts and files. Nothing hiding.

English  |  繁體中文  |  日本語


WHAT — Every new conversation, Claude starts from zero

  • That bug you spent 30 minutes on last session — it hits the same wall again
  • Your preferences, your project rules — gone the moment a new session starts
  • Switch from Project A to Project B — it can't tell which is which
  • Long conversations get fuzzy — important decisions vanish after compression
  • Memory files pile up — no one organizes them, they just keep growing
  • Your computer dies — local memory gone, no backup

Memory tools can help it "remember." But remembering is not the same as learning.


WHY — Because it learns

Memory Engine doesn't just help Claude remember — it teaches Claude to learn like a student:

  • Mistakes don't repeat — it saves both the problem and the fix
  • Switching projects doesn't mean starting over — it knows what you're working on
  • It gets better over time — each cycle, it understands you a little more
  • You can see how it learns — everything is markdown and JS, no black box

HOW — Through the Student Loop

  • Student Loop — 8-step learning cycle, like cramming for finals but it keeps getting better
  • Smart Context — auto-loads the right project's memory based on your working directory
  • Auto Learn — saves both the problem and the fix when it hits a wall, won't repeat the same mistake

:brain: The Student Loop

Think of it like exam prep. I'm trying to make Claude Code act like a student cramming for finals — take notes after every class, organize them, review for patterns, build an error notebook, and do a big end-of-term review. Each cycle, it gets a little better.

In class (automatic, runs every session)

There is no real "end" to a Claude Code conversation — it might close, idle out, or get compressed. So Memory Engine doesn't rely on any single moment. Instead, it saves at three different points:

  1. Every 20 messages (mid-session-checkpoint) — saves a checkpoint + mini analysis. The most reliable save point, because it counts messages itself
  2. Before context compression (pre-compact) — fires right before context is compressed. Saves a snapshot, detects pitfalls, runs backup. This is when context is fullest, so pitfall detection is most accurate here
  3. When the conversation ends (session-end) — saves a final summary + backup. Nice to have, but not guaranteed to fire (window might just close)

You don't need to remember to run any command before closing — your important stuff is already saved before you close.

On top of that, Claude also:

  • Takes notes — records what was done, which files changed, key decisions made
  • Links them — tags the project, connects to previous notes
  • Spots patterns — scans for pitfall signals (retrying 5+ times, errors followed by fixes, user corrections)

Final exam review (manual, run /reflect)

After a few days of notes, run /reflect and Claude will:

Similar plugs

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies

Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro,…

Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…