An Obsidian plugin that embeds Claude Agent (using Claude Agent SDK) as a sidebar chat interface. Your vault becomes Claude's working directory, giving it full agentic capabilities: file read/write, bash commands, and multi-step workflows.
-
Full Agentic Capabilities: Leverage Claude Code's power to read, write, and edit files, and execute bash commands, all within your Obsidian vault.
-
Context-Aware: Automatically attach the focused note, mention files with
@, exclude notes by tag, include editor selection, and access external directories for additional context. -
Vision Support: Analyze images by sending them via drag-and-drop, paste, or file path.
-
Inline Edit: Edit selected text or insert content at cursor position directly in notes with word-level diff preview and read-only tool access for context.
-
Slash Commands: Create reusable prompt templates triggered by
/command, with argument placeholders,@filereferences, and optional inline bash substitutions. -
Instruction Mode (
#): Add refined custom instructions to your system prompt directly from the chat input, with review/edit in a modal. -
Skills: Extend Claudian with reusable capability modules that are automatically invoked based on context, compatible with Claude Code's skill format.
-
MCP Support: Connect external tools and data sources via Model Context Protocol servers (stdio, SSE, HTTP) with context-saving mode and
@-mention activation. -
Advanced Model Control: Select between Haiku, Sonnet, and Opus, configure custom models via environment variables, and fine-tune thinking budget. Monitor context window usage with a real-time gauge.
-
Plan Mode: Toggle read-only exploration with Shift+Tab before implementation. Agent explores codebase, presents a plan, then implements after approval.
-
Robust Security: Implement permission modes (YOLO/Safe), a safety blocklist, and vault confinement with symlink-safe checks.
- Claude Code CLI installed (the SDK uses it internally)
- Obsidian v1.8.9+
- Claude subscription/API or Custom model provider that supports anthropic API format (Openrouter, Kimi, GLM, DeepSeek, etc.)
- Desktop only (macOS, Linux, Windows)
- Download
main.js,manifest.json, andstyles.cssfrom the latest release - Create a folder called
claudianin your vault's plugins folder:/path/to/vault/.obsidian/plugins/claudian/ - Copy the downloaded files into the
claudianfolder - Enable the plugin in Obsidian:
- Settings → Community plugins → Enable "Claudian"
-
Clone this repository into your vault's plugins folder:
cd /path/to/vault/.obsidian/plugins git clone https://github.com/YishenTu/claudian.git cd claudian
-
Install dependencies and build:
npm install npm run build
-
Enable the plugin in Obsidian:
- Settings → Community plugins → Enable "Claudian"
# Watch mode
npm run dev
# Production build
npm run buildTwo modes:
- Click the bot icon in ribbon or use command palette to open chat
- Select text + hotkey for inline edit
Use it like Claude Code—read, write, edit, search files in your vault.
- File: Auto-attaches focused note; type
@to attach other files - @-mention dropdown: Type
@to see MCP servers, context folders, and vault files@server-nameenables context-saving MCP servers@folder/filters to files from that context path (e.g.,@workspace/)- Vault files shown by default
- Selection: Select text in editor, then chat—selection included automatically
- Images: Drag-drop, paste, or type path; configure media folder for
![[image]]embeds - External paths: Click folder icon in toolbar for read-only access to directories outside vault
- Inline Edit: Select text + hotkey to edit directly in notes with word-level diff preview
- Slash Commands: Type
/for custom prompt templates (Settings → Slash Commands) - Instruction Mode: Type
#to add refined instructions to system prompt - Plan Mode:
Shift+Tabfor read-only exploration before implementation - Skills: Add
SKILL.mdfiles to~/.claude/skills/or{vault}/.claude/skills/ - MCP: Add external tools via Settings → MCP Servers; use
@server-namein chat to activate
- Enable command blocklist: Block dangerous bash commands (default: on)
- Blocked commands: Patterns to block (supports regex)
- Allowed export paths: Paths outside the vault where files can be exported (default:
~/Desktop,~/Downloads). Supports~,$VAR,${VAR}, and%VAR%(Windows). - Context paths: Directories outside the vault that Claude can read for additional context (click folder icon in input toolbar)
- Show tool usage: Display file operations in chat
- Excluded tags: Tags that prevent notes from auto-loading (e.g.,
sensitive,private) - Media folder: Configure where vault stores attachments for embedded image support (e.g.,
attachments) - Custom system prompt: Additional instructions appended to the default system prompt (Instruction Mode
#saves here) - Title generation model: Model used for auto-generating conversation titles (default: Auto/Haiku)
- Permission mode: Toggle YOLO (bypass prompts) or Safe (require approval)
- Approved actions: In Safe mode, manage permanently approved actions (Allow Once vs. Always Allow)
- Slash commands: Create/edit/import/export custom
/commands(optionally override model and allowed tools) - Environment variables: Custom environment variables for Claude SDK (KEY=VALUE format)
- Environment snippets: Save and restore environment variable configurations
- MCP Servers: Add/edit/test/delete MCP server configurations with context-saving mode
- Vault restriction: File tools and Bash commands are limited to the Obsidian vault. Paths are resolved with
realpathto prevent symlink escapes; attempts outside the vault are blocked. - Export paths exception: Write operations to configured export paths (e.g.,
~/Desktop) are allowed for export workflows (e.g.,pandocgenerating.docx). Export paths are treated as write-only:Read/Glob/Grep/LSremain vault-only, andBashonly allows export paths as write targets (e.g.,-o/--output,>). - Context paths exception: Read operations from configured context paths are allowed. Context paths are read-only:
Read/Glob/Grep/LSwork,Bashallows read operations (e.g.,cat,pandoc ... -t plain), but all write operations are blocked. - Approvals:
- Safe mode shows an approval modal per tool call.
- Bash approvals require an exact command match.
- File tools allow exact or prefix path matches.
- Inline bash in slash commands:
- In Safe mode, each
!`command`substitution prompts for approval. - The command blocklist also applies.
- Inline-bash prompts are "Allow once" only (no permanent approval).
- In Safe mode, each
- Command blocklist (platform-detected):
- Unix:
rm -rf,chmod 777,chmod -R 777 - Windows CMD:
del /s /q,rd /s /q,rmdir /s /q,format,diskpart - Windows PowerShell:
Remove-Item -Recurse -Force,Format-Volume,Clear-Disk
- Unix:
- Outbound scope: Content sent to Claude/custom APIs includes your input, attached files/snippets, images (base64), and model-issued tool calls plus summarized outputs. Default provider is Anthropic; if
ANTHROPIC_BASE_URLis set, traffic goes to that endpoint. - Local storage: Data is stored in a distributed format (like Claude Code):
vault/.claude/settings.json- User settings and permissions (shareable)vault/.claude/mcp.json- MCP server configurations (Claude Code compatible)vault/.claude/commands/*.md- Slash commands as Markdown filesvault/.claude/sessions/*.jsonl- Chat sessions (one file per conversation).obsidian/plugins/claudian/data.json- Machine state (active conversation, model tracking).claudian-cache/images/- Image cache (SHA-256 deduplicated)
- Migration: Existing users are automatically migrated from the old single-file format on first load. Migration will be removed in v2.0.
- Commands & file access: The plugin can read/write files and execute Bash commands within the vault directory; Safe mode approvals and the blocklist apply, and paths are constrained to the vault via
realpath. - User controls: You can edit the blocked-command list, switch Safe/YOLO modes, clear history, delete caches, and remove API keys; disabling the plugin stops all remote calls.
- Telemetry: No additional telemetry or third-party tracking. Data retention/compliance follows the terms of your configured API provider.
src/
├── main.ts # Plugin entry point
├── core/ # Core infrastructure
│ ├── agent/ # Claude Agent SDK wrapper (ClaudianService)
│ ├── hooks/ # PreToolUse/PostToolUse hooks
│ ├── images/ # Image caching and loading
│ ├── mcp/ # MCP server config management (McpServerManager)
│ ├── prompts/ # System prompts for agents
│ ├── sdk/ # SDK message transformation
│ ├── security/ # Approval, blocklist, path validation
│ ├── storage/ # Distributed storage system
│ ├── tools/ # Tool constants and utilities
│ └── types/ # Type definitions
├── features/ # Feature modules
│ ├── chat/ # Main chat view with modular controllers
│ ├── inline-edit/ # Inline edit service
│ ├── mcp/ # MCP @-mention detection and connection testing
│ └── settings/ # Settings tab (ClaudianSettings)
├── ui/ # UI components
│ ├── components/ # Input toolbar, file/image context, dropdowns, AskUserQuestion panel
│ ├── modals/ # Approval, inline edit, instruction, MCP modals
│ ├── renderers/ # Thinking blocks, tool calls, diffs, subagents, AskUserQuestion
│ └── settings/ # Env snippets, MCP settings, slash commands
├── utils/ # Modular utility functions
└── style/ # Modular CSS (→ styles.css)
- Session persistence within sessions
- Chat history persistence across plugin restarts
- Conversation switching with history dropdown
- File context awareness (auto-attach + @ mention)
- Context menu: "Ask Claude about this file"
- Extended thinking display
- Model selection
- Thinking token budget adjustment
- Permission modes (YOLO/Safe)
- Edited files indicator for Claude edits
- Environment variables support with snippet management
- Image support
- Subagent visualization with nested tool tracking
- Async subagent support
- Inline edit feature
- Diff view in chat panel
- Cursor position awareness in inline edit
- Slash commands
- Instruction mode (
#) to save in custom system prompt - Skills support (Claude Code compatible)
- Selection awareness in main chat (visual indicator + context)
- Context paths for read-only access to external directories
- Distributed storage (settings, commands, sessions as separate files)
- Windows platform support (MSYS paths, PowerShell blocklist, env vars)
- MCP (Model Context Protocol) server support with context-saving mode
- Context window usage display
- Plan mode (Shift+Tab toggle, read-only exploration, approval flow)
- Auto title generation (AI-powered, concurrent, with regenerate option)
- Context path @-mention (
@folder/to filter files from external directories) - Hooks and other advanced features
Licensed under the MIT License.
- Obsidian for the plugin API
- Anthropic for Claude and the Claude Agent SDK
