memory

Stores and retrieves cross-project persistent memories via the mem CLI.

Updated Sep 14, 2026
One-click install
npx skills add https://github.com/Royrahav/my_claude_components --skill memory-royrahav
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: memory
Source: https://github.com/Royrahav/my_claude_components/tree/main/claude-memory/skill
Command: npx skills add https://github.com/Royrahav/my_claude_components --skill memory-royrahav

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI coding sessions forget everything when they end, forcing users to repeat standing instructions, re-explain project quirks, and lose track of unfinished work. This Skill provides a persistent, scoped memory store at ~/.claude/memory so decisions, preferences, and in-progress work survive across sessions and projects. ## Core Features & Use Cases - Scoped Recall: Memories are organized into global, repo-specific, and topic scopes, with a session-start catalog that lists one-line hooks so only relevant entries are loaded in full via mem get or mem search. - Structured Writing: Write single-fact memories with mem write using typed frontmatter (user, feedback, project, reference, decision), enforced hooks, keywords, and required Why/How-to-apply sections. - Work Checkpoints: Capture unfinished work with mem checkpoint so a new session can resume exactly where the last one stopped, then close it out with mem set when done. - Use Case: Before starting work in a repo, run mem search to surface standing instructions like "never unshelve before editing a shelved CL"; at session end, checkpoint the in-progress changelist so the next session picks it up. ## Quick Start Ask the assistant to remember a decision or preference using the memory skill, for example: remember that this repo's dbo.jobs column names differ from the docs.

Frequently Asked Questions about memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save a memory for future AI sessions?

Use mem write with a markdown document containing frontmatter fields like id, title, hook, type, and scope, plus a one-fact body. Check for an existing memory with mem search first and update it rather than creating a near-duplicate.

How do I resume unfinished work in a new session?

Before ending a session, run mem checkpoint with a project-type memory describing the current state, next step, and blockers. The next session sees it pinned at the top of the catalog and can verify state with tools like git status or p4 describe before resuming.

What is the difference between global, repo, and topic memory scopes?

Global holds facts true everywhere, repo.<key> holds facts true only in one codebase, and topic.<area> holds platform facts true from any checkout. A session reads its own repo scope plus global plus all topic scopes.

Does the memory store load everything into every session?

No. Only one-line catalog hooks are injected at session start; full memory bodies are loaded on demand with mem get or mem search. This keeps context costs low while keeping the whole store discoverable.

How do I clean up stale or duplicate memories?

Run mem gc to report expired, finished, never-retrieved, duplicate, and oversized entries, then mem gc --apply to archive the clear-cut ones into backups/removed/. Merge candidates and stale entries are reported only and never auto-applied.

Why is a memory not showing up in my session?

The memory may be filed under the wrong scope, expired, or marked done, superseded, or archived, all of which remove it from the catalog. Check scope resolution with mem scope and the entry's status with mem get.