Перейти к содержимому

Stop Repeating Yourself to Claude Code

Evan Batky

0:00 / 0:00

Stop Repeating Yourself to Claude Code

28 просмотров · 11 дней назад
Evan Batky
25 подписчиков
28 просмотров · 11 дней назад
Built-in memory can leave important project context split across chats and tools. This setup uses Claude Code and a free Supabase project to store session summaries and facts, then retrieve relevant context when a new session starts. What this setup covers: Saving session summaries and memory facts in a private Supabase database Setting up browser-based Supabase authentication without pasting keys Adding hooks for automatic saving and session-start recall Sharing the same memory store with Codex, Grok, and other agents Tools used: Claude Code: https://docs.anthropic.com/en/docs/cl... Supabase: https://supabase.com/ Prompt: Set up a "second brain" for Claude Code on this computer, so you remember our past conversations. I'm not technical: explain each step in plain English, do everything you can yourself, and tell me exactly what to click when you need me. I don't want to copy or paste any keys or passwords at any point. Please build this: 1. Connect. Connect to my Supabase account by signing in through the browser, never with pasted keys. Add the official Supabase MCP server to Claude Code and have me approve the sign-in page. If you need something the MCP can't do, install the Supabase CLI and run `supabase login`, which also signs in through the browser. If I don't have a Supabase account yet, walk me through making a free one. 2. Storage. Using that connection, create a new free Supabase project for the brain. Create two private tables with text search: one for short summaries of our conversations, one for important facts. Lock them down so nobody on the internet can read them. 3. Background access. Saving and remembering run in the background, so they need their own way in. Fetch the project's access key yourself through the CLI or MCP and pass it straight into my computer's password keychain (or a file only my user account can read, if there's no keychain). Never print it, show it to me, or put it in a chat, a settings file or a project folder. 4. Saving. Add a Claude Code "Stop" hook that runs in the background so it never slows me down. Once a conversation has at least 3 back-and-forths, write a short summary using `claude -p` with the smallest, cheapest model, and make sure that call can't set off the hook again. Remove anything that looks like a password or key. Keep one summary per conversation and update it, at most once every 10 minutes. 5. Facts. In the same hook, copy any memory notes you've saved in ~/.claude/projects/*/memory/ into the facts table. 6. Remembering. Add a "SessionStart" hook that finds the 3 most relevant summaries and facts for the folder I'm working in and gives them to you when a session starts. Skip it after a conversation is compacted. If anything goes wrong, start normally. 7. Asking. Give yourself a simple command to search or save a fact in the middle of a conversation. 8. Rules. Add these to my global CLAUDE.md: check memory before starting a task, save what you learned when you finish, never store passwords or keys, and mark outdated facts as replaced instead of deleting them. Before you change any settings, show me the plan. Then test it: have a short chat, confirm a summary was saved, start a fresh session and show me that you remember it. Finish with a plain-English recap of what you set up, how to turn it off, and how to disconnect Supabase. Chapters: 00:00 Why AI needs a second brain 00:43 How the shared memory loop works 01:37 The setup prompt and architecture 02:14 Starting the Claude Code build 02:43 Creating the Supabase project 03:20 Authorizing Supabase 04:32 Reviewing the generated system 05:27 Automatic saving and recall 05:57 A real second brain after one year 06:29 Inside the memory database Book a free automation consult with me: https://cal.com/evan-batky/free-autom... #ClaudeCode #Supabase #AIMemory