📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

How to Give Claude Code a Brain That Never Forgets (Obsidian Setup)

Josue AI11:09

Transcription

If you've been keeping up with the AI space, the chances are that you've been using this tool that's called Claude Code. This is a tool that's been revolutionizing the way that we do work on a day-to-day basis. Whether that's automating schedule tasks or just streamlining what we do every single day at work or in our personal lives.

While this tool is very, very powerful and it's actually capable of doing a lot of things, there's a major issue that a lot of us face when we start building with this tool and we don't know how to actually approach it. And the problem is memory. Whenever you start a Claude Code session, depending if you're doing it on a specific folder or if you have multiple folders for different projects, Claude usually doesn't have context of what's going on on your other projects and in between sessions, it might actually forget details that you talked about on a different topic maybe a couple days ago.

So today I want to talk about a tool that actually bridges this gap and you might have heard of it, but if you haven't, it's called Obsidian. Obsidian is a free open source tool that you can download locally inside of your Mac that will be responsible for creating a brain for your AI agents. This means that we're not going to be losing context of important details in between different sessions or even in between different projects.

There's multiple ways that you can set this up. I've actually myself dug a little bit deeper into it. Saw some videos on how to do it and I felt very confused because everyone was approaching a little bit different. It seems like everyone's solution was just starting from zero and start giving it all the context that you have about yourself. Well, I've actually been using Claude Code for about 2 or 3 months now to where giving all this context is just too much information. So I thought to myself, is there a way to install Obsidian and have it go through all of my Claude Code projects and create the brain or the vault, what it's called, inside the platform, with all the memory that Claude has already stored. And you guessed it right, that's exactly what it did.

So in this video, I want to show you my exact setup for Obsidian, what you need to do step by step, and how you can keep improving this memory so that the context grows, grows, and grows, and every new session and conversation doesn't feel like you're starting from zero. My name is Jose. I've been working in AI and automation for the past year and a half. I've done a lot of videos about NAD. Recently, I'm moving into Claude Code because this is an amazing tool. I also give out a lot of resources for free and that includes a guide that's going to be walking you step by step aside from this video how to do this setup. If you're interested in that, feel free to check out my free school community. I'll leave a link to that down in the description. With that being said, let's get started.

And so, to give you guys a little bit of context, this was the problem that I was facing. I would have different sessions on different projects. And every time I started a new project or a new session, I would have to give context about who I was, what I did, what my role was, what was going to be the goal of this specific session. And I don't know about how you guys started using Claude Code, but me, this is how I started using it. Instead of my local documents folder, I created a folder that's called Claude Code. And inside of there, I start creating new folders. And inside of those folders, I would start a new terminal and start a new conversation. And each of those folders, I gave them sort of like a name that would describe what we're going to be working on. The problem with this is that every separate folder had its own Claude sort of instance or brain which means they wouldn't communicate in between each other. Not only that but inside of these folders but inside of each of these projects you can start new sessions. So you can have multiple sessions for the same project and relevant information might not be available in between sessions. So that's two problems.

And so let me introduce you to my system, my vault, how I'm using Obsidian before we jump right in and start actually building it. So I thought to myself, I already have all these projects. I don't want to start a new project from scratch and start giving all the context to Obsidian. Why don't I just create a vault that holds all of these projects and I have Claude Code go through each one of those projects, each of those memories, all the files and start putting stuff and memories inside of Obsidian instead of starting from zero. So that's what I did. Here is my vault system. So the vault basically is a folder. That folder has a Claude file which has all of the information about myself, rules, how I like things done and this is written once and then inherited everywhere. And then inside of that vault I have every single project which is all the same projects that I have inside of my Claude Code folder. So Project A has its own Claude.md file. Project B has its own Claude.md file. And then these files have project specific rules, agents, architecture, and band patterns. This file was already created inside all of those folders from my sessions that I've been having since I started using Claude Code. The new one that was created was the vault level one. And so what happens if I start a session inside of any of these projects is that that session is able to communicate with my Claude.md file which has access to all other projects and if it needs to pull context from other project or doesn't know what I'm talking about it can go to all those other projects and pull information from there.

So what actually goes inside of this Claude file default one? Like I said, who I am, my role, what's my company preferences, project list overview, which that means it has a list of all the other projects. Like I said, if I'm starting a session inside a specific project and I ask a question about a different project, then the Claude.md file so I have information about that project, it's going to look for specific files on that folder, you can grab that context and like I said, project level, this is a Claude.md file per project specific to that project constraints, sub agents, database, these workflows, skills, all that sort of thing.

So, how are we going to set this up? First things first, before we jump in, we need to install Obsidian. So, you want to go to obsidian.md and then you want to download it for your platform. It's completely free. And once installed, you're going to land over here. As you see, I already have my Claude Code vault and I have the Obsidian vault, which is the default one, which doesn't really have any information. Claude Code is the the main one. So, you want to create a new vault. What happens when you click on it? It's going to prompt you to write a name. I name it Claude Code because that's what my folder is named. And then you're going to find that location. In my case, like I said, it was inside of my documents. I had a Claude Code folder that holds all my other folders. And once inside, I just hit open. When I hit create, that's going to create my vault. We're going to see there's not going to be anything in here. And what we want to do next is we actually want to jump straight into Claude Code and start telling it to set everything up for us.

