From obsidian
Captures conversation context around git commits to Obsidian vault. Fires automatically via PostToolUse hook.
How this skill is triggered — by the user, by Claude, or both
Slash command
/obsidian:commit-captureThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The value here is not commit metadata — git already has that. The value is the conversation context: what you were investigating, what you tried, what you decided, and why.
The value here is not commit metadata — git already has that. The value is the conversation context: what you were investigating, what you tried, what you decided, and why.
Detection and metadata extraction are handled by scripts/commit-capture.sh (shell script, zero AI cost). This skill is invoked when the hook outputs a line starting with obsidian-commit-capture: — all metadata is inline, no file read needed.
Vault path is passed inline by the hook (parsed once from the resolved config — $OBSIDIAN_LOCAL_MD, else ${XDG_CONFIG_HOME:-$HOME/.config}/claude-obsidian/obsidian.local.md, else the plugin dir). Do not Read the config file from this skill — every read costs ~1-2K tokens per commit. If vault_path is empty in the hook output, skip silently (the config is missing or malformed).
Parse inline metadata from the hook output line:
obsidian-commit-capture: hash=<h> | msg=<m> | branch=<b> | files=<f> | org_repo=<o> | repo_name=<r> | ticket=<t> | date=<d> | time=<ti> | vault_path=<v>
Extract: hash, msg, branch, files, org_repo, repo_name, ticket, date, time, vault_path.
Determine target path (relative to vault_path from the hook output):
Projects/Development/<org_repo>/<date>.md
Read existing file at the target path. If it doesn't exist, create it.
If file is new, write with this template:
---
date: <date>
repo: <org_repo>
tags: [<repo_name>, auto-captured]
source: claude-code
---
# <repo_name> — <date>
If ticket is non-empty, add ticket-<ticket> to the tags array.
Build the session context — this is the primary output.
Review the full conversation since the last commit (or session start if first commit). Capture:
3-8 bullet points. Dense and specific. Written so you can reconstruct the reasoning months later.
Append this section to the end of the file:
## <time> — <hash>
**Branch:** <branch>
**Message:** <msg>
**Files:** <files>
### Context
- <bullet points from step 5>
---
Create parent directories if needed (mkdir -p via Bash).
No file cleanup needed — metadata was passed inline, no temp file was written.
Confirm silently — output only: Captured <hash> → <org_repo>/<date>.md
npx claudepluginhub nhangen/claude-obsidian-plugin --plugin obsidianCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.