Sponsor Suno AI Music arrow_forward
Memory Tool

Claude Code Memory Setup

An Obsidian + graph memory setup that reports up to 71.5x fewer tokens per Claude Code session.

Type
Memory Tool
GitHub stars
995
License
MIT
Repo last updated
Sep 11, 2026
Source file
README.md

What Claude Code Memory Setup is

Claude Code Memory Setup is a memory tool published in the lucasrosati/claude-code-memory-setup repository on GitHub, which has about 995 stars. The repository describes itself as: “Up to 71.5x fewer tokens per session on Claude Code with Obsidian + Graphify. Persistent memory, codebase knowledge graphs, and chat import pipeline. 🇧🇷 PT-BR included.”

Claude Code Memory Setup is a community resource for extending Claude Code and Claude Cowork. Check the repository README for how the author intends it to be used.

Because resources like this change often, read the source before you rely on it and pin the version you tested.

How to install Claude Code Memory Setup

Claude Code

  1. Download the source file from the repository.
  2. Save it as ~/.claude/skills/<skill-name>/SKILL.md for all projects, or .claude/skills/<skill-name>/SKILL.md for one project.
  3. Claude loads it automatically when a task matches; you can also run it with / and its name.

Claude Cowork

  1. Zip the skill folder so SKILL.md sits at the top level of the folder.
  2. Open Customize → Skills, click +, then upload the ZIP.
  3. Start a task that matches the description, or call it by name with /.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from README.md, shared under the repository's MIT license. Read the full file on GitHub.

> 71.5x fewer tokens per session with Graphify + permanent memory across sessions with Obsidian Zettelkasten.

A complete setup to turn Claude Code into an agent with long-term memory and full codebase awareness — without wasting tokens re-reading files.

🇧🇷 Leia em Português

Table of Contents

  1. The Problem
  2. The Solution (Overview)
  3. Part 1 — Obsidian as Persistent Memory
  4. Part 2 — Chat Import Pipeline
  5. Part 3 — Graphify (Codebase Knowledge Graph)
  6. Part 4 — Complete Workflow
  7. Part 5 — Auto-Save Hook (Safety Net)
  8. Real Results
  9. Troubleshooting

The Problem

When working with Claude Code, two problems silently eat your tokens:

Problem 1 — Amnesia between sessions. Every time you open a new session, you have to re-explain your project: stack, past decisions, current bugs, what's left to do. Claude Code remembers nothing from the previous session.

Problem 2 — Codebase re-reading. Claude Code re-reads all your project files every session to understand the structure. A project with ~40 files burns ~20,000 tokens just for Claude to orient itself — before you even ask a question. If you run 10 sessions a day, that's 200,000 wasted tokens.

The Solution (Overview)

Two complementary systems, each solving a different problem:

Obsidian handles what was decided (declarative memory). Graphify handles how the code is structured (structural map). Together, Claude Code starts every session knowing everything — without re-reading anything.

Part 1 — Obsidian as Persistent Memory

Concept

A single, centralized Obsidian vault acts as Claude Code's "second brain." It stores decisions, context, progress, and knowledge for all your projects. Notes follow the Zettelkasten method: atomic (one idea per note), densely interlinked, with standardized metadata.

Claude Code accesses the vault through CLAUDE.md and custom skills.

Recommended Structure

~/vault/                              # SINGLE vault for all projects
├── CLAUDE.md                         # global instructions for Claude Code
├── permanent/                        # consolidated atomic notes
├── inbox/                            # raw capture (ideas, drafts)
├── fleeting/                         # quick temporary notes
├── templates/                        # note templates
├── logs/                             # global session logs
├── references/                       # reference material
├── my-project/                       # MOCs and notes for project X
│   ├── architecture/                 #   architecture, decisions, conventions
│   ├── pipeline/                     #   data flows, APIs
│   ├── data/                         #   schema, data model
│   ├── features/                     #   planned/implemented features
│   └── logs/                         #   project session logs
├── another-project/                  # MOCs and notes for project Y
│   └── ...
├── chats/                            # imported Claude chats
│   ├── code/                         #   from Claude Code
…

> Why a single vault? Having one vault per project fragments knowledge. With a single vault, a note about "Supabase Auth" links to both project A and B. The graph view reveals cross-project connections you didn't expect.

Step-by-Step Setup

Prerequisites:

  • Claude Code installed and authenticated
  • Obsidian installed (free: obsidian.md)

1. Create the vault:

Obsidian → "Create new vault" → choose a name and location.

2. Create the folder structure:

cd ~/vault  # adjust to your path
mkdir -p permanent inbox fleeting templates logs references
mkdir -p my-project/{architecture,pipeline,data,features,logs}

3. Create the CLAUDE.md:

This is the file Claude Code reads automatically. Create CLAUDE.md at the vault root:

# Vault — Instructions for Claude Code

## What is this vault
Centralized knowledge base for all projects.
Persistent memory across sessions.

## Project stacks
- Project X: React + Supabase
- Project Y: Python + FastAPI
(adapt to your projects)

## Zettelkasten Rules

### Note creation
- Use wikilinks: [[note-name]] (not markdown links)
- Mandatory YAML frontmatter on every note
- Filenames in kebab-case: `auth-flow.md`, not `Auth Flow.md`
- 1 concept per permanent note (atomicity)
…

4. Create a note template:

cat > templates/default-note.md << 'EOF'
---
title: {{title}}
tags: []
created: {{date}}
updated: {{date}}
status: draft
type: permanent
---

# {{title}}

## Context

## Details

## Related links
EOF

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Claude Code Memory Setup?

Claude Code Memory Setup is a memory tool for Claude Code and Claude Cowork from the lucasrosati/claude-code-memory-setup repository on GitHub. An Obsidian + graph memory setup that reports up to 71.5x fewer tokens per Claude Code session.

How do I install Claude Code Memory Setup in Claude Code?

Download the source file from the repository. Save it as ~/.claude/skills/<skill-name>/SKILL.md for all projects, or .claude/skills/<skill-name>/SKILL.md for one project. Claude loads it automatically when a task matches; you can also run it with / and its name.

Can I use Claude Code Memory Setup in Claude Cowork?

Zip the skill folder so SKILL.md sits at the top level of the folder. Open Customize → Skills, click +, then upload the ZIP. Start a task that matches the description, or call it by name with /.

Is Claude Code Memory Setup safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.