I Wired OpenClaw into My Obsidian Vault. Here's What It Can Do.

· 10 min read
I Wired OpenClaw into My Obsidian Vault. Here's What It Can Do.
Photo by Sandip Kalal on Unsplash

Last week's newsletter opened with a problem: I'm running four or more Claude sessions at once, and none of them know what the others are doing. I'm the routing layer. The coordination overhead from the tool that's supposed to make me faster is becoming its own job.

This week I did something about it.

I restructured my Obsidian vault into a format AI agents can navigate, built an automation layer with Claude Code skills, and deployed OpenClaw on a DigitalOcean droplet with headless Obsidian Sync tying it all together. The vault is the brain. The agent reads it, writes to it, and picks up where the last session left off.

This is how I approached it, what I learned, and what I'd change.


The Problem: Smart Tools, No Memory

Claude is fast. Claude Code is faster. But every session starts from zero. You open a new thread, re-explain the project, re-describe the architecture, re-state your preferences. The AI forgets everything between conversations.

I tried to solve this with longer system prompts, CLAUDE.md files in repos, and careful copy-pasting of context between sessions. It helped. It wasn't enough.

The real issue: I have a dozen active projects across my day job, a consulting business, a podcast, a newsletter, and personal projects. No single prompt can hold all of that. And the projects connect to each other in ways that matter. A work observation becomes a newsletter angle. A podcast conversation surfaces a blog post idea. A side project teaches a lesson that applies to the day job.

I needed a persistent, structured knowledge base that any AI session could read and write to. I already had one. I just needed to reorganize it.


Step 1: Restructure the Vault

My Obsidian vault ("Gray Matter") had been a flat collection of project folders with inconsistent formats. Some projects had detailed context files. Most didn't. Meeting notes lived in one place, work logs in another, but nothing explicitly connected them.

The restructuring introduced three conventions:

Domain-based hierarchy. Everything lives under Work/, Publishing/, or Personal/. Work splits by employer or client. Projects nest under their parent area.

Context files per project. Every project gets three files:

  • ProjectName.md with a stable summary, stack, and key links
  • _context.md with active state: current work, open decisions, blockers, signals, key people, and notes for the agent
  • _last-session.md with what was done, what needs review, and next actions

Context stacking. At session start, an agent reads files in order: area context, project context, signals, last session. Each layer adds specificity without repeating what's above it. A session about a specific work project reads the area context, then the team context, then the project context, then signals, then the last session file. Five files, full picture.

Context files are session memory. _context.md answers "what should an AI know right now?" and _last-session.md answers "what happened last time?" Together, they eliminate the re-explanation problem.


Step 2: Build the Automation Layer

Restructuring the vault was the foundation. Making it self-maintaining was the real unlock.

I built a suite of Claude Code skills that handle the weekly workflow:

  • /review-daily enriches work log entries with data from GitHub, Jira, Confluence, and meeting notes
  • Platform syncs (/bluesky-sync, /twitter-sync, /buttondown-sync, /transistor-sync) pull engagement data into the vault
  • /social-review aggregates stats across all platforms and maintains a running Signals document
  • /review-weekly and /review-monthly generate structured reviews from the week's or month's raw data
  • /content-calendar mines the vault for post ideas, checks what resonated last week, and produces a week of social posts, newsletter angles, and podcast topics
  • /summarize-meetings generates frontmatter summaries for meeting notes based on their content
  • /import-podcast pulls in new episodes from Transistor

Each skill reads specific vault files and writes its output back to the vault. The vault gets richer over time without manual effort. The content calendar skill reads work signals, publishing stats, recent newsletters, and podcast topics to suggest posts. It knows what performed well last week because the stats are in the vault. It knows what I'm working on because the work logs are in the vault.

The skills started as local Claude Code commands. Now they run from the server on a schedule or on demand through Discord.


Step 3: Deploy OpenClaw

OpenClaw is a self-hosted AI agent runtime. You interact with it through Discord (or WhatsApp, or other channels). It reads your files, runs commands, and maintains persistent context across sessions.

The setup:

DigitalOcean droplet (4GB RAM, 2 vCPU, $24/month). Runs Ubuntu with Node 22. OpenClaw, obsidian-headless, and pm2 for process management.

Obsidian headless sync. This is the piece that makes the architecture work. obsidian-headless is a new official Obsidian product (released February 2026) that syncs your vault to a server without the desktop app. Changes I make in Obsidian on my Mac sync to the server. Changes the agent makes on the server sync back. The vault is the shared state layer.

Mac (Obsidian) <--sync--> Server (obsidian-headless) <--reads/writes--> OpenClaw

Discord as the interface. Each Discord channel maps to a project domain. I message the bot, it reads the relevant context files from the vault, and responds with full project awareness. The sessions persist per-channel, so a conversation about a project picks up where I left off.

The channel-to-project mapping lives in openclaw.json. Each entry points to a vault path and injects a system prompt telling the agent what it's working in:

