agentleFS
AdrianV101AdrianV101/obsidian-pkm-plugin/sample-project/CLAUDE.md

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…

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
  1. Very specific:

    All notes MUST include YAML frontmatter.

    line 47
  2. Distinctive:

    When a significant technical decision is made:

    line 62
  3. Very specific:

    Create an ADR using vault_write with the adr template:

    line 64
  4. Very specific:

    Update _index.md to link the new ADR:

    line 73
  5. Very specific:

    Use the vault-pkm:pkm-session-end skill at the end of each session — it handles devlog entries, link auditing, and capturing undocumented …

    line 85
  6. Very specific:

    Use the vault-pkm:pkm-write skill when creating any vault note — it handles duplicate checking, template selection, link discovery, and …

    line 89
  7. Distinctive:

    When debugging a complex issue, create a troubleshooting log:

    line 93
  8. Distinctive:

    Check what was done in previous sessions to maintain continuity.

    line 132
  9. Very specific:

    Use these with vault_write({ template: "name", path: "...", frontmatter: { tags: [...] } }):

    line 136
  10. Very specific:

    Use the vault-pkm:pkm-session-end skill — it handles devlog updates, undocumented work capture, link audits, and index updates.

    line 156

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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-pkm MCP server.

PKM Integration

  • Vault project path: 01-Projects/[YourProjectName]/
  • MCP Server: vault-pkm plugin

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 hints
  • vault-pkm:add-task — Fast task capture from a title, optional priority, and due date
  • vault-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:

AgentWhen to DelegateMode
vault-explorerBefore creating notes on a topic, when researching existing knowledgeForeground
pkm-captureAfter git commits (automatic via hook), after significant work blocks, before session endsBackground
link-auditorAfter creating/modifying multiple vault notes, periodic health checksBackground

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:

  1. Create an ADR using vault_write with the adr template:
    vault_write({
      template: "adr",
      path: "01-Projects/[YourProjectName]/development/decisions/ADR-{NNN}-{kebab-title}.md",
      frontmatter: { tags: ["decision", "relevant-topic"], deciders: "Team" }
    })
  2. Fill in Context, Decision, Options Considered, and Consequences sections
  3. Update _index.md to 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: [...] } }):

TemplateUse For
project-indexProject overview (_index.md)
adrArchitecture Decision Records
devlogDevelopment logs
permanent-noteAtomic evergreen knowledge notes
research-noteResearch findings and analysis
troubleshooting-logBug investigations and fixes
fleeting-noteQuick captures and temporary thoughts
literature-noteNotes on articles, books, talks
meeting-notesMeeting records
mocMaps of Content (index/hub notes)
daily-noteDaily notes
taskStructured task notes with status, priority, due date
noteMinimal 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.