Claude Code Memory Setup is a workflow that gives Claude Code persistent project memory and selected codebase context using Obsidian notes, chat imports, and Graphify knowledge graphs. Developers use it to retain decisions between sessions and retrieve relevant code information without repeatedly reading the whole repository. Its catalogue commands support this memory and code-context workflow.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/lucasrosati/claude-code-memory-setupWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/lucasrosati/claude-code-memory-setup/resume)<a href="https://agentmods.dev/commands/lucasrosati/claude-code-memory-setup/resume"><img src="https://agentmods.dev/badge/commands/lucasrosati/claude-code-memory-setup/resume/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/lucasrosati/claude-code-memory-setup/resume"><img src="https://agentmods.dev/badge/commands/lucasrosati/claude-code-memory-setup/resume.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00795 |
| Opus 5.5 | $0.00000 | $0.00318 |
| Sonnet 5.5 | $0.00000 | $0.00159 |
| Haiku 4.5 | $0.00000 | $0.00080 |
Grade A, and why
resume scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/resume — Load Context from the Previous Session
When you receive this command, do the following:
Vault detection (by project, never by a fixed path)
- Run this block (one Bash call) and use the printed
vault=as<vault>,project=as<project>,project_dir=as<vault>/<project>andlogs=as the log folder for the rest of the command:setopt nullglob 2>/dev/null # zsh aborts on unmatched globs; no-op in bash vault=${VAULT_DIR:-$HOME/vault} root=$(git rev-parse --show-toplevel 2>/dev/null); root=${root:-$PWD} project=$(basename "$root") if [ -d "$vault/$project" ]; then pdir="$vault/$project"; logs="$pdir/logs"; else pdir=""; logs="$vault/logs"; fi echo "vault=$vault project=$project project_dir=${pdir:-NONE} logs=$logs"- The vault is
$VAULT_DIR(default~/vault). The project is the basename of the git top-level folder, or of the current directory outside git. project_dir=NONE: say so, suggest creating<vault>/<project>/(Part 1 of the guide), and load only the logs from<vault>/logs/. Don't create a vault folder.
- The vault is
- Also read the general rules in
<vault>/CLAUDE.mdand, if it exists,<vault>/<project>/_moc.md.
Load context
- Read
<vault>/<project>/CLAUDE.mdif it exists (the project's permanent memory, including## Permanent facts). - Split the logs in
<logs>, newest first, into rich (written by/save) and automatic (stub from the SessionEnd hook, withauto-login the tags):cd "<logs>" && for f in $(ls -t); do grep -qx ' - auto-log' "$f" && echo "auto $f" || echo "rich $f"; done | head -20 - Read the last 3 rich logs (or the requested number). From the automatic logs newer than the last rich one, read only the frontmatter and
## Stats: they go in one line ("since then: N short sessions, no rich log"). - Read the most recent entries of
<vault>/<project>/architecture/decisions.md(the file can have thousands of lines: read from the end, starting at the last##headings, not the whole file). - A pending item in a log is a snapshot of the past. A deadline quoted in memory ("by 10/10") counts as pending only if the date hasn't passed.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 45 lines · 0 tokens per session scan A 6438762f8c7c
resume is a command published in the GitHub repository lucasrosati/claude-code-memory-setup (1,038 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 795 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-22.
Other commands, from other repositories
save-memory
You are saving what you learned this session into the megamemory knowledge graph. This is YOUR memory — record anything valuable for future sessions: what you understood about the project, what you built, decisions that were made, patterns you noticed, or intent the user shared.
bootstrap-memory
RUN { git ls-files; git ls-files --others --exclude-standard; } 2>/dev/null | sort -u | xargs wc -l 2>/dev/null | sort -rn | head -150 READ README.md.
handoff
Create, accept, or update the persistent .context/ai-handoff.md state shared by AI sessions and machines. Use when continuing in a new Claude or Codex session, transferring work between clients, or recording ownership and restart state.
speckit.archive
Archive a feature specification into main project memory after merge, resolving gaps and conflicts.
memory-search
Search agent memory + learned patterns for cross-session context relevant to $ARGUMENTS.
slm-bot-memory
Cross-bot memory on a shared computer (Grok Bot, Cursor plugin, any host where several agents share one machine). Explains agentid attribution vs. profile/scope access, how to namespace by agentid + profile + scope, and what must never be written to memory. Read this before the first remember/recall on a new…