Automate Your AI Second Brain

Schedule daily AI briefings that run automatically from your vault.

Introduction

30 Second Summary

Imagine waking up every morning to a personalized briefing that already knows your calendar, your priorities, and what you worked on yesterday.

In this project, you will turn an Obsidian vault into a daily operating system powered by Claude Code. Every morning, a Cloud Routine reads your calendar, checks your priorities, and writes a briefing note. Every evening, you run a debrief that captures what happened and updates your wiki.

What You'll Build

You will build a fully automated AI second brain that briefs you every morning, debriefs you every evening, and continuously ingests new knowledge from your tools.

By the end of this project, you'll have:

  • A private GitHub repo backing your vault with automatic sync via the Obsidian Git plugin.
  • MCP Connectors wired to your Google Calendar so Claude can read your schedule in real time.
  • Slash commands for automated source ingestion, priority-driven briefings, and structured debriefs.
  • A Cloud Routine that runs your briefing every weekday morning on Anthropic's infrastructure, even when your laptop is closed.
  • A secret mission to cut your briefing's token usage in half using optimization techniques like subagent forking and tool restrictions.

Are there any prerequisites?

You need a paid Claude account (Pro, Max, Team, or Enterprise). Part 1 of this series is recommended but not required. Step 1 includes a fast-track setup tab if you are starting fresh.

Get Your Vault Ready

Before you can automate anything, you need a working vault with Claude Code connected to it. Whether you built a vault in Part 1 or you're starting from scratch, this step gets you to the same starting line: an Obsidian vault with a defined folder structure, a CLAUDE.md file, and four working slash commands.

