By japan4415
Claude Code hook for Obsidian integration - saves session history and generates reflections
Claude CodeのStop hookでセッション履歴をObsidianに自動保存し、振り返りを生成するプラグインです。
セッション終了時に以下を自動で行います:
Claude Code Plugin Marketplaceに対応しています。Marketplace経由でインストールすると、scripts/run_hook.sh が自動的にStop hookとして登録されます。
git clone https://github.com/japan4415/claude-code-obsidian-hook.git
cd claude-code-obsidian-hook
bash install.sh
install.sh は以下を行います:
uv sync で依存パッケージをインストール~/.claude/settings.json にStop hookを登録coding/reflections.md を初期化(Obsidian CLIが利用可能な場合)| 変数名 | 説明 | デフォルト |
|---|---|---|
OBSIDIAN_CLI | Obsidian CLIの実行パス | /usr/local/bin/obsidian |
CLAUDE_CLI | Claude CLIの実行パス | /usr/local/bin/claude |
CLAUDE_SKIP_ANALYSIS | 1 に設定するとセッション保存・振り返り生成をすべてスキップ(主に再帰防止用の内部フラグ) | 未設定 |
CLAUDE_PLUGIN_ROOT | プラグインのインストールディレクトリ(Marketplace用) | — |
CLAUDE_PLUGIN_DATA | プラグインの永続データディレクトリ(Marketplace用) | — |
CLAUDE_OBSIDIAN_HOOK_ROOT | プロジェクトルートパスの上書き | — |
インストール後、特別な操作は不要です。Claude Codeのセッションを終了すると、Stop hookが自動的に発火し:
coding/reflections.md に追記します振り返り生成を一時的にスキップしたい場合は、環境変数 CLAUDE_SKIP_ANALYSIS=1 を設定してください。
# 依存パッケージのインストール
uv sync
# テスト実行
uv run pytest
# Lint実行
uv run ruff check .
Apache License 2.0 — 詳細は LICENSE を参照してください。
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimnpx claudepluginhub japan4415/claude-code-obsidian-hook --plugin claude-obsidian-hookAutomatic Claude Code -> Obsidian second brain: zero-config session capture, hybrid search, autonomous recall, daily/lessons/preferences.
Long-term memory system for Claude Code that captures learnings through diary entries and synthesizes insights through periodic reflection
Give your AI coding agent a permanent second brain. Connect Claude Code to an Obsidian vault to auto-record decisions, instantly recall project context, and orchestrate automated refactoring for your team's knowledge base.
Sync AI conversations to an Obsidian knowledge base with Memory Mason knowledge base skills.
Continuous memory for Claude Code. Extracts, summarizes, and compresses conversations into tiered daily logs. Claude remembers what you did yesterday.
Personal AI Infrastructure — persistent memory, session continuity, and knowledge graph for Claude Code