← all repositories
lucasrosati/claude-code-memory-setup

A second brain for Claude Code, built from Obsidian notes and ASTs

A setup guide that gives Claude Code persistent memory across sessions and a codebase knowledge graph so it stops re-reading your files.

Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does This repo is a setup guide (with supporting scripts) that wires Claude Code into two external systems: an Obsidian Zettelkasten vault for long-term project memory, and Graphify for a queryable knowledge graph of your codebase. A /resume command has Claude read recent session logs and decision notes to pick up where you left off; /save writes a new log. A Python pipeline also imports your old Claude chats into the vault as tagged, wikilinked notes.

The interesting bit The split of responsibilities is the actual idea: Obsidian stores what was decided (declarative memory), Graphify stores how the code is structured (a structural map built locally via tree-sitter ASTs, 20 languages, zero tokens in default mode). Claude Code queries the graph instead of re-reading source files — though the README is refreshingly honest that the famous “71.5x fewer tokens” figure is author-reported, not reproducible from published data.

Key highlights

  • Single vault for all projects, so cross-project notes (e.g. “Supabase Auth”) link naturally and the graph view surfaces unexpected connections.
  • Graphify’s AST mode runs 100% locally with SHA256 caching — only modified files get reprocessed.
  • Chat import pipeline adds frontmatter, auto-tags, and wikilinks to exported Claude Code and Web conversations.
  • An auto-save hook acts as a safety net so session context isn’t lost.
  • Full PT-BR translation included.

Caveats

  • The headline token-savings numbers are illustrative, not measured — the README itself says the ~20,000 vs ~280 token comparison assumes the smaller output answers the same question, and the original payloads were never published.
  • It’s glue, not a product: you’re assembling Obsidian, Graphify, a browser extension, cron jobs, and hand-written scripts. Expect an evening of setup and ongoing note hygiene.
  • Graphify’s semantic mode needs an Anthropic or Moonshot API key; only pure AST mode is free of LLM costs.

Verdict Worth a look if you already live in Obsidian and want Claude Code sessions that don’t start from amnesia. If Zettelkasten discipline sounds like homework, this will decay into an abandoned vault within a month.

Frequently asked

What is lucasrosati/claude-code-memory-setup?
A setup guide that gives Claude Code persistent memory across sessions and a codebase knowledge graph so it stops re-reading your files.
Is claude-code-memory-setup open source?
Yes — lucasrosati/claude-code-memory-setup is open source, released under the MIT license.
What language is claude-code-memory-setup written in?
lucasrosati/claude-code-memory-setup is primarily written in Python.
How popular is claude-code-memory-setup?
lucasrosati/claude-code-memory-setup has 1k stars on GitHub.
Where can I find claude-code-memory-setup?
lucasrosati/claude-code-memory-setup is on GitHub at https://github.com/lucasrosati/claude-code-memory-setup.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.