And just to show you an example of what a vault actually looks like or what a brain actually looks like, this is mine right here. As you see, it holds all of my or some of the most important files that have information inside of them. For example, home. This is going to be where it finds all the information about this vault. For example, this is host 7 brain. It has a quick navigation, some context files, and all of these files are just markdown files. So, as you see, this looks very similar to Notion. If you've used Notion in the past, all these are just markdown files with sort of notes. They're all very well organized. And this is where Claude Code is going to be pulling information from when it needs context from other projects.

So continuing with our setup here, the first thing that you want to do is you want to go to your settings. Then once you go to general, you want to go into advanced and you want to enable the command line interface. And what happens when you enable this is that you're able to control this vault from the command line. The command line is what Claude uses, similar to an MCP, to control different tools. The next thing you want to do is you want to go to obsidian.d/CLI. And now we're going to tell Claude Code to take care of this and to install it and start building our vault. So for that I'm actually going to go inside my Claude folder. I'm going to create a new folder. I'm just going to call this Obsidian demo. And now I'm going to start a new terminal. So here inside of VS Code, I'm going to look for that folder. And now I can start using Claude Code. I'm actually going to start on the terminal. So new terminal. As you see, there's nothing inside the folder right now. And inside of this terminal, I'm just going to do claude --dangerously-allow-unsafe-cli-commands. Enter. And now we're inside.

So let's give Claude good a little bit of context of what we're looking for. I'm just going to say, "Hey Claude, so I'm setting up my vault for Obsidian." And I want you to use the CLI tool in order to create a new brain. The vault is called Obsidian demo. And it's already pointing to the folder that has all of my projects. Basically, I want you to go through every single project, grab context about the memory of the of that specific project. The vault is going to be the main brain. No matter which project I'm in, I can ask questions about another project, and it's going to be able to pull that information through Obsidian. To have that in there, I'm going to paste in the CLI tool. And one last one more thing that we want installed is going to be the Obsidian skills so that it knows how to use the CLI. So, the CLI is the tools. Now, we need the skills, which are going to be the instructions. And for that, there's a GitHub repo that's going to have that skill. I'm just going to copy that and I'm going to paste it over here. Install that the skill so you know how to use it as well. I let that run and see what happens.

So for now, we can see here in the logs that it's saying the Obsidian demo vault is empty. Fresh start. Let me find all the project memory and context files across every single project. Now it has access to it and it's going to start filling up that context. So as you see here in the test, it does have one test that says create home dashboard and cross links. That's that home.md file that I show you guys which had all the information and was at the center of the brain. Let me open that for you guys. It's this one, home, which has all the context and where to find every single thing. So the agent is taking quite a while just because there's a lot of information. But if I go over to the vault right now, I can see that stuff started being added in there. The home one is created and we're getting all these other reference files from my other projects.

So, this is all great, but you might be thinking, how do you actually save information in here? Like all the new sessions that you're having, are they saved automatically? Do you have to do it manually? Well, there's multiple ways to do this. And I actually iterated with Claude Code on what the best way was. One of the options that it gave me was that it automatically saved it to the memory by calling a skill. Whenever it detected that something was important or it was relevant. The problem with this is that how does it actually know it's relevant? Maybe something's very important to you, but it doesn't know it, so it might not save it. So for this I asked Claude and I told it to create a command or a skill that I could use whenever I want to say what's been going on in the create session and that command is called TLDR. As you see over here when I do /TLDR it says save session to Obsidian Brain. But this is something that you might want to tell Claude once you've set up your vault is tell it, hey, now how are we going to save this information? Can you create a command that's going to allow me to manually save it?

And so why don't we test this out? Let's actually clear this out. Going do clear one more time and I'm going to ask something about some other project. So what is DAPTA? As you see now it says, "Let me check the vault for information about DAPTA." Now it says that DAPTA is a no-code AI automation platform used by 50K+ companies targeting SMBs. They do AI agents, text agents. They have a meeting note-taker, etc., etc. And look, it even tells me this. Joseo Yu is on the growth team and as an AI and automation specialist handling docy skills testing and content as well as arcing.

So quick recap, how did we set this up? We create a print folder if you don't have one already. To that you have one, you have all the products inside. Then you add a Claude.md file, like we say, this is pretty much the home file that was created by Claude once we gave the CLI and all the access. All the projects are inside and then here it says optional, but you must open it in Obsidian for it to for the vault to be linked to that folder. And how we keep this alive? The pod.md file or the home or the home file is the one that's always read. Then we have the tlddr command that writes back into that vault. And that's how you fix the context problem for Claude Code.

I'm going to be putting all this into a guide that you can follow step by step. As mentioned, that's going to be inside my free school community. So feel free to check it out if you want the guide. And if you enjoy this type of content, if you learned something today, feel free to subscribe, leave a comment, leave a like. I'll be posting more videos on Claude Code. Try to make them a little bit more raw, like my own experience and how I'm setting it up for myself so you guys get ideas and also learn from it.