Skip to main content
ClaudeWave
Slash Command91 repo starsupdated 9d ago

recall

The recall slash command retrieves stored memories specific to the current Git branch from a centralized memory bank located at the repository root under .claude/memory-bank/. Use this command to access contextual information, previous session notes, and project decisions relevant to your current work branch, helping maintain continuity across multiple Claude sessions.

Install in Claude Code
Copy
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/tony/claude-code-riper-5/HEAD/.claude/commands/memory/recall.md -o ~/.claude/commands/recall.md
Then start a new Claude Code session; the slash command loads automatically.

recall.md

# Recalling from Memory Bank

I'll retrieve memories from the branch-aware memory bank.

## ⚠️ Memory Bank Location Requirements

**CRITICAL PATH POLICY**: 
- Memory-bank MUST be at repository root: Use `git rev-parse --show-toplevel` to find root, then `[ROOT]/.claude/memory-bank/`
- NEVER create package-level memory-banks: `packages/*/.claude/memory-bank/` ❌
- In monorepos: ONE memory-bank at root serves entire project

### Correct vs Incorrect Paths for Recall
✅ **Correct**: `[ROOT]/.claude/memory-bank/main/session.md` (where ROOT = `git rev-parse --show-toplevel`)
❌ **Wrong**: `[ROOT]/packages/react/.claude/memory-bank/main/session.md`
❌ **Wrong**: `packages/react/.claude/memory-bank/main/session.md`

## Current Context
- **Branch**: !`git branch --show-current`
- **Date**: !`date +%Y-%m-%d`

## Git History Since Last Session

Show commits since last memory save:
```bash
last_memory=$(ls -t $(git rev-parse --show-toplevel)/.claude/memory-bank/$(git branch --show-current)/sessions/*.md 2>/dev/null | head -1)
if [ -n "$last_memory" ]; then
    last_date=$(stat -c %y "$last_memory" | cut -d' ' -f1)
    git log -n 10 --oneline --since="$last_date"
fi
```

Show recent changes to memory bank:
```bash
git log -n 5 -p -- .claude/memory-bank/
```

## Search Scope
Looking for memories in: `[ROOT]/.claude/memory-bank/!`git branch --show-current`/` (where ROOT = `git rev-parse --show-toplevel`)

## Search Query
$ARGUMENTS

## Available Memories
!`ls -la $(git rev-parse --show-toplevel)/.claude/memory-bank/$(git branch --show-current)/ 2>/dev/null || echo "No memories found for current branch"`

I'll search for and display relevant memories based on your query, along with git history context since the last session.