Memory Engine
A hook-driven memory system for Claude Code that auto-saves session context, hands off work between windows, and learns from repeated mistakes.
UtilitiesIntermediate★ 132⑂ 27AI score 9/10Last updated: May 11, 2026
What it does
- Smart Context — detects the current project from your working directory and loads that project's memory at session start, with no hardcoded paths.
- Auto Learn (pitfall detection) — spots retries, error-then-fix sequences, and user corrections before context compaction, saving both the problem and the fix. The same mistake three or more times gets promoted to a permanent rule.
- Student Loop (/reflect) — an 8-step cycle: note, link, spot patterns, review, refine, re-study, slim down, report.
- Session Handoff (/handoff) — writes progress, decisions, and unfinished tasks to a file the next Claude Code window auto-detects.
- Correction Cycle (/analyze) — logs the edits you make by hand, the kind of mistake that never shows up in error logs.
- Saves at three points (every 20 messages, before compaction, at session end) so you never have to remember a command.
Who it's for
- Anyone running long multi-session work who keeps losing context to compaction.
- Developers juggling several projects who want per-project memory kept separate.
- Multi-device Claude Code users who want memory synced through a GitHub backup repo.
- People tired of Claude repeating the same mistake and wanting it hardened into a rule.
Examples
- Context is about to fill up mid-task → run
/handoff, open a fresh window, and the new session picks up the progress file automatically. - End of the week → run
/reflectto review the last 7 days, prune stale notes, and upgrade recurring pitfalls into hard rules. - Switching from work laptop to home machine →
/sync(memory-backup.sh sync) for two-way sync with the backup repo, then/reload. - MEMORY.md is bloating →
/memory-healthreports line-count warnings so you can move old content into standalone files.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/HelloRuru/claude-memory-engine/HEAD/skill/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skill folder from the GitHub repo HelloRuru/claude-memory-engine into my ~/.claude/skills/memory-engine/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/HelloRuru/claude-memory-engine.git /tmp/claude-memory-engine && mkdir -p ~/.claude/skills/memory-engine && cp -r /tmp/claude-memory-engine/skill/* ~/.claude/skills/memory-engine/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and clone the repo:
git clone https://github.com/HelloRuru/claude-memory-engine.git - Enter the folder:
cd claude-memory-engine - Check the README for an official install script — use it if one exists, since this skill spans hooks, commands, and settings.
- Back up your current config:
cp -r ~/.claude ~/.claude.bak - Copy the skill:
mkdir -p ~/.claude/skills/memory-engine && cp -r skill/* ~/.claude/skills/memory-engine/ - Copy the hook scripts into
~/.claude/scripts/hooks/and the command files into~/.claude/commands/. - Register the SessionStart, SessionEnd, PreCompact, UserPromptSubmit, and PreToolUse hooks in
~/.claude/settings.json. - For backups, create a private GitHub repo for your memory, point
memory-backup.shat it, and test withmemory-backup.sh push. - Restart Claude Code and run
/overviewor/checkto confirm everything is wired up.
View source on GitHub ↗License: MIT