Claude Memory Skill

by hanfang• 59•• Scanned•Claim this listing•Request removal
Database Managementai memoryanthropicclaudeclaude codeclaude code skills

A minimal, low-friction memory system for Claude Code

Claude Memory Skill is an open-source agent skill by hanfang, written mainly in Shell, with 59 GitHub stars and the MIT license. Its code was last updated Feb 7, 2026.

claude-memory-skill

╔══●══●══●══════════════════════════════════════════════╗
║                                                       ║
║  > tree ~/.claude/memory                              ║
║                                                       ║
║    ├── core.md          claude-memory-skill           ║
║    ├── topics/          ───────────────────           ║
║    │   └── *.md         a skill is all you need       ║
║    └── me.md                                          ║
║                                                       ║
╚═══════════════════════════════════════════════════════╝

An embarrassingly simple and minimal implementation for agentic memory.

No databases. No embeddings. No semantic search. Just markdown files and a skill that teaches Claude when to read and write.

The Problem

Claude Code forgets everything between sessions. Built-in auto-memory exists but:

  • It's opaque (Claude decides what's "meaningful")
  • Limited to 200 lines loaded at startup
  • Not tightly integrated into the agentic loop
  • No hierarchical organization (scales poorly)

The Solution

A skill-based memory protocol with:

  • Hierarchical storage: core.md summaries → topics/<topic>.md details
  • Background agents: Memory ops don't block the main agent
  • Categorized entries: No dumping ground, everything has a topic
  • Filesystem-based: Robust, inspectable, git-trackable

Installation

curl -fsSL https://raw.githubusercontent.com/hanfang/claude-memory-skill/main/install.sh | bash

Or clone and run locally:

git clone https://github.com/hanfang/claude-memory-skill.git
cd claude-memory-skill
./install.sh

What Gets Installed

~/.claude/
├── CLAUDE.md              # Hook added (or created)
├── commands/
│   └── mem.md             # The memory skill
└── memory/
    ├── core.md            # Summaries + pointers (always loaded)
    ├── me.md              # About you (always loaded)
    ├── topics/            # Detailed entries by topic
    │   └── <topic>.md
    └── projects/          # Project-specific memories
        └── <project>.md

Architecture

┌─────────────────────────────────────────────────────┐
│  Main Agent                                         │
│  - Focuses on user's task                           │
│  - Spawns memory agent when needed                  │
│  - Doesn't wait (background)                        │
└─────────────────────┬───────────────────────────────┘
                      │ spawn (background)
                      ▼
┌─────────────────────────────────────────────────────┐
│  Memory Agent                                       │
│  - Reads core.md + relevant topics                  │
│  - Writes to topic files                            │
│  - Updates core.md summaries                        │
└─────────────────────────────────────────────────────┘

How It Works

Agent-Initiated (Automatic)

These run automatically — you don't invoke them:

ActionWhenBlocking
loadSession startNo
saveClaude learns something usefulNo
recallClaude needs contextNo

User-Initiated (Manual)

These are for you to inspect and manage memory:

CommandDescription
/mem showDisplay memory structure and contents
/mem forget <topic>Remove a topic or specific entries

Tell Claude What to Remember

Just say it naturally:

  • "Remember that we use pnpm, not npm"
  • "Save that the API requires auth headers"
  • "Note that tests need Redis running"

Fill In Your Profile

Edit ~/.claude/memory/me.md with facts about yourself:

# About the User

- AI researcher, focus on agents and RL
- Prefer explicit code over clever abstractions
- Python, PyTorch, JAX

Hierarchical Memory

core.md (always loaded):

# Core Memory

## Debugging
Mostly async/timing issues. Prefer explicit logging.
→ topics/debugging.md

## RL Research
PPO tuning, reward shaping experiments.
→ topics/rl.md

topics/debugging.md (loaded on demand):

## Async race condition fix [2024-01-15]
Added explicit locks around shared state access.

## Redis timeout debugging [2024-01-10]
Default timeout was too short for large payloads.

Write Flow

  1. Learn something → spawn background memory agent
  2. Agent categorizes → finds or creates topic file
  3. Agent appends entry with timestamp
  4. If significant, agent updates core.md summary

Read Flow

  1. Session start → agent reads core.md + me.md in background
  2. When stuck → agent follows pointers to relevant topics
  3. Returns context to main agent

Design Principles

  • Background ops: Memory doesn't block the main agent
  • Hierarchical: Summaries in core.md, details in topics
  • Categorized: Every entry belongs to a topic
  • Atomic entries: One ## block = one memory
  • No semantic search: Deterministic, grep-based retrieval
  • User editable: Plain markdown, edit anytime

Uninstall

rm -rf ~/.claude/memory
rm ~/.claude/commands/mem.md
# Manually remove the memory hook from ~/.claude/CLAUDE.md

License

MIT

Claude Memory Skill alternatives

View more →

Similar agent skills in Database Management, ranked by GitHub stars. Compare licence, recent activity and scan status before you choose.

NameStarsLicenceLast updatedScan
Claude Memory Skill (this page)
hanfang
59MITFeb 7, 2026Scanned, no flagged issues
Understand Anything
Egonex-AI
90kMITOct 26, 2026Scanned, no flagged issues
Scientific Agent Skills
K-Dense-AI
56kMITOct 26, 2026Scanned, no flagged issues
Zvec
alibaba
16kApache-2.0Nov 1, 2026Scanned, no flagged issues
Claude Obsidian
AgriciDaniel
16kMITOct 25, 2026Scanned, no flagged issues
Prompt Master
nidhinjs
15kMITOct 22, 2026Scanned, no flagged issues