obs-memory
Obsidianというメモアプリを活用し、過去の知識やプロジェクト情報を参照・記録することで、コーディング作業を効率化し、新たな発見を蓄積できる、まるで優秀な相棒のような支援をするSkill。
📜 元の英語説明(参考)
Persistent Obsidian-based memory for coding agents. Use at session start to orient from a knowledge vault, during work to look up architecture/component/pattern notes, and when discoveries are made to write them back. Activate when the user mentions obsidian memory, obsidian vault, obsidian notes, or /obs commands. Provides commands: init, analyze, recap, project, note, todo, lookup, relate.
🇯🇵 日本人クリエイター向け解説
Obsidianというメモアプリを活用し、過去の知識やプロジェクト情報を参照・記録することで、コーディング作業を効率化し、新たな発見を蓄積できる、まるで優秀な相棒のような支援をするSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o obs-memory.zip https://jpskill.com/download/9317.zip && unzip -o obs-memory.zip && rm obs-memory.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/9317.zip -OutFile "$d\obs-memory.zip"; Expand-Archive "$d\obs-memory.zip" -DestinationPath $d -Force; ri "$d\obs-memory.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
obs-memory.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
obs-memoryフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Obsidian Agent Memory
永続的なObsidianナレッジボルト(セッションを超えて持続するグラフ構造化されたメモリ)にアクセスできます。これを使用して、状況を把握し、アーキテクチャやコンポーネントの知識を調べ、発見したことを書き戻します。
Vault の検出
次のチェーンを使用してボルトのパスを解決します(最初に一致したものが優先されます)。
- 環境変数:
$OBSIDIAN_VAULT_PATH - Agent config reference: エージェントのプロジェクトまたはグローバル設定からボルトのパスを解析します(
~/Documents/SomeName/のようなパスを持つ "Obsidian Knowledge Vault" セクションを探します)。 - デフォルト:
~/Documents/AgentMemory
解決されたパスを、後続のすべての操作のために $VAULT として保存します。CLI呼び出しのために $VAULT_NAME を basename "$VAULT" として導出します。
$VAULT/Home.md が存在するかどうかを確認して、ボルトが存在することを確認します。ボルトが存在しない場合は、ユーザーに通知し、バンドルされたテンプレートから新しいボルトをブートストラップするために init コマンドを実行することを提案します。
セッション開始 — オリエンテーション
すべてのセッションの開始時に、最大2つの操作で状況を把握します。
ステップ 1: TODO の読み取り
CLI-first:
obsidian vault=$VAULT_NAME tasks path="todos" todo verbose
フォールバック: $VAULT/todos/Active TODOs.md にあるファイルを読み取ります。
保留中、進行中、および最近完了したものを把握します。
ステップ 2: 現在のプロジェクトを検出し、その概要を読み取る
現在の作業ディレクトリからプロジェクトを自動検出します。
basename $(git rev-parse --show-toplevel 2>/dev/null) 2>/dev/null || basename $(pwd)
次に、$VAULT/projects/*/ 内のファイルを一覧表示して、一致するプロジェクトが存在するかどうかを確認します。gitリポジトリ名(またはディレクトリ名)をプロジェクトフォルダ名と照合します。一致するものが見つかった場合は、$VAULT/projects/{matched-name}/{matched-name}.md にあるプロジェクトの概要を読み取ります。
このプロジェクトの概要には、すべてのコンポーネント、パターン、アーキテクチャの決定、およびドメインへの wikilink が含まれています。まだリンクされたノートを読まないでください — 現在のタスクでそのコンテキストが必要になったときに、オンデマンドでそれらに従ってください。
セッション開始時に読まないもの
Home.md(道に迷ってプロジェクトが見つからない場合のみ)sessions/(ユーザーが以前の作業を参照する場合のみ)- ドメインインデックス(プロジェクト間の知識が必要な場合のみ)
- コンポーネントノート(そのコンポーネントで作業している場合のみ)
自動的な振る舞い
これらの振る舞いは、このスキルを使用するすべてのエージェントに適用されます。明示的なコマンドは必要ありません。
セッション開始時
上記のセッション開始手順に従って、要求されなくても自動的にオリエンテーション(TODO + プロジェクトの概要)を行います。解決されたパスにボルトが存在しない場合は、ユーザーに通知し、init を実行することを提案します。
セッション終了シグナル時
ユーザーが "done"、"wrapping up"、"that's it"、"let's stop"、または同様のセッション終了の言葉を言った場合 — セッションの概要を書き込むことを提案します。自動実行しないでください。最初に尋ねてください: "Want me to write a session summary to the vault before we wrap up?"
コンポーネントの発見時
ボルトノートがないコンポーネントを深く分析し、プロジェクトにアクティブなボルトがある場合 — コンポーネントノートを作成し、インポートと依存関係から関係を推測することを提案します。例: "I noticed there's no vault note for the AuthMiddleware component. Want me to create one and map its dependencies?"
初回実行時
解決されたパスにボルトが存在しない場合は、init を実行するようにユーザーを誘導し、gitリポジトリ内にある場合は現在のプロジェクトを自動的にスキャフォールドします。
作業中 — グラフナビゲーション
原則: 最初に CLI クエリを使用し、次にファイル読み取りを使用します。 Obsidian CLI は、プロパティ、リンク、バックリンク、タグ、および検索への構造化されたアクセスを提供します — ファイル全体を読み取るよりもこれらを優先します。
CLI-first ルックアップ (推奨)
ファイル読み取りトークンを消費せずに、ターゲットを絞ったクエリには、次の CLI コマンドを使用します。
# Query a component's dependencies
obsidian vault=$VAULT_NAME property:read file="Component Name" name="depends-on"
# Find what depends on a component
obsidian vault=$VAULT_NAME property:read file="Component Name" name="depended-on-by"
obsidian vault=$VAULT_NAME backlinks file="Component Name"
# Find all outgoing links from a note
obsidian vault=$VAULT_NAME links file="Component Name"
# Find all notes of a type
obsidian vault=$VAULT_NAME tag verbose name="component"
# Search vault content
obsidian vault=$VAULT_NAME search format=json query="search term" matches limit=10
# Get note structure without full read
obsidian vault=$VAULT_NAME outline file="Component Name"
# Read a specific property
obsidian vault=$VAULT_NAME property:read file="Component Name" name="key-files"
ここで、$VAULT_NAME はボルトフォルダ名($VAULT の basename)です。
ファイル読み取りフォールバック (CLI が利用できない場合)
Obsidian CLI が利用できない場合は、ファイル読み取りにフォールバックします。
- コンポーネントを理解する必要がありますか?プロジェクトの概要がそれにリンクしています。その1つのノートを読んでください。
- アーキテクチャの決定が必要ですか?コンポーネントノートまたはプロジェクトの概要がそれにリンクしています。リンクをたどってください。
- プロジェクト間の知識が必要ですか?コンポーネント/パターンノートがドメインノートにリンクしています。リンクをたどってください。
- セッション履歴が必要ですか?行き詰まっている場合、またはユーザーが以前の作業を参照する場合にのみ読んでください。
Frontmatter-first スキャン
適切なノートを見つけるために複数のノートをスキャンする必要がある場合は、各ファイルの最初の〜10行だけを読み取ります。frontmatter の tags、project、type、および status フィールドは、本文全体を読む前に、ノートが関連するかどうかを示します。
読み取り前のディレクトリリスト
ファイルを読み取る前にディレクトリの内容を一覧表示します — トークンを消費せずに何が存在するかを知ります。
$VAULT/projects/{name}/**/*.md— プロジェクトのすべてのノート$VAULT/domains/{tech}/*.md— ドメイン知識ファイル
Vault への書き込み
簡潔に書いてください。ノートは将来のコンテキストのためのものであり、人間のドキュメントではありません。以下を優先します。
- 散文よりも箇条書き
- 繰り返しの説明よりも wikilink(リンクして、再記述しないでください)
- 詳細な説明よりも、検出可能性のための frontmatter タグ
書き込むタイミング
- 新しいコンポーネントが発見された: コードベースの一部を深く理解したら、コンポーネントノートを作成します
- アーキテクチャの決定がなされた: 重要な ADR を記録します
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Obsidian Agent Memory
You have access to a persistent Obsidian knowledge vault — a graph-structured memory that persists across sessions. Use it to orient yourself, look up architecture and component knowledge, and write back discoveries.
Vault Discovery
Resolve the vault path using this chain (first match wins):
- Environment variable:
$OBSIDIAN_VAULT_PATH - Agent config reference: Parse the vault path from the agent's project or global config (look for "Obsidian Knowledge Vault" section with a path like
~/Documents/SomeName/) - Default:
~/Documents/AgentMemory
Store the resolved path as $VAULT for all subsequent operations. Derive $VAULT_NAME as basename "$VAULT" for CLI calls.
Verify the vault exists by checking for $VAULT/Home.md. If the vault doesn't exist, inform the user and suggest running the init command to bootstrap a new vault from the bundled template.
Session Start — Orientation
At the start of every session, orient yourself with at most 2 operations:
Step 1: Read TODOs
CLI-first:
obsidian vault=$VAULT_NAME tasks path="todos" todo verbose
Fallback: Read the file at $VAULT/todos/Active TODOs.md.
Know what's pending, in-progress, and recently completed.
Step 2: Detect current project and read its overview
Auto-detect the project from the current working directory:
basename $(git rev-parse --show-toplevel 2>/dev/null) 2>/dev/null || basename $(pwd)
Then check if a matching project exists by listing files in $VAULT/projects/*/. Match the git repo name (or directory name) against project folder names. If a match is found, read the project overview at $VAULT/projects/{matched-name}/{matched-name}.md.
This project overview contains wikilinks to all components, patterns, architecture decisions, and domains. Do not read those linked notes yet — follow them on demand when the current task requires that context.
What NOT to read at session start
Home.md(only if you're lost and can't find the project)sessions/(only if the user references prior work)- Domain indexes (only if you need cross-project knowledge)
- Component notes (only when working on that component)
Automatic Behaviors
These behaviors apply to any agent using this skill. They do not require explicit commands.
On session start
Auto-orient (TODOs + project overview) without being asked, following the Session Start procedure above. If the vault doesn't exist at the resolved path, inform the user and suggest running init.
On session end signals
When the user says "done", "wrapping up", "that's it", "let's stop", or similar end-of-session language — offer to write a session summary. Don't auto-run; ask first: "Want me to write a session summary to the vault before we wrap up?"
On component discovery
When you deeply analyze a component that has no vault note — and the project has an active vault — offer to create a component note and infer relationships from imports and dependencies. Example: "I noticed there's no vault note for the AuthMiddleware component. Want me to create one and map its dependencies?"
On first run
When the vault doesn't exist at any resolved path, guide the user through init, then auto-scaffold the current project if inside a git repo.
During Work — Graph Navigation
Principle: Use CLI queries first, file reads second. The Obsidian CLI provides structured access to properties, links, backlinks, tags, and search — prefer these over reading entire files.
CLI-first lookups (preferred)
Use these CLI commands for targeted queries without consuming file-read tokens:
# Query a component's dependencies
obsidian vault=$VAULT_NAME property:read file="Component Name" name="depends-on"
# Find what depends on a component
obsidian vault=$VAULT_NAME property:read file="Component Name" name="depended-on-by"
obsidian vault=$VAULT_NAME backlinks file="Component Name"
# Find all outgoing links from a note
obsidian vault=$VAULT_NAME links file="Component Name"
# Find all notes of a type
obsidian vault=$VAULT_NAME tag verbose name="component"
# Search vault content
obsidian vault=$VAULT_NAME search format=json query="search term" matches limit=10
# Get note structure without full read
obsidian vault=$VAULT_NAME outline file="Component Name"
# Read a specific property
obsidian vault=$VAULT_NAME property:read file="Component Name" name="key-files"
Where $VAULT_NAME is the vault folder name (basename of $VAULT).
File-read fallback (when CLI unavailable)
Fall back to file reads when the Obsidian CLI is not available:
- Need to understand a component? The project overview links to it. Read that one note.
- Need an architecture decision? The component note or project overview links to it. Follow the link.
- Need cross-project knowledge? Component/pattern notes link to domain notes. Follow the link.
- Need session history? Only read if you're stuck or the user references prior work.
Frontmatter-first scanning
When you need to scan multiple notes to find the right one, read just the first ~10 lines of each file. The tags, project, type, and status fields in the frontmatter tell you if the note is relevant before reading the full body.
Directory listing before reading
List directory contents before reading files — know what exists without consuming tokens:
$VAULT/projects/{name}/**/*.md— all notes for a project$VAULT/domains/{tech}/*.md— domain knowledge files
Writing to the Vault
Write concisely. Notes are for your future context, not human documentation. Prefer:
- Bullet points over prose
- Wikilinks over repeated explanations (link to it, don't re-state it)
- Frontmatter tags for discoverability over verbose descriptions
When to write
- New component discovered: Create a component note when you deeply understand a part of the codebase
- Architecture decision made: Record ADRs when significant design choices are made
- Pattern identified: Document recurring patterns that future sessions should follow
- Domain knowledge learned: Write to domain notes when you discover cross-project knowledge
Scoping rules
| Knowledge type | Location | Example |
|---|---|---|
| One project only | projects/{name}/ |
How this API handles auth |
| Shared across projects | domains/{tech}/ |
How Go interfaces work |
| Universal, tech-agnostic | patterns/ |
SOLID principles |
| Session summaries | sessions/ |
What was done and discovered |
| TODOs | todos/Active TODOs.md |
Grouped by project |
Frontmatter conventions
Always include in new notes:
---
tags: [category, project/short-name]
type: <component|adr|session|project>
project: "[[projects/{name}/{name}]]"
created: YYYY-MM-DD
---
Wikilink conventions
- Link to related notes:
[[projects/{name}/components/Component Name|Component Name]] - Link to domains:
[[domains/{tech}/{Tech Name}|Tech Name]] - Link back to project:
[[projects/{name}/{name}|project-name]]
Note templates
Component Note:
---
tags: [components, project/{short-name}]
type: component
project: "[[projects/{name}/{name}]]"
created: {date}
status: active
layer: ""
depends-on: []
depended-on-by: []
key-files: []
---
Sections: Purpose, Gotchas
Architecture Decision:
---
tags: [architecture, decision, project/{short-name}]
type: adr
project: "[[projects/{name}/{name}]]"
status: proposed | accepted | superseded
created: {date}
---
Sections: Context, Decision, Alternatives Considered, Consequences
Session Note:
---
tags: [sessions]
type: session
projects:
- "[[projects/{name}/{name}]]"
created: {date}
branch: {branch-name}
---
Sections: Context, Work Done, Discoveries, Decisions, Next Steps
Commands
init — Initialize the Vault
Bootstrap a new Obsidian Agent Memory vault from the bundled template.
Usage: init [path]
Steps:
-
Determine vault path: Use the first argument if provided, otherwise use the vault resolution chain (default:
~/Documents/AgentMemory). -
Check if vault already exists: Look for
$VAULT/Home.md. If it exists, tell the user the vault already exists at that path and offer to open it. -
Locate the bundled template: The template is at
vault-template/relative to the skill package root. Search for the skill package installation directory — it may be in the agent's plugin/skill cache or a local checkout. Look for thevault-template/Home.mdfile to confirm the correct path. -
Create the vault:
mkdir -p "$VAULT" cp -r "$TEMPLATE_DIR/vault-template/"* "$VAULT/" -
Create Obsidian config directory:
mkdir -p "$VAULT/.obsidian"Write the following to
$VAULT/.obsidian/app.json:{ "alwaysUpdateLinks": true, "newFileLocation": "folder", "newFileFolderPath": "inbox", "attachmentFolderPath": "attachments" } -
Create empty directories:
mkdir -p "$VAULT/inbox" mkdir -p "$VAULT/attachments"Create
.gitkeepfiles in each empty directory. -
Report the created vault and provide next steps:
- Open in Obsidian: Vault Switcher → Open folder as vault →
$VAULT - Set the vault path via
OBSIDIAN_VAULT_PATHenvironment variable or agent config - Start working — the agent will build the knowledge graph as it goes
- Open in Obsidian: Vault Switcher → Open folder as vault →
-
Generate agent config snippet: Output a vault path snippet appropriate for the user's agent. For Claude Code, output a
CLAUDE.mdsnippet:## Obsidian Knowledge Vault Persistent knowledge vault at `$VAULT`.For other agents, output a generic instruction: "Add
OBSIDIAN_VAULT_PATH=$VAULTto your environment or agent config." -
Auto-scaffold current project: If inside a git repo, automatically run the
projectcommand to scaffold the current project in the vault. -
Concise output: Keep the final output to 5-8 lines max: vault path created, project scaffolded (if applicable), how to open in Obsidian, how to set the vault path.
analyze — Analyze Project & Hydrate Vault
Analyze the current codebase and populate the vault with interconnected, content-rich notes.
Usage: analyze (no arguments — uses current repo)
Phase 1: Discovery — Scan for Knowledge Sources
Scan the repo for files that contain pre-existing knowledge:
| Category | Files to scan |
|---|---|
| Agent configs | CLAUDE.md, .claude/CLAUDE.md, .cursorrules, .windsurfrules, .clinerules, AGENTS.md, Agents.md |
| Documentation | README.md, CONTRIBUTING.md, ARCHITECTURE.md, docs/architecture.md, docs/ARCHITECTURE.md |
| Existing ADRs | docs/adr/ADR-*.md, architecture/ADR-*.md, adr/*.md, docs/decisions/*.md |
| Project metadata | package.json, go.mod, Cargo.toml, pyproject.toml, setup.py, Gemfile, pom.xml, build.gradle, *.csproj |
| Build/CI | Makefile, Dockerfile, docker-compose.yml, .github/workflows/*.yml, .gitlab-ci.yml |
| Config | tsconfig.json, .eslintrc.*, jest.config.*, .goreleaser.yml |
Read each discovered file. For large files (README, agent configs), read fully. For metadata files, extract key fields (name, version, dependencies).
Also gather:
- Repo URL from
git remote get-url origin - Repo root path from
git rev-parse --show-toplevel - Active branch from
git branch --show-current - Directory tree (top 2 levels of source directories, excluding hidden/vendor/node_modules)
- File extension frequency (for language detection)
Phase 2: Analysis — Extract & Synthesize
Using the discovered content, synthesize:
- Project metadata: name, language(s), framework(s), repo URL, local path
- Architecture summary: Entry points, layer organization (e.g.,
internal/→ Go service layers,src/components/→ React app), build system - Component inventory: Major functional modules — each top-level source directory or logical grouping that represents a distinct unit. For each: purpose (from README/agent config context), key files, and relationships
- Pattern inventory: Coding conventions, error handling strategies, testing approaches — extracted from agent config files (CLAUDE.md sections like "Coding Guidelines", "Testing", etc.)
- Domain mapping: Detected technologies → vault domain notes (e.g., Go, TypeScript, Terraform, React)
- Existing decisions: ADR files found in the repo → import as vault ADR notes
- Dependency summary: Key dependencies from package manifests (listed in project overview, not separate notes)
Phase 3: Hydration — Write Vault Notes
Idempotency rules:
- If project directory doesn't exist → create everything (scaffold + populate)
- If project directory exists but overview is a skeleton → replace overview with populated version
- If individual component/pattern/ADR notes already exist → skip and report (don't overwrite manual work)
- Domain notes: create if missing, append project link if existing
Notes to write:
-
Project overview (
$VAULT/projects/{name}/{name}.md) — Fully populated:--- aliases: [] tags: [project/{short-name}] type: project repo: {git remote url} path: {repo root path} language: {detected language(s)} framework: {detected framework(s)} created: {YYYY-MM-DD} status: active ---Sections:
- Architecture: Real description from analysis
- Components: Table with wikilinks to component notes
- Project Patterns: Table with wikilinks to pattern notes
- Architecture Decisions: List with wikilinks to ADR notes
- Key Dependencies: From package manifests
- Domains: Wikilinks to domain notes
-
Component notes (
$VAULT/projects/{name}/components/{Component}.md) — One per major module:--- tags: [components, project/{short-name}] type: component project: "[[projects/{name}/{name}]]" created: {YYYY-MM-DD} status: active layer: {detected layer} depends-on: [] depended-on-by: [] key-files: [{key files list}] ---Sections: Purpose, Gotchas
-
Pattern notes (
$VAULT/projects/{name}/patterns/{Pattern}.md) — From agent config conventions:--- tags: [patterns, project/{short-name}] type: pattern project: "[[projects/{name}/{name}]]" created: {YYYY-MM-DD} ---Sections: Pattern, When to Use, Implementation
-
ADR imports (
$VAULT/projects/{name}/architecture/ADR-{NNNN} {title}.md) — From existing repo ADRs:--- tags: [architecture, decision, project/{short-name}] type: adr project: "[[projects/{name}/{name}]]" status: accepted created: {YYYY-MM-DD} ---Preserve original content, add vault frontmatter.
-
Domain notes (
$VAULT/domains/{tech}/{Tech}.md):- If new: create with project link
- If existing: add this project to "Projects Using This Domain" section
-
Index updates:
$VAULT/projects/Projects.md— add/update row$VAULT/domains/Domains.md— add/update rows for new domains
Phase 4: Report
Print a summary:
Analyzed: {project-name}
Sources read: {N} knowledge files
Created: project overview (populated)
Created: {N} component notes
Created: {N} pattern notes
Imported: {N} architecture decisions
Linked: {N} domain notes
Skipped: {N} existing notes (preserved)
recap — Write Session Summary
Write a session summary note and update TODOs.
Usage: recap
Steps:
-
Gather session context by running:
git log --oneline -20 git diff --stat HEAD~5..HEAD 2>/dev/null || git diff --stat git branch --show-current -
Read current TODOs — CLI-first:
obsidian vault=$VAULT_NAME tasks path="todos" todo verboseFallback: Read
$VAULT/todos/Active TODOs.md. -
Read project overview from
$VAULT/projects/$PROJECT/$PROJECT.md(for wikilinks and context). -
Write session note — CLI-first:
obsidian vault=$VAULT_NAME create path="sessions/{YYYY-MM-DD} - {title}" template="Session Note" silent obsidian vault=$VAULT_NAME property:set path="sessions/{YYYY-MM-DD} - {title}" name="type" value="session" type="text" obsidian vault=$VAULT_NAME property:set path="sessions/{YYYY-MM-DD} - {title}" name="branch" value="{current-branch}" type="text" obsidian vault=$VAULT_NAME property:set path="sessions/{YYYY-MM-DD} - {title}" name="projects" value="[[projects/$PROJECT/$PROJECT]]" type="list"Then append body content:
obsidian vault=$VAULT_NAME append path="sessions/{YYYY-MM-DD} - {title}" content="..."Fallback: Write the file directly at
$VAULT/sessions/{YYYY-MM-DD} - {title}.md:--- tags: [sessions] type: session projects: - "[[projects/$PROJECT/$PROJECT]]" created: {YYYY-MM-DD} branch: {current-branch} ---Sections to fill:
- Context: What was being worked on (from git log context)
- Work Done: Numbered list of accomplishments (from commits and diffs)
- Discoveries: Technical findings worth remembering
- Decisions: Design choices made during this session
- Next Steps: What should happen next (checkboxes)
-
Update TODOs: Edit
$VAULT/todos/Active TODOs.md:- Remove completed
[x]items from Active TODOs — append them to$VAULT/todos/Completed TODOs Archive.mdunder a dated## $PROJECT (YYYY-MM-DD)heading (create the file if it doesn't exist) - Add new items discovered during the session
- Keep items grouped by project
- Never leave
[x]items in Active TODOs — they accumulate over time and waste context window on every session start
- Remove completed
-
Update Session Log: Add an entry to
$VAULT/sessions/Session Log.mdwith the date, project, branch, and a one-line summary. -
Report what was written.
project — Scaffold New Project
Scaffold a new project in the vault. Uses the first argument as the project name, or defaults to $PROJECT.
Usage: project [name]
Steps:
-
Determine project name: Use the argument if provided, otherwise use
$PROJECT. -
Check if project exists: Look for
$VAULT/projects/{name}/{name}.md. If it exists, tell the user and offer to open it instead. -
Create directory structure:
$VAULT/projects/{name}/$VAULT/projects/{name}/architecture/$VAULT/projects/{name}/components/$VAULT/projects/{name}/patterns/
-
Create project overview at
$VAULT/projects/{name}/{name}.md:--- aliases: [] tags: [project/{short-name}] type: project repo: {git remote url if available} path: {working directory} language: {detected from files} framework: created: {YYYY-MM-DD} status: active ---Sections: Architecture, Components, Project Patterns, Architecture Decisions, Domains
Auto-detect and fill:
- Language from file extensions in the repo
- Repo URL from
git remote get-url origin - Link to relevant domains that exist in
$VAULT/domains/
-
Update Projects.md: Add a row to the project table in
$VAULT/projects/Projects.md. -
Report the scaffolded structure.
note — Create a Note from Template
Create a note using a template. The first argument specifies the type: component, adr, or pattern.
Usage: note <component|adr|pattern> [name]
note component [name]
Create at $VAULT/projects/$PROJECT/components/{name}.md:
---
tags: [components, project/{short-name}]
type: component
project: "[[projects/$PROJECT/$PROJECT]]"
created: {YYYY-MM-DD}
status: active
layer: ""
depends-on: []
depended-on-by: []
key-files: []
---
Sections: Purpose, Gotchas
If a name argument is provided, use it as the component name. Otherwise, ask the user.
note adr [title]
Determine the next ADR number by listing existing ADRs in $VAULT/projects/$PROJECT/architecture/ADR-*.md.
Create at $VAULT/projects/$PROJECT/architecture/ADR-{NNNN} {title}.md:
---
tags: [architecture, decision, project/{short-name}]
type: adr
project: "[[projects/$PROJECT/$PROJECT]]"
status: proposed
created: {YYYY-MM-DD}
---
Sections: Context, Decision, Alternatives Considered, Consequences
note pattern [name]
Create at $VAULT/projects/$PROJECT/patterns/{name}.md:
---
tags: [patterns, project/{short-name}]
project: "[[projects/$PROJECT/$PROJECT]]"
created: {YYYY-MM-DD}
---
Sections: Pattern, When to Use, Implementation, Examples
After creating any note, add a wikilink to it from the project overview.
todo — Manage TODOs
View and update the Active TODOs for the current project.
Usage: todo [action]
Steps:
-
Read current TODOs from
$VAULT/todos/Active TODOs.md. -
If no additional arguments: Display the current TODOs for
$PROJECTand ask what to update. -
If arguments provided: Parse as a TODO action:
- Plain text → Add as a new pending item under
$PROJECT done: <text>→ Mark item done: remove from Active TODOs, append to$VAULT/todos/Completed TODOs Archive.mdunder a dated## $PROJECT (YYYY-MM-DD)heading (create the file if it doesn't exist)remove: <text>→ Remove matching item
- Plain text → Add as a new pending item under
-
Write back Active TODOs (and archive file if items were completed).
lookup — Search the Vault
Search the vault for knowledge. Supports targeted subcommands and freetext search.
Usage: lookup <subcommand|freetext>
lookup deps <name>
Query what a component depends on.
obsidian vault=$VAULT_NAME property:read file="<name>" name="depends-on"
Fallback: Read the component note and parse the depends-on frontmatter list.
lookup consumers <name>
Query what depends on a component (reverse dependencies).
obsidian vault=$VAULT_NAME property:read file="<name>" name="depended-on-by"
obsidian vault=$VAULT_NAME backlinks file="<name>"
Combine results — depended-on-by gives explicit relationships, backlinks catches implicit references. Fallback: Read the component note and search for backlinks via Grep.
lookup related <name>
Query all notes connected to a given note (both directions).
obsidian vault=$VAULT_NAME links file="<name>"
obsidian vault=$VAULT_NAME backlinks file="<name>"
Fallback: Read the note and extract wikilinks, then Grep for [[<name> across the vault.
lookup type <type> [project]
Find all notes of a given type (component, adr, session, project).
obsidian vault=$VAULT_NAME tag verbose name="<type>"
If [project] is specified, filter results to notes also tagged project/<short-name>:
obsidian vault=$VAULT_NAME search query="type: <type>" path="projects/<project>"
Fallback: Grep for type: <type> across $VAULT.
lookup layer <layer> [project]
Find all components in a specific layer.
obsidian vault=$VAULT_NAME search query="layer: <layer>" path="projects/<project>"
If no project specified, search across all projects:
obsidian vault=$VAULT_NAME search query="layer: <layer>" path="projects"
Fallback: Grep for layer: <layer> across $VAULT/projects/.
lookup files <component>
Query key files for a component.
obsidian vault=$VAULT_NAME property:read file="<component>" name="key-files"
Fallback: Read the component note and parse the key-files frontmatter list.
lookup <freetext>
General search across the vault.
obsidian vault=$VAULT_NAME search format=json query="<freetext>" matches limit=10
Fallback: Search file contents for the query across all .md files in $VAULT.
If the query looks like a tag (starts with # or project/):
obsidian vault=$VAULT_NAME tags name="<query>"
If the query matches a note name:
obsidian vault=$VAULT_NAME backlinks file="<query>"
Present results: Show matching notes with their frontmatter (first ~10 lines) so the user can decide which to read in full.
relate — Manage Relationships
Create and query bidirectional relationships between notes via frontmatter properties.
Usage: relate <subcommand> [args]
Supported relationship types
| Forward property | Inverse property |
|---|---|
depends-on |
depended-on-by |
extends |
extended-by |
implements |
implemented-by |
consumes |
consumed-by |
relate <source> <target> [type]
Create a bidirectional relationship between two notes. Default type is depends-on/depended-on-by.
Steps:
-
Resolve note names: Use
file=parameter for note display names. If ambiguity is possible (same name, different folders), usepath=with full vault-relative path. -
Read current property on source (forward direction):
obsidian vault=$VAULT_NAME property:read file="<source>" name="<forward-property>"Fallback: Read the source note frontmatter.
-
Check if relationship already exists: If
<target>(as a wikilink) is already in the list, skip and report "already related". -
Append to source (forward direction): Build the new list locally by appending
[[<target>]]to the current values, then set:obsidian vault=$VAULT_NAME property:set file="<source>" name="<forward-property>" value="<full-list>" type="list"Fallback: Edit the source note's frontmatter directly.
-
Read current property on target (inverse direction):
obsidian vault=$VAULT_NAME property:read file="<target>" name="<inverse-property>" -
Append to target (inverse direction):
obsidian vault=$VAULT_NAME property:set file="<target>" name="<inverse-property>" value="<full-list>" type="list" -
Report the created relationship.
Safety: Always read-then-set. Never blind-append. The full list is constructed locally and set atomically.
relate show <name>
Display all relationships for a note.
Steps:
-
Query all 8 relationship properties:
obsidian vault=$VAULT_NAME property:read file="<name>" name="depends-on" obsidian vault=$VAULT_NAME property:read file="<name>" name="depended-on-by" obsidian vault=$VAULT_NAME property:read file="<name>" name="extends" obsidian vault=$VAULT_NAME property:read file="<name>" name="extended-by" obsidian vault=$VAULT_NAME property:read file="<name>" name="implements" obsidian vault=$VAULT_NAME property:read file="<name>" name="implemented-by" obsidian vault=$VAULT_NAME property:read file="<name>" name="consumes" obsidian vault=$VAULT_NAME property:read file="<name>" name="consumed-by"Fallback: Read the note frontmatter and parse all relationship properties.
-
Query structural links:
obsidian vault=$VAULT_NAME links file="<name>" obsidian vault=$VAULT_NAME backlinks file="<name>" -
Present results grouped by relationship type. Show explicit (property) relationships first, then structural (wikilink) relationships that aren't already covered.
relate tree <name> [depth]
Walk the dependency tree via BFS. Default depth is 2.
Steps:
-
Initialize BFS: Start with
<name>at depth 0. Maintain a visited set and a queue. -
For each node in the queue:
obsidian vault=$VAULT_NAME property:read file="<current>" name="depends-on"Fallback: Read the note and parse
depends-onfrom frontmatter. -
Add unvisited dependencies to the queue at
current_depth + 1. Stop whendepthlimit is reached. -
Present the tree as an indented list showing the dependency chain.
Token Budget Rules
- CLI over reads: Use
obsidianCLI for property reads, backlinks, links, tags, and search — these return targeted data without full file reads - Session start: At most 2 operations (TODOs + project overview)
- During work: Use
lookupsubcommands andrelate showbefore reading full notes - Frontmatter first: When scanning, read ~10 lines before committing to full read
- List before read: List directory contents before reading files
- Write concisely: Bullet points, links, tags — no prose when bullets suffice
Error Handling
- If the vault doesn't exist → suggest running
/obs initto bootstrap it - If the project doesn't exist in the vault → offer to run
/obs projectto scaffold it - If a note already exists → show it instead of overwriting, offer to edit
- If no git repo is detected → use current directory name as project name
- If CLI command fails → fall back to file read for the same data
Vault Structure Reference
$VAULT/
├── Home.md # Dashboard (read only if lost)
├── projects/{name}/
│ ├── {name}.md # Project overview — START HERE
│ ├── architecture/ # ADRs and design decisions
│ ├── components/ # Per-component notes
│ └── patterns/ # Project-specific patterns
├── domains/{tech}/ # Cross-project knowledge
├── patterns/ # Universal patterns
├── sessions/ # Session logs (read only when needed)
├── todos/Active TODOs.md # Pending work (read at session start)
├── templates/ # Note templates
└── inbox/ # Unsorted