obsidian-pkm-plugin / sample-project
CLAUDE.md13 starsChanged 10 months agoMITView on GitHub
Place this file in your code repository root. It configures Claude Code to integrate with your Obsidian PKM system via the vault-pkm MCP server. The vault-pkm plugin provides skills that automate common PKM workflows: Session-start context loading is handled automatically by the SessionStart hook. Whenever you mention a vault note, PKM file, or file inside 01-Projects/[YourProjectName]/ in your response to the user — whether quoting tool output, summarizing what you read, or referring to a file by name — format…
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-taskSkill
- pkm-exploreSkill
- pkm-session-endSkill
- pkm-writeSkill
- tackle-taskSkill
- triage-tasksSkill
The file
We split this CLAUDE.md into the rules it gives an agent
10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 47
All notes MUST include YAML frontmatter.
- Distinctive: line 62
When a significant technical decision is made:
- Very specific: line 64
Create an ADR using vault_write with the adr template:
- Very specific: line 73
Update _index.md to link the new ADR:
- Very specific: line 85
Use the vault-pkm:pkm-session-end skill at the end of each session — it handles devlog entries, link auditing, and capturing undocumented …
- Very specific: line 89
Use the vault-pkm:pkm-write skill when creating any vault note — it handles duplicate checking, template selection, link discovery, and …
- Distinctive: line 93
When debugging a complex issue, create a troubleshooting log:
- Distinctive: line 132
Check what was done in previous sessions to maintain continuity.
- Very specific: line 136
Use these with vault_write({ template: "name", path: "...", frontmatter: { tags: [...] } }):
- Very specific: line 156
Use the vault-pkm:pkm-session-end skill — it handles devlog updates, undocumented work capture, link audits, and index updates.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project: [Your Project Name]
Place this file in your code repository root. It configures Claude Code to integrate with your Obsidian PKM system via the
vault-pkmMCP server.
PKM Integration
- Vault project path:
01-Projects/[YourProjectName]/ - MCP Server:
vault-pkmplugin
PKM Skills
The vault-pkm plugin provides skills that automate common PKM workflows:
vault-pkm:pkm-write— Use when creating vault notes (duplicate check, linking, annotations)vault-pkm:pkm-explore— Use when researching what the vault knows about a topic (graph + semantic exploration)vault-pkm:pkm-session-end— Use when wrapping up a session (devlog, link audit, undocumented work capture)vault-pkm:triage-tasks— Surface and batch-update open tasks; presents numbered list with git/activity hintsvault-pkm:add-task— Fast task capture from a title, optional priority, and due datevault-pkm:tackle-task— Tackle a task end-to-end: read, explore context, execute at the right level of rigor, close when done.
Session-start context loading is handled automatically by the SessionStart hook.
Referring to vault files
Whenever you mention a vault note, PKM file, or file inside 01-Projects/[YourProjectName]/ in your response to the user — whether quoting tool output, summarizing what you read, or referring to a file by name — format it as a markdown link to its obsidian:// URI so the user can click to open it in Obsidian:
[01-Projects/[YourProjectName]/some/note.md](obsidian://open?vault=<vault-name>&file=01-Projects%2F[YourProjectName]%2Fsome%2Fnote)
Encoding rules: percent-encode / as %2F and spaces as %20. Strip the trailing .md from the URL file= parameter, but keep .md in the visible link text. The vault name is shown in any vault-pkm tool output (the part after vault=); reuse it.
The vault-pkm MCP tools already emit paths in this format. Preserve the link form when relaying; don't revert to bare paths for inline mentions. Apply the same format proactively when mentioning a vault file you haven't just queried (e.g., when answering "what's in the devlog?" or "see ADR-002").
PKM Agents
The plugin provides 3 specialized agents (visible in /agents). Delegate to them proactively:
| Agent | When to Delegate | Mode |
vault-explorer | Before creating notes on a topic, when researching existing knowledge | Foreground |
pkm-capture | After git commits (automatic via hook), after significant work blocks, before session ends | Background |
link-auditor | After creating/modifying multiple vault notes, periodic health checks | Background |
Documentation Rules
Metadata
All notes MUST include YAML frontmatter. See 06-System/metadata-schema.md for the full schema.
---
type: <type> # Required
created: YYYY-MM-DD # Required (auto-filled by vault_write)
tags: [...] # Required: at least one tag
status: <status> # If applicable
---Never create notes without frontmatter — use vault_write with a template.
Architecture Decisions
When a significant technical decision is made:
- Create an ADR using
vault_writewith theadrtemplate:vault_write({ template: "adr", path: "01-Projects/[YourProjectName]/development/decisions/ADR-{NNN}-{kebab-title}.md", frontmatter: { tags: ["decision", "relevant-topic"], deciders: "Team" } }) - Fill in Context, Decision, Options Considered, and Consequences sections
- Update
_index.mdto link the new ADR:vault_append({ path: "01-Projects/[YourProjectName]/_index.md", heading: "## Architecture Decisions", position: "end_of_section", content: "- [[ADR-{NNN}-{kebab-title}]]" })
Development Progress
Use the vault-pkm:pkm-session-end skill at the end of each session — it handles devlog entries, link auditing, and capturing undocumented work from the conversation.
Reusable Knowledge
Use the vault-pkm:pkm-write skill when creating any vault note — it handles duplicate checking, template selection, link discovery, and bidirectional linking automatically.
Troubleshooting
When debugging a complex issue, create a troubleshooting log:
vault_write({
template: "troubleshooting-log",
path: "01-Projects/[YourProjectName]/development/debug/{issue-name}.md",
frontmatter: { tags: ["debugging", "relevant-topic"] }
})Fill in: Problem, Symptoms, Root Cause, Solution, Prevention.
Context Queries
Find Related Notes
vault_search({ query: "keywords", folder: "01-Projects/[YourProjectName]" })
vault_semantic_search({ query: "concept description" })
vault_query({ type: "adr", folder: "01-Projects/[YourProjectName]" })
vault_tags({ folder: "01-Projects/[YourProjectName]" })Explore Connections
vault_neighborhood({ path: "01-Projects/[YourProjectName]/_index.md", depth: 2 })
vault_links({ path: "path/to/note.md", direction: "both" })vault_neighborhood traverses wikilinks via BFS and returns notes grouped by hop distance — useful for understanding how notes relate to each other.
Cross-Session Memory
vault_activity({ path: "01-Projects/[YourProjectName]" })
vault_activity({ tool: "vault_write", since: "2026-01-01" })Check what was done in previous sessions to maintain continuity.
Available Templates
Use these with vault_write({ template: "name", path: "...", frontmatter: { tags: [...] } }):
| Template | Use For |
project-index | Project overview (_index.md) |
adr | Architecture Decision Records |
devlog | Development logs |
permanent-note | Atomic evergreen knowledge notes |
research-note | Research findings and analysis |
troubleshooting-log | Bug investigations and fixes |
fleeting-note | Quick captures and temporary thoughts |
literature-note | Notes on articles, books, talks |
meeting-notes | Meeting records |
moc | Maps of Content (index/hub notes) |
daily-note | Daily notes |
task | Structured task notes with status, priority, due date |
note | Minimal generic notes |
Session End
Use the vault-pkm:pkm-session-end skill — it handles devlog updates, undocumented work capture, link audits, and index updates.
Project-Specific Notes
<!-- Customize the sections below for your project -->Tech Stack
Key Patterns
Important Constraints
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

