claude-code-memory-setup  by lucasrosati

AI coding agent enhancement for persistent memory and codebase understanding

Created 2 weeks ago

New!

342 stars

Top 80.9% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This repository provides a robust setup for Claude Code, enabling persistent memory and deep codebase awareness to drastically reduce token consumption. It targets developers seeking to enhance Claude Code's efficiency and long-term context retention by integrating Obsidian for knowledge management and Graphify for code structure analysis, leading to significant token savings and continuous project understanding.

How It Works

The system integrates Obsidian Zettelkasten as a centralized "second brain" for persistent memory, storing project decisions and knowledge in atomic, interlinked notes to combat session amnesia. Graphify transforms codebases into queryable knowledge graphs using Abstract Syntax Trees (AST) via tree-sitter, allowing Claude Code to understand code structure without costly file re-reading. A chat import pipeline ingests past conversations into Obsidian, preserving insights. Commands like /resume and /save enhance session continuity.

Quick Start & Requirements

  • Prerequisites: Claude Code installed and authenticated; Obsidian installed (obsidian.md).
  • Setup: Create a centralized Obsidian vault with a defined folder structure and configure CLAUDE.md for global instructions. Install claude-conversation-extractor (pip install claude-conversation-extractor) and custom scripts for chat import, scheduled via crontab. Install Graphify (pip install graphifyy, graphify install).
  • Links: Obsidian: obsidian.md

Highlighted Details

  • Token Efficiency: Claims up to 71.5x fewer tokens per session, with a tested 499x reduction per query on a large project.
  • Graphify: Processes code locally via AST (0 token cost), supporting over 20 languages. Generates queryable graph.json, interactive graph.html, and reports. Efficient updates via SHA256 caching.
  • Obsidian: Utilizes a single, centralized vault for cross-project knowledge linking and Zettelkasten principles.
  • Chat Persistence: Imports Claude Code and Web chats, enriching the knowledge base with structured notes.

Maintenance & Community

Inspired by Andrej Karpathy and the r/ClaudeAI community. Encourages GitHub stars. Specific details on active maintenance, contributors, or dedicated community channels (like Discord/Slack) are not provided.

Licensing & Compatibility

  • Graphify: MIT License, permitting broad commercial use and integration.
  • Obsidian: Free for personal use.
  • Compatibility: Graphify's AST mode operates locally without token costs, ideal for cost-conscious workflows.

Limitations & Caveats

Graphify's semantic wiki generation requires LLM calls (--mode deep), incurring token costs. Obsidian may have indexing issues with filenames containing parentheses, requiring manual renaming. macOS cron jobs need Full Disk Access for the terminal. Setup involves integrating multiple tools and custom scripting, potentially increasing initial complexity.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
2
Star History
345 stars in the last 15 days

Explore Similar Projects

Feedback? Help us improve.