In This Step, Get Ready To:
  • Install Claude Code Desktop and Obsidian (or confirm they're already installed).
  • Scaffold a vault with the required folder structure and slash commands, or verify your existing vault from Part 1.
  • Confirm Claude Code can read your vault's rules and list your slash commands.
Install Claude Code Desktop and Obsidian

Your setup path depends on whether you completed Part 1 of this series. Pick the tab that matches your situation.

I completed Part 1

You already have Obsidian and a vault from Part 1. You just need to make sure Claude Code Desktop is installed and ready.

  • Open Claude Code Desktop. If you don't have it installed, download it from claude.ai/download.
  • Sign in with your paid Claude account (Pro, Max, Team, or Enterprise).
  • Open your existing second-brain vault folder in Claude Code.
  • Open Obsidian and confirm your vault loads with the raw/, wiki/, journal/, and content/ folders visible in the sidebar.

Verify the CLI is available by opening a terminal and running:

claude --version

I see a version number

You're all set. Move on to the next substep.

Command not found

Claude Code Desktop installs the CLI automatically, but you may need to restart your terminal for it to appear in your PATH. Close and reopen your terminal, then try again.

Still seeing command not found?

You can install the CLI manually. On macOS or Linux, run curl -fsSL https://claude.ai/install.sh | bash. On Windows, open PowerShell and run irm https://claude.ai/install.ps1 | iex (this requires Git for Windows installed first). Help me troubleshoot my Claude Code installation.

I'm starting fresh

You'll install both Obsidian and Claude Code Desktop from scratch.

Install Obsidian
  • Download and install Obsidian from obsidian.md/download.
  • Open Obsidian and create a new vault called second-brain.
Install Claude Code Desktop
  • Download Claude Code Desktop from claude.ai/download (available for macOS and Windows).
  • Install the app and sign in with your paid Claude account (Pro, Max, Team, or Enterprise).

Alternatively, you can install the Claude Code CLI directly from your terminal:

macOS

curl -fsSL https://claude.ai/install.sh | bash

Windows

Claude Code CLI on Windows requires Git for Windows. If you don't have it, install it from gitforwindows.org first.

Then open PowerShell and run:

irm https://claude.ai/install.ps1 | iex

Verify your installation by opening a terminal and running:

claude --version

I see a version number

Claude Code is installed and ready.

I see an error

Close and reopen your terminal, then try the command again. If it still fails, make sure you completed the installation steps above.

Still having trouble?

Help me troubleshoot my Claude Code installation.

Scaffold or Verify Your Vault Structure

Your vault needs a specific folder structure and a set of slash commands for the rest of this project to work. Slash commands are custom prompts stored as .md files in the .claude/commands/ directory. Claude Code picks them up automatically and makes them available when you type / in a session.

I completed Part 1

Your vault should already have the correct structure and commands. Let's confirm everything is in place.

  • Open Claude Code in your vault root directory.
  • Type /help and confirm that /ingest, /query, /lint, and /log appear in the list.

Missing some commands?

Check that the .claude/commands/ directory exists at your vault root and contains four .md files: ingest.md, query.md, lint.md, and log.md. If they're missing, use the "I'm starting fresh" tab to scaffold them.

I'm starting fresh

You need to create the vault's folder structure, the CLAUDE.md rules file, and four slash commands. Instead of doing this manually, you'll give Claude Code a single prompt that scaffolds everything at once.

  • Open Claude Code in your second-brain vault folder.
  • Paste the following scaffold prompt:
Set up this Obsidian vault as an AI second brain. Create the following:

1. Folder structure:
   - raw/ (source material drops here)
   - wiki/ (processed knowledge pages)
   - journal/ (daily logs and notes)
   - content/ (drafts and outputs)

2. A CLAUDE.md file at the vault root with these sections:
   - Project Structure: describe each folder's purpose
   - Page Conventions: wiki pages use [[wikilinks]], have a # Title, and include a Sources section linking back to raw files
   - Style Guide: concise paragraphs, active voice, no jargon without definition
   - Domain Context: leave blank for the user to fill in later

3. Four slash commands under .claude/commands/:
   - ingest.md: reads files from raw/, extracts key concepts, creates or updates wiki pages in wiki/, and links sources
   - query.md: searches the wiki for relevant pages and synthesizes an answer using $ARGUMENTS as the question
   - lint.md: scans wiki/ for broken links, missing sources, and style violations, then reports issues
   - log.md: appends a timestamped entry to wiki/log.md summarizing what just happened, using $ARGUMENTS as the summary

Each slash command should have frontmatter with a description field. Create all files now.

What does this prompt do?

This single prompt creates your entire vault structure in one go. The CLAUDE.md file acts as project-level instructions that Claude reads at the start of every session. The four slash commands under .claude/commands/ give you reusable workflows you can trigger by typing /ingest, /query, etc.

  • Let Claude create all the files. Review the output to make sure it created the four folders, CLAUDE.md, and the four command files.
  • Switch to Obsidian and confirm the folders appear in the sidebar.
Verify Everything Works Together

Now that your vault is set up and Claude Code is connected, let's make sure Claude can actually read your vault's rules and commands.

  • In Claude Code, paste the following prompt:
List the slash commands available in this vault and tell me the rules from CLAUDE.md in one paragraph each.

What should I see?

Claude should list all four commands (/ingest, /query, /lint, /log) and summarize each section of your CLAUDE.md file. If it can't find the commands or the rules file, double-check that you're running Claude Code from your vault's root directory.

  • Switch to Obsidian and confirm the folder structure is visible in the sidebar: raw/, wiki/, journal/, and content/.

Your vault is ready with a clean structure and working slash commands. Next up, you'll connect it to GitHub for automatic backups and wire up MCP Connectors to pull in live data from your calendar.

Back Up and Connect Your Tools

Your vault is full of knowledge, but right now it only lives on your computer. If your laptop dies, everything goes with it. In this step, you'll back up your vault to GitHub, set up automatic syncing, and wire Google Calendar into Claude Code so your briefings can pull live data.

In This Step, Get Ready To:
  • Push your vault to a private GitHub repository for cloud backup.
  • Install the Obsidian Git plugin so your vault auto-syncs every 10 minutes.
  • Connect Google Calendar via MCP Connectors so Claude can read your schedule.
Create a Private GitHub Repo and Connect It to Your Vault

A Git repository tracks every change you make to your vault and stores a copy on GitHub's servers. This gives you version history and a cloud backup in one move.

  • Go to github.com and sign in.
  • Click the + button in the top right, then select New repository.
  • Name the repository second-brain.
  • Set the visibility to Private.
  • Leave all initialization options unchecked. Do not add a README, .gitignore, or license.
  • Click Create repository.

Why a private repository?

Your vault contains personal notes, meeting summaries, and priorities. A private repo keeps all of that visible only to you. GitHub's free tier allows unlimited private repositories.

Now you need to initialize Git inside your vault folder and push it to GitHub. Open a terminal in your vault's root directory.

  • Initialize a Git repository.
git init
  • Create a .gitignore file to exclude transient Obsidian files from version control.

macOS

cat << 'EOF' > .gitignore
.obsidian/workspace.json
.obsidian/workspace-mobile.json
.obsidian/plugins/obsidian-git/data.json
.trash/
.DS_Store
EOF

Windows

@"
.obsidian/workspace.json
.obsidian/workspace-mobile.json
.obsidian/plugins/obsidian-git/data.json
.trash/
.DS_Store
"@ | Out-File -Encoding utf8 .gitignore

What does this file do?

The .gitignore file tells Git which files to skip. workspace.json changes every time you open a pane in Obsidian, so tracking it would create noisy commits that clutter your history.

  • Stage all files and make your first commit.
git add .
git commit -m "Initial vault commit"
  • Connect your local repo to GitHub and push.

HTTPS (Recommended)

git remote add origin https://github.com/[[GITHUB_USERNAME="your GitHub username"]]/second-brain.git
git branch -M main
git push -u origin main

GitHub will prompt you for your credentials. If you have two-factor authentication enabled, use a personal access token instead of your password.

SSH

git remote add origin git@github.com:[[GITHUB_USERNAME="your GitHub username"]]/second-brain.git
git branch -M main
git push -u origin main

This requires an SSH key linked to your GitHub account. If you haven't set one up, use the HTTPS tab instead or follow GitHub's SSH key guide.

I see my files on GitHub

Your vault is now backed up to GitHub. Every folder and file from your local vault should be visible in the repository.

I see an error

Having trouble pushing to GitHub?

  • If you see remote: Repository not found, double-check the repository URL matches your GitHub username and repo name exactly.
  • If you see Permission denied (publickey), switch to the HTTPS method or set up an SSH key.
  • If you see fatal: not a git repository, make sure your terminal is in the vault's root folder (the one containing CLAUDE.md).
  • Still stuck? Help me debug my git push error.
Install the Obsidian Git Plugin for Auto-Sync

Pushing manually every time you change a note would get old fast. The Obsidian Git community plugin automates this by committing and pushing your changes on a timer.

  • In Obsidian, open Settings.
  • Select Community plugins in the left sidebar.
  • If community plugins are not yet enabled, click Turn on community plugins and confirm.
  • Click Browse to open the plugin marketplace.
  • Search for Git and install the plugin by Vinzent (the most popular result).
  • Click Enable to activate the plugin.

Now configure the auto-sync settings.

  • Open the Git plugin's settings (click the gear icon next to the plugin name).
  • Set Auto commit-and-sync interval to 10 minutes.
  • Enable Pull on startup so Obsidian grabs the latest changes when you open it.
  • Close the settings panel.

Why pull on startup?

Your Cloud Routine (which you'll set up in Step 6) pushes briefing notes to GitHub while your laptop is closed. Pull on startup ensures those notes appear in Obsidian the moment you open it in the morning.

Time to test the auto-sync.

  • Create a quick test note in Obsidian. Name it sync-test.md and type a few words inside.
  • Wait for the auto-commit interval to trigger, or manually run a sync from the command palette. Press Cmd+P (macOS) or Ctrl+P (Windows), then type Git: Commit-and-sync and select it.
  • Go to your GitHub repository in your browser and refresh the page.

I see sync-test.md on GitHub

Auto-sync is working. Your vault now backs itself up to GitHub without any manual effort.

The file didn't appear

Still not seeing the file on GitHub?

  • Make sure Git is installed and available in your system PATH. Open a terminal and run git --version to confirm.
  • Check the Obsidian Git plugin's log. Open the command palette and run Git: Open log to see error messages.
  • On Windows, make sure you installed Git for Windows from gitforwindows.org and restarted Obsidian after installing it.
  • Still stuck? Help me debug the Obsidian Git plugin.
  • Delete sync-test.md from your vault now that you've confirmed the sync works.
Connect Google Calendar via MCP Connectors

Your briefing command needs to know what meetings you have today. MCP Connectors are pre-built remote MCP servers maintained by Anthropic that let Claude access external services like Google Calendar, Slack, and Notion. They work across Claude Desktop, web, and mobile with no API keys or JSON configuration needed.

What Are MCP Connectors?

Unlike manual MCP server setups where you edit JSON config files and manage API keys, Connectors are turnkey integrations. You authenticate via OAuth in the UI, and Anthropic handles the server infrastructure. Over 50 Connectors are available, including Google Calendar, Gmail, Google Drive, Slack, Notion, GitHub, and Jira.

  • Open Claude Code Desktop.
  • Navigate to the Connectors or Integrations settings. Click the + button, or go to Settings, then Connectors.
  • Find Google Calendar in the list of available Connectors and click to add it.
  • Sign in with your Google account when prompted.
  • Grant the calendar permissions that Claude requests.

Verify the connection by testing it in a Claude Code session.

  • Open a new Claude Code session in your vault folder.
  • Type the following prompt:
What meetings do I have today?

Claude listed my calendar events

Google Calendar is connected. Claude can now read your schedule, which is exactly what the /briefing command will use in Step 5.

Claude can't access my calendar

Calendar not connecting?

  • Make sure you completed the OAuth sign-in flow in the Connectors settings. The Google Calendar Connector should show as "Connected" with a green indicator.
  • Try removing the Connector and adding it again. Sometimes the OAuth flow needs a second attempt.
  • Restart Claude Code Desktop after connecting the Connector.
  • If you use multiple Google accounts, make sure you signed in with the account that has your calendar events.
  • Still stuck? Help me connect Google Calendar to Claude Code Desktop.

Pro tip: add more Connectors

Google Calendar is the only Connector required for this project. You can add Slack, Gmail, Notion, or other Connectors using the same flow. Each one expands what your /briefing and /pull-sources commands can access.

Your vault is now backed up to GitHub and syncing automatically. Claude can read your calendar. Next up, you'll build a slash command that automatically pulls in new knowledge from your tools.

Auto-Ingest Your Sources

Your vault is backed up and your calendar is connected. Now you need a way to pull new knowledge into the vault without manually copying and pasting from every tool you use. In this step, you'll build a /pull-sources slash command that automatically ingests Claude Code session transcripts and optionally Granola meeting notes into your vault.

In This Step, Get Ready To:
  • Understand how Claude Code session exports and Granola meeting notes flow into your vault.
  • Create the /pull-sources slash command for automated ingestion.
  • Test the command and verify new files appear in your vault.
Understand What /pull-sources Will Do

Right now, getting information into your vault requires you to manually create files and run /ingest. The /pull-sources command will automate this by pulling from two sources and then running the ingest for you.

Here's what the command will handle:

  • Claude Code session transcripts: Claude Code has a built-in /export command that exports conversations to a file. The /pull-sources command will automate finding recent sessions, exporting them, and placing them in raw/claude-exports/.
  • Granola meeting notes (optional): If you use Granola, the command reads from Granola's local cache directory and writes markdown files to raw/granola-exports/.
  • Automatic ingest: After pulling new files, the command finishes by running /ingest on them so they get processed into your wiki.

What is Granola?

Granola is an AI-powered meeting notes app available on macOS, Windows, and iOS. It has a free tier with unlimited meetings. Granola stores its notes in a local cache file, which makes it easy for scripts to read from. If you don't use Granola, you can skip the meeting notes portion. The /pull-sources command will handle this gracefully by checking whether Granola is installed before attempting to read its cache.

Create the /pull-sources Slash Command

Slash commands in Claude Code are markdown files stored in .claude/commands/ at your project root. Each file contains frontmatter (metadata like a description and allowed tools) and a prompt body that tells Claude what to do when the command is invoked.

  • Open Claude Code in your vault folder.
  • Paste the following prompt to create the new command file:
Create a new slash command file at `.claude/commands/pull-sources.md` with the following content:

---
description: Pull recent Claude Code session transcripts and Granola meeting notes into the vault, then ingest them.
allowed-tools: Read, Write, Bash
---

Your job is to pull recent source material into this vault for ingestion.

## Step 1: Export Claude Code session transcripts

- Look for recent Claude Code session transcripts.
- Use the `/export` command to export any sessions from the last 24 hours.
- Save exported transcripts as markdown files in `raw/claude-exports/` with filenames like `claude-session-YYYY-MM-DD-HHMMSS.md`.
- Skip any sessions that have already been exported (check for existing files with matching timestamps).

## Step 2: Pull Granola meeting notes (optional)

- Check if Granola is installed by looking for its cache file:
  - macOS: `~/Library/Application Support/Granola/cache-v*.json`
  - Windows: `%APPDATA%\Granola\cache-v*.json`
- If the cache file exists, read it and extract any meeting notes from the last 24 hours.
- Write each meeting note as a markdown file in `raw/granola-exports/` with filenames like `granola-YYYY-MM-DD-meeting-title.md`.
- Skip any meetings that have already been exported.
- If Granola is not installed, skip this step silently.

## Step 3: Ingest new files

- If any new files were created in Steps 1 or 2, run `/ingest` on them.
- Report a summary of what was pulled and ingested.

What does this prompt do?

This prompt tells Claude to create a new file at .claude/commands/pull-sources.md. The frontmatter at the top sets the command's description and restricts it to only the Read, Write, and Bash tools. The prompt body gives Claude a three-step workflow: export transcripts, pull Granola notes if available, and then run the existing /ingest command on everything new.

What is allowed-tools?

The allowed-tools frontmatter field restricts which tools the slash command can use without asking for your approval. By listing only Read, Write, and Bash, you prevent Claude from scanning dozens of MCP tools it doesn't need for this task. This makes the command faster and more focused.

  • Wait for Claude to confirm it created the file.
  • Restart Claude Code so it picks up the new command. Type /exit to quit, then open Claude Code again in your vault folder.
  • Type / and confirm that /pull-sources appears in the command list.

Don't see /pull-sources in the list?

Make sure the file is saved at .claude/commands/pull-sources.md relative to your vault root. The .claude/commands/ directory must be at the project root for Claude Code to detect project-specific commands. Also confirm you restarted Claude Code after creating the file. Help me troubleshoot my missing slash command.

Test /pull-sources

The best way to verify the command works is to run it. You should have at least one Claude Code session from this project so far, which means there should be at least one transcript to export.

  • Run /pull-sources in Claude Code.

Claude will work through the three steps: exporting session transcripts, checking for Granola (skipping if not installed), and running /ingest on any new files. This may take a minute or two depending on how many sessions it finds.

What should I see?

Claude should report which sessions it found and exported. You'll see new markdown files appear in raw/claude-exports/. If you have Granola installed, you'll also see files in raw/granola-exports/. After the ingest runs, new or updated wiki pages should appear in wiki/.

  • Switch to Obsidian and check the sidebar.
  • Expand the raw/claude-exports/ folder and confirm new transcript files are there.
  • Check the wiki/ folder for any new or updated pages created by the ingest.
  • If you have Granola installed, also check raw/granola-exports/ for meeting note files.

No session transcripts were exported?

The /export command exports conversations to a file, but the exact default export path may vary by platform. If Claude couldn't find or export sessions, try running /export manually first to see where it saves the file. Then update your pull-sources.md command to reference that path. Help me debug my /pull-sources command.

Your vault can now pull in new knowledge from your tools with a single command. Next up, you'll create a priorities document that gives your briefings and debriefs something meaningful to orient around.

Create Your Priorities Document

Your vault can now pull in sources automatically, but briefings and debriefs need something to orient around. Without a clear set of priorities, Claude would just summarize your calendar and call it a day. A priorities.md file gives Claude the context it needs to tell you what actually matters each morning.

In This Step, Get Ready To:
  • Create a priorities.md file that captures your current goals and focus areas.
  • Update CLAUDE.md so Claude always checks your priorities before generating briefings or debriefs.
  • Verify that Claude can reference your priorities when answering questions.
Create priorities.md With Claude's Help

Instead of writing your priorities from scratch, you can let Claude interview you. Claude will ask a few targeted questions about your goals and projects, then generate a structured document from your answers.

  • Open Claude Code in your vault folder.
  • Paste the following prompt:
Interview me about my current priorities. Ask me 3-4 questions, one at a time, about:
- My top goals right now (professional and personal)
- Active projects I'm working on
- What I want to focus on this week or month

After I answer all your questions, create a file called `priorities.md` at the vault root with these sections:
- **Current Goals** (3-5 items, ranked by importance)
- **Active Projects** (with one-line descriptions)
- **Focus Areas This Week**
- **Review Date** (set to one week from today)

Ask me the first question now.

What does this prompt do?

This prompt tells Claude to run an interactive interview rather than generating a generic template. Claude will ask you one question at a time, wait for your answer, then move to the next. After all questions are answered, it writes the structured priorities.md file based on your real answers.

  • Answer each of Claude's questions as they come. Be specific about what you're working on and what matters most to you right now.
  • After you finish answering, Claude creates priorities.md at the vault root.
  • Open Obsidian and confirm priorities.md appears in the root of your vault.

Pro tip: be honest, not polished

Your priorities file is for you and Claude, not for a performance review. The more honest and specific you are, the more useful your briefings become. "Ship the API refactor before Friday" is more useful than "improve code quality."

Why a Review Date?

Priorities go stale fast. The Review Date field reminds you to revisit this file regularly. When your /briefing command detects that the review date has passed, it can flag that your priorities might need updating.

Update CLAUDE.md to Reference Priorities

Your CLAUDE.md file is the instruction manual Claude reads at the start of every session. Right now, it knows about your vault structure and page conventions, but it doesn't know your priorities exist. You need to tell Claude to check priorities.md whenever it generates briefings or debriefs.

  • In Claude Code, paste the following prompt:
Add a new section to CLAUDE.md called "Priorities" with the following rules:

1. Always read `priorities.md` before generating any briefing or debrief.
2. Orient summaries, focus suggestions, and priority alignment sections around the goals listed in `priorities.md`.
3. If the Review Date in `priorities.md` has passed, include a reminder to update priorities at the top of the briefing.

What does this change?

Claude reads CLAUDE.md automatically at the start of every session. By adding a Priorities section, you ensure that every future /briefing and /debrief command is grounded in what you actually care about.

  • Open CLAUDE.md in Obsidian and confirm the new Priorities section appears alongside the existing sections (Project Structure, Page Conventions, Style Guide, Domain Context).
Verify the Priorities Integration

Time to make sure Claude actually uses your priorities when you ask it questions. The /query command from Part 1 searches your vault and synthesizes answers. If the integration is working, Claude should pull from priorities.md when you ask about your goals.

  • In Claude Code, run the following command:
/query What are my current priorities?
  • Review Claude's response. It should reference specific goals and projects from your priorities.md file, not give a generic answer.

What should I see?

Claude should list your actual goals and active projects by name. If it gives a vague response like "you should define your priorities," it means Claude did not find or read priorities.md. Double-check that the file is at the vault root (not inside a subfolder).

Claude isn't referencing my priorities?

Make sure priorities.md is saved at the vault root, not inside wiki/ or another subfolder. Also confirm that CLAUDE.md was updated with the Priorities section. You can run cat CLAUDE.md in Claude Code to verify. Still stuck? Ask for help here.

Your vault now has a north star. Every briefing and debrief Claude generates will be filtered through your actual goals, not just a raw dump of calendar events and notes. Next up, you'll build the /briefing and /debrief commands that put these priorities to work in your daily loop.

Build and Run Your Daily Loop

Your vault now has priorities, connected tools, and an auto-ingestion pipeline. The missing piece is the daily rhythm that ties everything together. In this step, you'll build two slash commands that bookend your day: /briefing for the morning and /debrief for the evening.

In This Step, Get Ready To:
  • Create a /briefing slash command that reads your calendar, priorities, and wiki to write a morning briefing note.
  • Create a /debrief slash command that captures what happened and updates your wiki.
  • Run the full daily loop end-to-end and verify the results in Obsidian.
Create the /briefing Slash Command

The /briefing command pulls together everything you've built so far. It reads your calendar through the Google Calendar MCP Connector, checks your priorities.md, scans your wiki for relevant context, and writes a structured morning note to your journal.

  • Open Claude Code in your vault folder.
  • Paste the following prompt to create the /briefing command:
Create a new slash command file at `.claude/commands/briefing.md` with the following content:

---
description: Generate a morning briefing note based on today's calendar, priorities, and wiki context
allowed-tools: Read, Write, mcp__google-calendar__*
---

Generate a morning briefing for today.

1. Read today's calendar events using the Google Calendar MCP Connector.
2. Read `priorities.md` at the vault root for my current goals.
3. Scan `wiki/index.md` and the last 5 entries in `wiki/log.md` for recent context.
4. Write a briefing note to `journal/YYYY-MM-DD-briefing.md` (use today's actual date) with these sections:
   - **Today's Meetings**: list each meeting with time, title, and attendees.
   - **Priority Alignment**: map each meeting or task to a priority from `priorities.md`. Flag anything that doesn't align.
   - **Key Context**: link to relevant wiki pages that provide background for today's meetings.
   - **Suggested Focus**: recommend 2-3 things to focus on today based on priorities and calendar.
5. Append a log entry to `wiki/log.md` noting the briefing was generated.

What does this command do?

The allowed-tools frontmatter restricts which tools the command can call without asking for approval. By listing only Read, Write, and mcp__google-calendar__*, you prevent Claude from scanning dozens of MCP tools it doesn't need. This makes the command faster and more focused.

What is a slash command?

Slash commands are reusable prompts stored as .md files in .claude/commands/. When you type /briefing in Claude Code, it reads the corresponding markdown file and executes the prompt inside it. The frontmatter at the top controls behavior like which tools are allowed.

  • After Claude creates the file, restart Claude Code by typing /exit and then running claude again to pick up the new command.
  • Type /help and confirm /briefing appears in the list.
Create the /debrief Slash Command

The /debrief command closes the loop. It reads your morning briefing, asks what actually happened, and writes an evening note that captures progress, shifts, and open threads. It also updates your wiki with any new information from the day.

  • Paste the following prompt in Claude Code to create the /debrief command:
Create a new slash command file at `.claude/commands/debrief.md` with the following content:

---
description: Generate an evening debrief note that captures the day and updates the wiki
allowed-tools: Read, Write
---

Generate an evening debrief for today.

1. Read today's briefing note from `journal/` (find the file matching today's date with `-briefing` in the name).
2. Ask me what happened today. If I provided input as `$ARGUMENTS`, use that instead of prompting.
3. Write a debrief note to `journal/YYYY-MM-DD-debrief.md` (use today's actual date) with these sections:
   - **What Got Done**: tasks and meetings completed.
   - **What Shifted**: anything that changed from the morning plan.
   - **Progress Against Priorities**: map accomplishments back to `priorities.md` goals.
   - **Open Threads**: unfinished items or follow-ups for tomorrow.
4. Update any relevant wiki pages in `wiki/` with new information learned today.
5. Append a log entry to `wiki/log.md` noting the debrief was generated.

What is $ARGUMENTS?

The $ARGUMENTS variable captures anything you type after the command name. For example, /debrief Finished the API integration, postponed the docs update passes that text directly to the command. If you run /debrief with no arguments, Claude will prompt you interactively instead.

  • Restart Claude Code again (/exit, then claude) to pick up the new command.
  • Type /help and confirm both /briefing and /debrief appear in the list.
Run the Full Daily Loop

With both commands in place, it's time to run the complete morning-to-evening cycle and see the results in Obsidian.

  • Run /briefing in Claude Code.

Claude reads your calendar, checks your priorities, scans your wiki, and writes a briefing note to journal/. This may take 30-60 seconds as it pulls data from the Google Calendar connector.

  • Switch to Obsidian and open the journal/ folder.
  • Open the new briefing note (named something like 2026-07-15-briefing.md with today's date).
  • Verify it contains the four sections: Today's Meetings, Priority Alignment, Key Context, and Suggested Focus.

What should I see?

Your briefing note should list your real calendar events for today, map them to the goals in your priorities.md, and link to relevant wiki pages. If you have no meetings today, the Today's Meetings section will be empty, but the other sections should still be populated based on your priorities and wiki.

Now run the evening half of the loop.

  • Run the following command in Claude Code:
/debrief Today I worked on setting up my second brain automation, tested the briefing command, and reviewed my priorities document.

Pro tip: make it real

Replace the example text with what you actually did today. The more real your input, the more useful the debrief note becomes. This is your system now.

  • Switch to Obsidian and open the new debrief note in journal/ (named something like 2026-07-15-debrief.md).
  • Verify it contains the four sections: What Got Done, What Shifted, Progress Against Priorities, and Open Threads.
  • Check wiki/log.md to confirm both a briefing and debrief log entry were appended.
  • Open Graph View in Obsidian (click the graph icon in the left sidebar) to see the new journal nodes connected to your wiki pages.

The graph view is where the daily loop becomes visible. Your briefing and debrief notes link to wiki pages, which link to raw sources. Over time, this web of connections becomes a searchable record of your decisions and context.

Briefing note is missing calendar events?

Make sure the Google Calendar MCP Connector is still connected in Claude Code Desktop. Open Settings, then Connectors, and verify Google Calendar shows as connected. You can also test by asking Claude "What meetings do I have today?" in a fresh session. Help me troubleshoot my Google Calendar MCP Connector.

You've just run a complete daily loop. Your vault now has a morning briefing grounded in real calendar data and priorities, plus an evening debrief that captures what actually happened. Next up, you'll schedule the briefing to run automatically every weekday morning without you lifting a finger.

Schedule Your Briefing as a Cloud Routine

Your daily loop works, but it still requires you to open your laptop and type /briefing every morning. The whole point of a second brain is that it works while you are not looking. Cloud Routines let you run saved Claude Code configurations on Anthropic's infrastructure on a schedule, so your briefing lands before you even sit down.

In This Step, Get Ready To:
  • Learn how Cloud Routines work and what plan limits apply.
  • Create a Cloud Routine that runs your briefing every weekday morning.
  • Verify the routine runs and pull the results into Obsidian.
Understand Cloud Routines

Cloud Routines are saved Claude Code configurations that run on Anthropic's cloud infrastructure. They launched as a research preview on April 14, 2026. Unlike Desktop Scheduled Tasks (which require your app to be open) or /loop (which dies when you exit your session), Cloud Routines keep running even when your laptop is closed.

Cloud Routines are available on Pro, Max, Team, and Enterprise plans. Each run draws from your subscription usage limits the same way an interactive session does.

What are the daily limits?

Pro plans get 5 routine runs per day. Max plans get 15 runs per day. Team and Enterprise plans have higher limits. Since your morning briefing only needs one run per weekday, even the Pro plan has plenty of headroom.

You can create Cloud Routines in three ways:

  • The web UI at claude.ai/code/routines.
  • The /schedule command in the CLI.
  • Claude Code Desktop via the Schedule sidebar, then New task, then New remote task.

In this step, you will use the web UI because it gives you the clearest view of all the configuration options.

Why Cloud Routines Instead of Desktop Scheduled Tasks?

Desktop Scheduled Tasks run locally on your machine and require the Desktop app to be open. That defeats the purpose of a morning briefing that should be ready before you start your day. Cloud Routines run on Anthropic's servers, so your briefing generates even if your laptop is off.

Create the Briefing Routine

Your /briefing slash command already contains the full prompt logic. Now you need to wrap that prompt in a Cloud Routine that points to your GitHub repo and runs on a schedule.

  • Open your /briefing command file at .claude/commands/briefing.md and copy the prompt body (everything below the frontmatter).
  • Go to claude.ai/code/routines in your browser.
  • Click New Routine.
  • Set the Name to Morning Briefing.
  • Paste the prompt body you copied into the Prompt field. Adapt any local file paths so they reference the vault repo structure (e.g., priorities.md at the repo root, journal/ for output).
  • Under Repository, select your second-brain GitHub repo.
  • Under Connectors, confirm that Google Calendar is connected. If it is not listed, add it from the Connectors panel.
  • Set the Trigger to Schedule. Choose Weekdays and set your preferred morning time (e.g., 7:00 AM).
  • Click Save.

What does this routine do?

Every weekday at your chosen time, Anthropic's servers clone your second-brain repo, run the briefing prompt against it (reading your calendar via the Google Calendar connector and your priorities.md), write the briefing note, and push the changes back to GitHub.

Verify the Routine Runs

You do not need to wait until tomorrow morning to confirm everything works. You can trigger a test run immediately.

  • On the routine's page at claude.ai/code/routines, click Run now to trigger an immediate test.
  • Wait for the run to complete. This may take a minute or two.
  • Go to claude.ai/code to see the session that was created. Open it to review the briefing output.

What should I see?

The session should show Claude reading your calendar events, checking priorities.md, scanning your wiki, and writing a briefing note to journal/. The output should look similar to what you saw when you ran /briefing locally in the previous step.

Pro tip: branch behavior

Cloud Routines run against a fresh clone of your repo. By default, pushes are restricted to branches prefixed with claude/. Check your GitHub repo for a new branch like claude/morning-briefing. You can merge these changes into main or configure unrestricted branch pushes in the routine settings.

Now pull the changes into your local vault so the briefing note appears in Obsidian.

  • If the routine pushed to a claude/-prefixed branch, open a terminal in your vault folder and merge it:
git fetch origin
git merge origin/claude/morning-briefing

What does this command do?

The git fetch command downloads the latest changes from GitHub without modifying your local files. The git merge command integrates the routine's branch into your current branch so the briefing note appears locally.

  • Open Obsidian and check the journal/ folder. Your briefing note should appear.

If you configured the Obsidian Git plugin with Pull on startup in Step 2, future briefings will appear automatically the next time you open Obsidian. The auto-sync interval will also pull changes periodically while Obsidian is open.

Routine failed or no briefing appeared?

Check the session log at claude.ai/code for error messages. Common issues include the Google Calendar connector not being authorized for the routine, or the prompt referencing file paths that do not exist in the repo. Make sure your latest vault changes (including priorities.md and CLAUDE.md) have been pushed to GitHub before running the routine. Help me debug my Cloud Routine.

Your second brain now runs on autopilot. Every weekday morning, a briefing lands in your vault before you even open your laptop. Next up, the Secret Mission challenges you to make that briefing leaner and faster.

Secret mission

Cut Your Briefing in Half

Your /briefing command works, but it is burning through tokens like a bonfire. Every extra tool scan and bloated context window costs you time and money. In this secret mission, you will measure your baseline token usage, then apply three optimization techniques to slash it by 50% or more.

Before you go

Clean Up Your Resources

Decide whether to keep your resources running, pause them to come back later, or delete them entirely. This project uses local files and your existing Claude plan, so there are no surprise costs. However, your Cloud Routine draws from your daily Claude plan usage limits.

Cost warning

Your Cloud Routine counts against your daily Claude plan limits (Pro: 5 runs/day, Max: 15 runs/day). If you leave it running on a weekday schedule, it will consume one run each morning. This does not incur extra charges beyond your plan, but it does reduce the runs available for other routines.

Resources you used:

  • Obsidian vault directory (local, free).
  • GitHub private repository (free tier allows unlimited private repos).
  • Claude Code sessions (draws from your paid Claude plan usage).
  • Cloud Routine (draws from your paid Claude plan usage, with daily run limits).
  • MCP Connectors (free, maintained by Anthropic).
  • Granola (optional, free tier available).

Keep everything running

No action needed. Choose this if you are still actively building on your second brain.

  • Your Cloud Routine will continue to run on its weekday schedule.
  • The Obsidian Git plugin will keep syncing your vault to GitHub automatically.
  • Your vault and all files are stored locally with no ongoing costs beyond your Claude plan.

Pause - I'll come back to this later

Stop automated processes to free up your daily Claude plan runs while keeping all your files and configuration intact.

  • Go to claude.ai/code/routines and disable or delete the Morning Briefing routine.
  • In Obsidian, open Settings, then Community Plugins, then Git. Disable auto-sync if you want to stop automatic commits.
  • Your vault, GitHub repo, slash commands, and all files remain intact for when you return.

Delete - I don't want to use this again

Remove all project resources and start fresh. This cannot be undone.

  • Go to claude.ai/code/routines and delete the Morning Briefing routine.
  • Go to your GitHub repository settings and delete the second-brain repository.
  • Delete the vault folder from your computer.
  • Disconnect Google Calendar from Claude Code Desktop by removing it in the Connectors settings.
  • Uninstall Obsidian and Claude Code Desktop if you no longer need them.

Mission accomplished

That's a Wrap

Nice work! You just turned a knowledge vault into a daily operating system that runs on autopilot. Every weekday morning, your AI second brain wakes up, reads your calendar, checks your priorities, and writes you a briefing before you even open your laptop.

Here's what you learned:

  • Connected your vault to a private GitHub repo with automatic sync via the Obsidian Git plugin, and wired MCP Connectors like Google Calendar to Claude Code Desktop for live data access.
  • Built /pull-sources, /briefing, and /debrief slash commands that auto-ingest sources, generate priority-aligned morning briefings, and capture end-of-day reflections.
  • Scheduled your briefing as a Cloud Routine that runs every weekday morning on Anthropic's infrastructure, no laptop required.
  • Optimized your commands for token efficiency using allowed-tools frontmatter, model overrides, and subagent forking with context: fork to cut briefing costs in half.

Ready to quiz yourself?