"channels": {
  "discord": {
    "guilds": {
      "YOUR_GUILD_ID": {
        "requireMention": false,
        "users": ["YOUR_USER_ID"],
        "channels": {
          "CHANNEL_ID_WORK_PROJECT": {
            "systemPrompt": "This is the #work-project channel. Project vault path: /vault/Work/Company/Project/. On first message, load context following the order defined in Claude.md: area _context.md → project _context.md → Signals (if present) → _last-session.md → related projects. After completing any meaningful task, decision, or topic, update _last-session.md (frontmatter + What we did / Changes made / Open work). If project state changed, also update _context.md — overwrite stale content, do not append."
          }
        }
      }
    }
  }
}

Every channel follows the same pattern: vault path + context stacking instructions. The agent knows where it is, what to read first, and what to write when the session ends. Adding a new project is one new entry in this config.

Cloudflare Tunnel for the Control UI. OpenClaw ships a browser-based Control UI for managing sessions, config, and devices. The gateway binds to loopback by default, so nothing is publicly exposed. I use a Cloudflare Tunnel to access it remotely without opening any ports, with a Cloudflare Access PIN policy as an outer auth gate. The OpenClaw token and device pairing are the inner gates. Three layers, no open ports.

Skills on the server. Obsidian Sync doesn't sync hidden directories, so .claude/skills/ needs its own path. I set up a separate git repo for skills. Both my local machine and the server pull from it. OpenClaw discovers skills automatically from the workspace directory.

The whole deployment took an afternoon. Most of the time was configuring Discord bot permissions and testing the sync pipeline end-to-end.


What This Actually Looks Like Day to Day

Monday morning. I open Discord on my phone and ask the publishing channel: "What's on the content calendar this week?" OpenClaw reads Publishing/Content/2026-W12.md and gives me the rundown. I tell it to adjust Wednesday's post. It updates the file. The change syncs to my Mac by the time I sit down.

During a meeting, I notice a pattern worth tracking. After the meeting, I tell the work channel: "Add a signal about review bottlenecks increasing since the AI rollout." It appends to Work/Signals.md.

Friday evening, I run the weekly review. The agent reads five days of work logs, meeting notes, and signals, then generates a structured review with metrics, recurring themes, and brag doc candidates. It writes the review to the vault. I read it in Obsidian on my couch.

The agent isn't doing anything I couldn't do manually. It's doing the things I wouldn't get around to. The weekly reviews, the stats syncs, the signal tracking. The maintenance work that makes the vault useful but never feels urgent enough to do by hand.


The Architecture Decision That Matters Most

The vault is the single source of truth. Not OpenClaw's memory. Not a database. Not a separate knowledge graph. Plain markdown files in Obsidian, synced everywhere.

Portability. If OpenClaw disappears tomorrow, the vault is still there. Every context file, every review, every signal. The data isn't locked into an agent framework. It's markdown.

Readability. I can open any file in Obsidian and see exactly what the agent knows. No black-box memory systems. No embeddings I can't inspect. If the agent has wrong context, I edit a markdown file.

Composability. Claude Code reads these files locally. OpenClaw reads them on the server. A future agent I haven't built yet could read them too. The format is the interface.


What I'd Do Differently

Start with fewer context files. I populated context files for every project at once. It was a lot. Better to start with your 2-3 most active projects and expand as you go.

Test the sync pipeline earlier. I spent time getting the vault structure right before deploying obsidian-headless. Should have set up the sync first and iterated on the structure with the agent already running. Seeing how the agent actually uses the files changes how you write them.

Keep _context.md ruthlessly current. A context file that's two weeks old is worse than no context file. It gives the agent confident but wrong information. The fix: build the update instructions directly into the channel system prompt. Instead of "update at the end of a session" (which never fires on Discord, since sessions don't have a clear end), use "after completing any meaningful task, update both _last-session.md and _context.md." Give the agent an explicit format for each file. The agent writes mid-conversation, not on some hypothetical session close that never happens.


Try It Yourself

You don't need OpenClaw to start. The vault structure works with Claude Code today.

  1. Pick your top 3 projects. Create _context.md and _last-session.md for each one. Write them for an AI reader, not for yourself. What does a new session need to know?

  2. Add a CLAUDE.md at the vault root. Tell the agent where things live, what the conventions are, and what to read first. This is your vault's instruction manual.

  3. Add a USER.md. Who are you, what do you work on, and what does the agent need to know to be useful? Keep it under 300 words.

  4. Update _last-session.md after meaningful work. This is the handoff note to your next session. What did you do, what's pending, what's next. If you're using OpenClaw with Discord channels, build this into the channel system prompt so the agent writes after each task automatically. Don't rely on "end of session" as a trigger; it never fires.

  5. Build one automation skill. Start with something you do every week that pulls data from multiple sources. The weekly review is a good first candidate.

  6. When you're ready for always-on, deploy OpenClaw. A $24/month droplet, obsidian-headless for sync, Discord for the interface. Map each Discord channel to a project in openclaw.json. The vault you already structured is the brain.

Your AI gets better when it has memory. The simplest memory system is files it can read.


This is a follow-up to I Rebuilt My Personal Site with Claude AI and Claude Code. That post was about using AI to build a thing. This one is about building the system that makes AI useful across everything you do.

If you try this approach or have a different solution to the multi-session problem, find me on Bluesky or X.

Liked this? Get Dev Notes.

A weekly newsletter for developers. AI tools, Laravel, dev workflows, and things I find interesting. Every Friday at 8:45 AM Eastern.