Co-Pilot
Updated 24 days ago

obsidian-claude-code

RRoasbeef
0.2k
roasbeef/obsidian-claude-code
80
Agent Score

💡 Summary

An Obsidian plugin that integrates Claude as an AI assistant for note management and interaction.

🎯 Target Audience

Obsidian users looking for enhanced note managementDevelopers wanting to integrate AI into their workflowsStudents needing assistance with summarizing notesContent creators seeking efficient file manipulationResearchers requiring quick access to information

🤖 AI Roast:Powerful, but the setup might scare off the impatient.

Security AnalysisMedium Risk

Risk: Medium. Review: shell/CLI command execution; outbound network access (SSRF, data egress); API keys/tokens handling and storage; filesystem read/write scope and path traversal. Run with least privilege and audit before enabling in production.

obsidian-claude-code

An Obsidian plugin that embeds Claude as an AI assistant using the Claude Agent SDK. Claude gets full access to your vault through the same tools available in Claude Code—read, write, search, and execute commands—plus custom Obsidian-specific actions.

Chat interface showing Claude searching vault

What It Does

Claude operates as a persistent assistant in your Obsidian sidebar. Ask questions about your notes, request summaries, or have Claude modify files directly. Conversations persist across sessions, and Claude can resume where you left off.

Built on the Claude Agent SDK, the plugin gives Claude access to built-in tools (Read, Write, Edit, Bash, Grep, Glob, WebFetch) plus Obsidian-specific tools for opening files, executing commands, and navigating the workspace. If you have skills defined in vault/.claude/skills/, those load automatically too.

This is a desktop-only plugin. The Claude Agent SDK requires Node.js, which is available in Obsidian's Electron environment but not on mobile.

Requirements

You need an Anthropic API key or a Claude Max subscription. Both work equally well—the subscription option is convenient if you're already paying for Claude.

Installation

cd /path/to/your/vault/.obsidian/plugins git clone https://github.com/Roasbeef/obsidian-claude-code cd obsidian-claude-code bun install && bun run build

Then enable the plugin: Obsidian Settings → Community Plugins → obsidian-claude-code.

Authentication

The plugin supports three authentication methods.

API Key in Settings. The simplest option. Open Settings → Claude Code and enter your Anthropic API key. The key is stored locally in Obsidian's plugin data directory.

Environment Variable. Set ANTHROPIC_API_KEY in your shell environment. The plugin reads it automatically.

Claude Max Subscription. If you have a Claude Pro or Max subscription, you can use that instead of an API key. Run claude setup-token in your terminal to authenticate. This creates a CLAUDE_CODE_OAUTH_TOKEN that the plugin detects.

For GUI apps like Obsidian to inherit the token on macOS, add this to your shell profile:

launchctl setenv CLAUDE_CODE_OAUTH_TOKEN "$(echo $CLAUDE_CODE_OAUTH_TOKEN)"

The settings page shows which authentication method is active.

Usage

Toggle the sidebar with the ribbon icon or Cmd+Shift+C. Type your message and press Enter.

Reference specific files using @[[filename]] syntax—the input field provides autocomplete when you type @. Type / for slash commands: /new starts a fresh conversation, /clear clears history, /file adds the active file to context.

When Claude uses tools, the operations appear as collapsible blocks showing what happened and the result. Write operations display a permission modal unless you've enabled auto-approve in settings.

Tools and Skills

Claude has access to all built-in Claude Code tools: Read, Write, Edit, Bash, Grep, Glob, WebFetch, and WebSearch. These handle file operations, code search, and shell commands.

The plugin also exposes Obsidian-specific tools through an MCP server:

  • open_file — Open a file in the Obsidian editor
  • execute_command — Run any Obsidian command
  • show_notice — Display a notification
  • get_active_file — Get info about the current file
  • list_commands — Discover available commands
  • create_note — Create new notes
  • reveal_in_explorer — Show a file in the file explorer
  • get_vault_stats — Query vault statistics
  • get_recent_files — List recently modified files

Skills

Skills in vault/.claude/skills/ load automatically. The repository includes a vault-search skill you can copy to your vault:

cp -r skills/vault-search /path/to/vault/.claude/skills/

This skill provides semantic search via sqlite-vec embeddings and SQL queries over note frontmatter (a Dataview alternative). See skills/README.md for setup instructions.

See docs/architecture.md for full architectural details.

Data Storage

Conversations are stored in .obsidian-claude-code/ at your vault root:

.obsidian-claude-code/
├── conversations.json    # Metadata index
└── history/
    └── {id}.json         # Full message history per conversation

Add this directory to .gitignore if you don't want to sync conversation history.

Development

bun run dev # watch mode with rebuild bun run build # production build make check # typecheck + lint + test

Debug logs are written to ~/.obsidian-claude-code/debug.log.

License

MIT

5-Dim Analysis
Clarity8/10
Novelty8/10
Utility9/10
Completeness8/10
Maintainability7/10
Pros & Cons

Pros

  • Seamless integration with Obsidian
  • Persistent conversation history
  • Access to various built-in tools
  • Customizable skills for enhanced functionality

Cons

  • Desktop-only plugin limits accessibility
  • Requires an API key or subscription
  • Potential privacy concerns with data storage
  • Dependency on external SDK may introduce issues

Related Skills

pytorch

S
toolCode Lib
92/ 100

“It's the Swiss Army knife of deep learning, but good luck figuring out which of the 47 installation methods is the one that won't break your system.”

agno

S
toolCode Lib
90/ 100

“It promises to be the Kubernetes for agents, but let's see if developers have the patience to learn yet another orchestration layer.”

nuxt-skills

S
toolCo-Pilot
90/ 100

“It's essentially a well-organized cheat sheet that turns your AI assistant into a Nuxt framework parrot.”

Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.

Copyright belongs to the original author Roasbeef.