Build a Second Brain with Claude Code
Connect Obsidian with Claude Code to build an AI-powered note-taking system.
Introduction
30 Second Summary
We all collect knowledge throughout our day. Articles, ideas, meeting notes, random thoughts. But without a system, that knowledge scatters across apps, tabs, and forgotten bookmarks.
In this project, you will build a personal knowledge management system (a "second brain") by connecting Obsidian with Claude Code. Your notes stay as local files on your computer while Claude Code acts as an AI assistant that organizes, links, and creates notes for you automatically.
What You'll Build
A structured Obsidian vault connected to Claude Code via a CLAUDE.md memory file, with templates, bidirectional links, and automated daily note generation.
By the end of this project, you'll have:
- A structured Obsidian vault with 5 organized folders, templates, and linking conventions.
- A CLAUDE.md configuration file that teaches Claude Code the rules of your vault so it can read, create, and link notes automatically.
- A working daily note automation system where Claude Code generates your daily note with one prompt.
- Secret Mission: Build a one-command web article clipper that saves and summarizes any URL into your vault.
Are there any prerequisites?
You need a Claude Max subscription with Claude Code access. You should already have Claude Code running in your terminal. No other tools or accounts are required to start.
Install Obsidian and Create Your Vault
Your second brain needs a home. Obsidian is a note-taking app that stores everything as plain Markdown files on your computer.
In this step, you will download Obsidian, install it, and create a vault. A vault is simply a folder where all your notes live.
In this step, get ready to:
- Download and install Obsidian 1.12.7.
- Create a new vault named second-brain.
- Verify the vault works by creating a test note.
Download and install Obsidian
Obsidian is free for personal use. You need to download the installer directly from the official website.
- Open your web browser and go to https://obsidian.md/download.
- Under the Windows section, click the Universal button to download the installer.
- Once the download finishes, open Obsidian-1.12.7.exe from your Downloads folder.
- Follow the installer prompts. Accept the defaults and click Install.
Make sure you download from obsidian.md
The installer you need is Obsidian-1.12.7.exe from the official website. Do not use any zip files from GitHub. The GitHub repository called obsidian-releases contains metadata about plugins and themes, not the actual application.
Download not starting?
Make sure you clicked Universal under the Windows heading, not one of the other platform options.
If your browser blocks the download, click Keep or Allow in the download bar.
Help me troubleshoot my Obsidian download on Windows
Create your vault
A vault in Obsidian is just a folder on your computer. Every note you create lives inside this folder as a .md file.
- Press the Windows key to open your search bar.
- Type Obsidian and press Enter to open it.
- On the welcome screen, click Create new vault.
- In the Vault name field, type second-brain.
- For the location, enter C:\Users\SBS.
- Click Create.
Obsidian opens your new vault. You should see an empty workspace with a sidebar on the left.
What is a vault?
A vault is a regular folder on your file system. Obsidian adds a hidden .obsidian folder inside it to store your settings, themes, and plugin data.
Your vault now lives at C:\Users\SBS\second-brain. This is the folder Claude Code will connect to in the next step.
Verify your vault with a test note
Before moving on, confirm that Obsidian can create and save notes inside your vault.
- Click the New note icon in the top-left of the sidebar (it looks like a page with a plus sign).
- Type a title at the top, such as My first note.
- Type a sentence in the body of the note. Anything works here.
Obsidian saves automatically. Your test note is now stored as a Markdown file inside your vault folder.
What should I see?
Your note appears in the sidebar on the left. If you open File Explorer and navigate to C:\Users\SBS\second-brain, you will see your note as a .md file alongside the hidden .obsidian configuration folder.
Don't see your note in the sidebar?
Make sure you are looking at the correct vault. Check the vault name in the bottom-left corner of Obsidian. It should say second-brain.
If the sidebar is collapsed, click the arrow icon on the left edge of the window to expand it.
Help me troubleshoot my Obsidian vault setup
Your vault is set up and Obsidian is ready. Next up, you will connect Claude Code to this vault so it can read and create notes for you automatically.
Connect Claude Code to Your Vault
Your Obsidian vault is created and ready. Now it's time to connect Claude Code to your vault so it can read and manage your notes.
Claude Code reads and writes files in whatever folder you launch it from. Once it's running inside your vault directory, it can see every note, create new ones, and follow your conventions automatically.
In this step, get ready to:
- Navigate Claude Code to your vault directory.
- Verify Claude Code can read your vault files.
Launch Claude Code inside your vault folder
Claude Code uses the current working directory as its project root. For it to manage your vault, you need to launch it from inside the second-brain folder.
- Exit your current Claude Code session by typing this command at the Claude Code prompt:
/exit
You should see the regular CMD prompt return.
- Navigate to your vault folder and restart Claude Code by running these commands:
cd C:\Users\SBS\second-brain
claude
What do these commands do?
- cd C:\Users\SBS\second-brain changes your CMD's working directory to your vault folder.
- claude starts Claude Code in that folder. It now treats your vault as its project root.
You should see Claude Code's prompt appear, indicating it's running inside your vault folder.
Seeing 'The system cannot find the path specified'?
- Double check the path matches exactly where you created your vault in Step 1. The folder name is second-brain with a hyphen, not a space.
- Make sure you typed the backslashes correctly. Windows paths use \ not /.
- Help me troubleshoot my path to the second-brain vault
Verify Claude Code can see your vault
Before building anything, confirm that Claude Code can actually access your vault files. This ensures the connection is working.
- Ask Claude Code to list your vault contents by typing this prompt:
List all files in this directory
What should I see?
Claude Code should respond with a list of files and folders in your vault. You should see your test note (the one you created in Step 1) and the .obsidian folder.
The .obsidian folder is where Obsidian stores its configuration. Seeing it confirms Claude Code is looking at the right place.
Claude Code not showing your files?
- Make sure you ran claude after navigating to the vault folder. If you started Claude Code from a different directory, exit and restart it in the correct folder.
- If Claude Code asks for permission to use tools, type y to allow it. It needs file system access to read your vault.
- Help me get Claude Code to see my vault files
Claude Code is locked into your vault and can see everything inside it. Next up, you'll build your folder structure, templates, and vault rules with a single prompt.
Build Your Vault Structure with Claude Code
Claude Code can see your vault, but right now it is just an empty container with a single test note. A knowledge management system needs structure to keep different types of notes organized and findable.
In this step, you will create an organized folder system and a CLAUDE.md configuration file. This file acts as persistent memory that teaches Claude Code the rules of your vault every time it starts.
In this step, get ready to:
- Create five organized folders for different note types.
- Create a CLAUDE.md file with your vault's rules and conventions.
- Verify Claude Code understands and follows your rules.
Create the folder structure
A well-organized vault separates notes by purpose. Each folder holds a different type of note so you can always find what you are looking for.
- In your Claude Code session, type the following prompt and press Enter:
Create the following folder structure in this vault: daily/ (for daily notes), zettel/ (for permanent atomic notes, one idea per note), literature/ (for reading notes and web clippings), project/ (for active project notes), meta/ (for templates and tag definitions). Create a placeholder .gitkeep file inside each folder.
What does each folder hold?
- daily/ stores your daily journal notes, one per day.
- zettel/ stores permanent "atomic" notes. Each note captures exactly one idea.
- literature/ stores notes about things you have read, like articles or documentation.
- project/ stores notes about active projects you are working on.
- meta/ stores templates and tag definitions that help keep your vault consistent.
The .gitkeep files are empty placeholders. They exist so the folders are not empty, which makes them visible in Obsidian's file explorer.
- Wait for Claude Code to finish creating the folders. It will show you a summary of the files it created.
- Switch to Obsidian and check the left sidebar. You should see five new folders: daily, zettel, literature, project, and meta.
Don't see the folders in Obsidian?
- Obsidian sometimes takes a moment to detect new files. Click anywhere in the left sidebar or switch to another app and back.
- If Claude Code showed an error about permissions, make sure your CMD is running in the correct directory. Type the prompt again.
- Still stuck? Help me figure out why Claude Code didn't create my folders.
Create the CLAUDE.md configuration file
Your folders are in place, but Claude Code does not yet know the rules for using them. CLAUDE.md is a special memory file that loads automatically every time Claude Code starts in your vault directory. It acts as a persistent instruction manual.
- In your Claude Code session, type the following prompt and press Enter:
Create a CLAUDE.md file in the root of this directory with the following content: This is an Obsidian vault. Rules: 1) Inter-note links use [[Note name]] wikilink format. 2) Every note must have YAML frontmatter with tags and date fields. 3) Daily notes go in daily/ with filename format YYYY-MM-DD.md and use three sections: Today, Learned, Questions. 4) Permanent notes go in zettel/ with descriptive concept names as filenames. 5) Reading notes go in literature/ with the source title as filename. 6) Project notes go in project/ grouped by project name. 7) Templates live in meta/templates/. 8) Never rename or delete files in zettel/ without asking first (to preserve backlinks). 9) When creating notes, always add relevant links to existing notes using [[Note name]].
What do these 9 rules teach Claude Code?
Rules 1-2 set the formatting standard. Every note uses wikilinks ([[Note name]]) to connect ideas and YAML frontmatter for metadata like tags and dates.
Rules 3-7 tell Claude Code where each type of note belongs and how to name the file. This prevents your vault from becoming a jumbled mess.
Rules 8-9 protect your knowledge. Rule 8 prevents accidental deletion of permanent notes (which would break links elsewhere). Rule 9 ensures new notes always connect to your existing knowledge.
- Claude Code will ask for permission to write the file. Type y and press Enter to allow it.
- Once created, check Obsidian's left sidebar. You should see CLAUDE.md listed at the root level of your vault.
Why is CLAUDE.md so powerful?
Every time you launch Claude Code from your vault folder, it automatically reads CLAUDE.md before doing anything else. You never have to re-explain your vault rules. Claude Code remembers them every session.
Claude Code didn't create the file?
- If Claude Code says it does not have permission, type y when prompted. The Write tool requires explicit approval.
- If the prompt was cut off or produced unexpected results, try pasting the full prompt again. Make sure you include all 9 rules.
- Need help? Claude Code is not creating my CLAUDE.md file properly.
Verify Claude Code understands the rules
Creating the file is one thing. You need to confirm Claude Code can actually read it and follow the rules.
- In your Claude Code session, type the following prompt and press Enter:
Read the CLAUDE.md file and confirm you understand the vault rules
- Claude Code should respond with a summary of all 9 rules in its own words. It may list the folder conventions, the wikilink format, and the frontmatter requirements.
What should I see?
Claude Code will paraphrase your rules back to you. Look for it mentioning wikilinks, YAML frontmatter, the daily note format (YYYY-MM-DD.md), the five folder names, and the rule about not deleting zettel notes. If it mentions all of these, your setup is working.
Claude Code did not summarize the rules?
- Make sure CLAUDE.md exists in the vault root. Ask Claude Code: "List all files in this directory" and check that CLAUDE.md appears.
- If the file exists but Claude Code seems confused, try closing and reopening Claude Code in the same folder. The memory file reloads on each new session.
- Still having trouble? Help me verify that my CLAUDE.md is loading correctly.
✔️ Claude Code confirmed the rules
Your vault structure and memory file are in place. Claude Code now knows exactly how to work with your notes.
ⓧ I'd like to double check the CLAUDE.md content
Open CLAUDE.md in Obsidian by clicking it in the left sidebar. The file should contain the vault description followed by all 9 rules:
- Rule 1: Inter-note links use [[Note name]] wikilink format.
- Rule 2: Every note must have YAML frontmatter with tags and date fields.
- Rule 3: Daily notes go in daily/ with filename format YYYY-MM-DD.md and use three sections: Today, Learned, Questions.
- Rule 4: Permanent notes go in zettel/ with descriptive concept names as filenames.
- Rule 5: Reading notes go in literature/ with the source title as filename.
- Rule 6: Project notes go in project/ grouped by project name.
- Rule 7: Templates live in meta/templates/.
- Rule 8: Never rename or delete files in zettel/ without asking first.
- Rule 9: When creating notes, always add relevant links to existing notes using [[Note name]].
If any rules are missing or different, delete the file and run the CLAUDE.md creation prompt again.
Your vault now has structure and your AI assistant knows the rules. Next up, you will create templates and sample notes to bring your second brain to life.
Create Templates and Sample Notes
Your vault has a solid folder structure and Claude Code knows all the rules. Now it is time to fill that structure with reusable templates and real notes.
Templates give every new note a consistent starting point. Sample notes let you see how bidirectional linking works in practice. In this step, you will ask Claude Code to generate both.
In this step, get ready to:
- Create three reusable note templates for daily notes, permanent notes, and project notes.
- Generate five interconnected sample notes with proper frontmatter and wikilinks.
- Visualize your knowledge graph in Obsidian's Graph View.
Create three note templates
Templates are pre-made note skeletons that define which sections and frontmatter fields a note should have. Instead of remembering the format every time, you start from a template and fill in the content.
- In your Claude Code session, give Claude Code this prompt to create all three templates:
Create three template files in meta/templates/: 1) daily-template.md with frontmatter (tags: daily, date: YYYY-MM-DD) and sections ## Today, ## Learned, ## Questions. 2) zettel-template.md with frontmatter (tags: [], date: YYYY-MM-DD, related: []) and sections ## Idea, ## Context, ## Links. 3) project-template.md with frontmatter (tags: project, status: active, date: YYYY-MM-DD) and sections ## Goal, ## Tasks, ## Notes, ## Related.
What do these templates do?
Each template serves a different purpose in your vault:
- daily-template.md structures your daily journal with sections for tasks, learning, and open questions.
- zettel-template.md is for permanent "atomic" notes. Each one captures a single idea with context and links to related concepts.
- project-template.md tracks active projects with goals, tasks, and connections to other notes.
- After Claude Code confirms the files are created, verify by prompting:
List all files in meta/templates/
You should see three files listed: daily-template.md, zettel-template.md, and project-template.md.
Claude Code says the folder doesn't exist?
Make sure Claude Code is still running inside your C:\Users\SBS\second-brain folder. If it lost context, close Claude Code and reopen it from that directory.
Also confirm the meta/ folder exists from Step 3. Prompt Claude Code: "Create the meta/templates/ folder if it doesn't exist, then create the templates."
Help me troubleshoot why Claude Code can't find my meta/templates folder.
Generate five interconnected sample notes
A vault with templates but no notes is like an empty library with shelving labels. Sample notes show you how linking works and give your graph something to display.
- Give Claude Code this prompt to create five notes across your vault folders:
Create 5 sample notes to demonstrate linking: 1) zettel/what-is-markdown.md about Markdown syntax basics. 2) zettel/bidirectional-linking.md about how bidirectional links work. 3) zettel/second-brain-concept.md about the second brain methodology. 4) project/learn-obsidian.md as a project note about learning Obsidian. 5) literature/obsidian-official-docs.md as a reading note about Obsidian's documentation. Make sure every note links to at least 2 other notes using [[Note name]] format and has proper frontmatter.
What makes these notes special?
Each note uses [[wikilinks]] to connect to other notes in the vault. For example, what-is-markdown.md might link to [[bidirectional-linking]] and [[second-brain-concept]].
These links are bidirectional. If note A links to note B, Obsidian automatically shows note A in note B's backlinks panel. You do not need to manually link both directions.
- After Claude Code confirms all five notes are created, verify by prompting:
List all markdown files in zettel/, project/, and literature/ folders
You should see what-is-markdown.md, bidirectional-linking.md, and second-brain-concept.md in zettel/. You should see learn-obsidian.md in project/ and obsidian-official-docs.md in literature/.
Notes are missing links or frontmatter?
If Claude Code created notes without [[wikilinks]] or YAML frontmatter, remind it about the rules. Prompt: "Read CLAUDE.md and then update all notes in zettel/, project/, and literature/ to include proper YAML frontmatter and at least 2 [[links]] to other notes."
Help me fix my sample notes so they have proper frontmatter and wikilinks.
Visualize your knowledge graph
Obsidian's Graph View turns your linked notes into a visual network. Each note appears as a dot, and each link appears as a line connecting two dots.
- Switch to the Obsidian window.
- Press Ctrl+G to open Graph View.
You should see your notes as connected dots. Notes with more links appear closer together and have more lines connecting them.
What am I looking at?
This is your knowledge graph. Each dot is one of the notes Claude Code just created. Each line represents a [[wikilink]] between two notes.
As you add more notes over time, this graph grows. Clusters of related ideas form naturally, making it easy to spot connections you might have missed.
Graph View is empty or shows no connections?
Obsidian may need a moment to detect new files created outside the app. Click any note in the sidebar to trigger a refresh, then press Ctrl+G again.
If dots appear but no lines connect them, your notes may be missing wikilinks. Open one note and check that it contains text like [[what-is-markdown]]. If links are missing, go back to the previous substep and ask Claude Code to add them.
Help me figure out why my Obsidian Graph View is not showing connections between notes.
Your vault now has structure, rules, templates, and real content. Next up, you will put it all to work by automating your daily notes with a single Claude Code prompt.
Automate Your Daily Notes
Your vault is organized, your templates are ready, and your sample notes are linked together in a visible knowledge graph. Now it's time to put your AI assistant to work on a real daily task.
Daily notes are the backbone of any second brain system. Instead of creating them manually each morning, you'll teach Claude Code to generate them automatically using your template and existing knowledge.
In this step, get ready to:
- Generate today's daily note from your template with a single prompt.
- Verify bidirectional links work by clicking through connected notes in Obsidian.
- Create tomorrow's daily note that summarizes what you learned today.
Generate today's daily note with Claude Code
Your daily-template.md defines the structure every daily note should follow. Claude Code can read that template, fill it with real content, and save it in the right folder.
- In your CMD window where Claude Code is running, type this prompt and press Enter:
Read the daily template from meta/templates/daily-template.md and create today's daily note in daily/ with today's date as the filename. Fill in the Today section with 3 placeholder tasks about learning Obsidian. In the Learned section, write a note about what a vault is and link to [[what-is-markdown]] and [[second-brain-concept]]. Leave Questions empty for me to fill.
What does this prompt do?
This single prompt instructs Claude Code to do four things at once. It reads your template, creates a new file with today's date as the filename, fills in content based on your vault rules, and adds bidirectional links to existing notes.
Claude Code knows to use the [[Note name]] wikilink format because that rule is defined in your CLAUDE.md file. This is the power of persistent memory.
- Wait for Claude Code to confirm it has created the file. You should see a message indicating it wrote to daily/ with today's date as the filename.
- Verify the file exists by prompting Claude Code:
List all files in the daily/ folder
You should see a file named with today's date in YYYY-MM-DD.md format (for example, 2026-05-08.md).
Don't see the daily note?
Make sure Claude Code is still running in the C:\Users\SBS\second-brain directory. If Claude Code restarted, navigate back to the vault folder and run claude again.
If Claude Code asks for permission to write the file, type y and press Enter to allow it.
Help me troubleshoot why Claude Code didn't create my daily note
Verify bidirectional linking in Obsidian
The real test of your second brain is whether clicking a link inside one note takes you directly to the connected note. This is bidirectional linking in action.
- Switch to the Obsidian window.
- In the left sidebar, expand the daily/ folder.
- Click on today's daily note to open it.
You should see your daily note with three sections. The ## Learned section contains purple-highlighted links to [[what-is-markdown]] and [[second-brain-concept]].
- Hold Ctrl and click on the [[what-is-markdown]] link.
Obsidian navigates you directly to the what-is-markdown.md note. This is bidirectional linking. Every link you create is a two-way connection between notes.
- Press Ctrl+G to open Graph View.
Your daily note now appears as a new dot in the graph, connected to what-is-markdown and second-brain-concept by lines. Your knowledge network is growing.
Links not clickable?
Make sure you are in Reading view (click the book icon in the top-right of the note) or hold Ctrl while clicking. In Editing view, links require Ctrl+click to follow them.
If the link text appears plain (not highlighted), the linked note may not exist. Check that the filenames in zettel/ match exactly what's inside the [[ ]] brackets.
Help me fix my Obsidian links that aren't working
Generate tomorrow's note from today's content
A truly intelligent second brain doesn't just store information. It builds on what came before. Claude Code can read today's note and use it to generate tomorrow's note with a built-in review.
- Switch back to your CMD window where Claude Code is running.
- Type this prompt and press Enter:
Create tomorrow's daily note. In the review section, summarize what I should have learned today based on today's daily note.
What's happening behind the scenes?
Claude Code reads today's daily note to understand what you worked on. Then it creates a new file for tomorrow's date with a review section that summarizes today's learning.
This is the core loop of an AI-powered second brain. Your notes accumulate context over time, and Claude Code uses that context to help you reflect and plan.
- Wait for Claude Code to confirm it created tomorrow's note.
- Switch to Obsidian and expand the daily/ folder in the left sidebar.
- Click on tomorrow's note to open it.
You should see a review section that references what you learned today. Claude Code read your existing note, understood the content, and generated a meaningful summary for tomorrow.
Make this part of your morning routine
Each morning, open Claude Code in your vault and type a simple prompt like "Create today's daily note and review yesterday." Over time, your daily notes become a running log that Claude Code can reference to spot patterns and recurring themes in your learning.
Tomorrow's note doesn't reference today?
If the review section is empty or generic, Claude Code may not have found today's note. Prompt it again with the explicit filename: "Read daily/2026-05-08.md and create tomorrow's note with a review of what I learned." Replace the date with today's actual date.
Help me get Claude Code to read my existing notes when generating new ones
Your daily note automation is working. You've proven that Claude Code can read your vault, follow your rules from CLAUDE.md, and create connected notes that build on each other. Next up is an optional Secret Mission where you'll build a web article clipper that saves and summarizes any URL directly into your vault.
Secret mission
Build a Web Article Clipper
Want to save articles from the web straight into your second brain with a single command? In this secret mission, you'll build a one-command web clipper that fetches any URL, summarizes it, and files it into your vault with proper links.
Clean Up Your Resources
Clean Up Your Resources
This project runs entirely locally, so there are no ongoing costs. Decide whether to keep your resources running, pause them to come back later, or delete them entirely.
Resources you used:
- Obsidian application (installed on your machine).
- second-brain vault folder at C:\Users\SBS\second-brain.
- CLAUDE.md configuration file inside your vault.
- Vault folders: daily/, zettel/, literature/, project/, meta/.
- Template files and sample notes.
- Node.js (if installed for the Secret Mission).
Keep everything running
No action needed. Choose this if you plan to keep using your second brain system daily.
- Keep Obsidian installed and your vault where it is.
- Continue launching Claude Code inside your vault folder to create and organize notes.
- Your CLAUDE.md file will load automatically every time you start Claude Code in the vault directory.
Pause - I'll come back to this later
No resources are using memory or compute while idle. Your vault is just a folder of Markdown files on disk.
- Close Obsidian if it is open.
- Your vault files remain at C:\Users\SBS\second-brain and will be ready whenever you return.
- To resume, open Obsidian and select your existing vault. Then launch Claude Code inside the vault folder.
Delete - I don't want to use this again
Remove all project resources and start fresh.
- Delete the entire second-brain folder from C:\Users\SBS\. This removes your vault, all notes, templates, and the CLAUDE.md file.
- Uninstall Obsidian from Settings > Apps > Installed apps if you no longer need it.
- Uninstall Node.js from the same location if you installed it for the Secret Mission and no longer need it.
Nice Work!
Nice Work!
You just built your own AI-powered second brain. You now have a personal knowledge management system where Obsidian stores your notes and Claude Code acts as your intelligent assistant to read, create, and link notes automatically.
You've learned how to:
- Built a structured Obsidian vault with organized folders, templates, and linking conventions for personal knowledge management.
- Connected Claude Code to your vault using a CLAUDE.md memory file that teaches the AI your vault rules and structure.
- Automated daily note generation and created interconnected notes with bidirectional links visible in Graph View.
- Secret Mission: Built a web article clipper that saves and summarizes any URL into your vault with one command.
Ready to quiz yourself?