/vault-pkm:pkm-writefrom vault-pkm
Creates new notes in a PKM vault with duplicate checking, template selection, and knowledge graph linking. Useful for structured vault writing.
Ships in vault-pkm. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Follow these steps when creating new notes. When running as a subagent, the delegation prompt provides the note topic.
Before creating, search for existing notes on the same topic:
vault_semantic_search({ query: "<topic/title of intended note>", limit: 5 })
If vault_semantic_search is unavailable (no VAULT_PKM_OPENAI_KEY) or returns an error (for example, a disabled index), use vault_search with the note's title and key terms, and vault_query with matching tags to check for duplicates.
Route based on results. Scores are on the compressed scale described in the vault_semantic_search tool description.
vault_read and confirm it's actually about the same topic before routing — a 0.5 score can be a real duplicate or a same-domain neighbor. If it IS the same topic: update the existing note instead of creating a new one — vault_append to add new content or vault_edit to refine existing content; vault_update_frontmatter if metadata changed. Skip to Step 4 (Discover Connections) after updating. If it's a same-domain neighbor (related but distinct topic), treat as a partial match.Use vault_write with the appropriate template. Select the template and path based on content type:
| Content | Location | Template |
|---|---|---|
| Architecture decision | <project>/development/decisions/ADR-NNN-<title>.md | adr |
| Research finding | <project>/research/<title>.md | research-note |
| Bug investigation | <project>/development/debug/<title>.md | troubleshooting-log |
| Design doc | <project>/development/designs/<title>.md | research-note |
| Implementation plan | <project>/development/plans/<title>.md | research-note |
| Task | <project>/tasks/<title>.md (no project: 00-Inbox/) | task |
| Meeting | <project>/planning/<title>.md | meeting-notes |
| Reusable knowledge | 03-Resources/Development/<title>.md | permanent-note |
| Literature | 03-Resources/<title>.md | literature-note |
Where <project> is the vault project path (e.g., 01-Projects/MyApp). Take it from the session context's ## PKM Project Context: <path> header; inside pkm-capture, from the capture context's Project: line. If there is none, ask the user (a subagent says so instead of guessing).
Notes in 03-Resources/ should be written as project-agnostic knowledge — useful regardless of where the insight originated. Use frontmatter tags or ## Related links to trace the origin project, but write the content for a general audience.
If CLAUDE.md specifies a different location for a content type, use that instead.
vault_write({
template: "<template>",
path: "<path-from-table>",
frontmatter: { tags: [...], ... }
})
Ensure:
{title} uses kebab-case (e.g., cache-eviction-strategies)vault_list on the decisions directory to determine the next NNN numbervault_write creates a skeleton from the template — headings with HTML comment placeholders and empty bullets. You must fill in the actual content.
vault_read to see the exact template outputvault_edit, using the exact text from the read output as old_stringFill the template with vault_edit, never vault_append: appended text lands below the placeholders, which then stay in the note.
Work section by section. Each vault_edit call must match text exactly as it appears in the file — do NOT guess what the template produced.
For templates with many sections, you can batch multiple sections into fewer edits by using a larger old_string that spans consecutive sections.
Don't forget the link sections. Templates include link sections like ## Related, ## Links, and ## References with their own placeholder block — an HTML comment plus an empty bullet. The exact comment text varies per template (e.g., <!-- Format: - [[note-name]] — relationship explanation --> in most templates, <!-- External references: docs, articles, repos --> in research-note's ## Links). Read the file first to get the exact placeholder text, then vault_edit to remove it. vault_add_links in Step 6 appends new links below whatever already exists in the section — it does not replace the placeholder, so leftover stubs end up sitting above the real links.
Run vault_suggest_links on the new note to find related content:
vault_suggest_links({ path: "<path-to-new-note>", limit: 8 })
Select the top 3–5 most relevant suggestions.
If vault_suggest_links is unavailable (no OPENAI_API_KEY) or returns an error (for example, a disabled index), use vault_search with key terms from the note's title/topic and vault_query with matching tags to manually identify good link targets.
If no suggestions are returned (new vault or isolated topic), skip Steps 5–7 — the note's ## Related section will be filled as the graph grows.
Well-linked-existing-note carve-out (UPDATE path only). If you arrived here via the Step 1 UPDATE branch and the existing note's ## Related already covers the connections you would otherwise add — i.e., the top suggestions from vault_suggest_links are already linked, or are clearly weaker than what's already there — skip Steps 5–7. Forcing additional links to a note that's already well-curated degrades link quality. This carve-out applies only to UPDATE; new notes always work through Steps 5–7.
For each selected link, write a one-line annotation explaining the relationship.
Good annotations use specific relationship language:
Bad: - [[note]] — related to this topic
Good: - [[architecture-patterns]] — foundational patterns this decision builds on
Use the note's content, shared tags, and conversation context to produce meaningful explanations.
Add annotated links to the note using vault_add_links:
vault_add_links({
path: "<path-to-new-note>",
links: [
{ target: "<vault-relative-path>", annotation: "relationship explanation" },
{ target: "<vault-relative-path>", annotation: "relationship explanation" }
]
})
The tool handles deduplication (skips already-linked targets), creates ## Related if missing, and validates targets exist. Format annotations as specific relationship language (see Step 5).
If the note uses a non-standard section (e.g., ## References), pass section: "## References".
If the template does not include a ## Related section, vault_add_links will create it automatically (default create_section: true). Templates with ## Related built in: adr, permanent-note, research-note, troubleshooting-log, literature-note, moc, meeting-notes.
Note: MOC notes created before this version may use ## Related Topics instead of ## Related. If vault_add_links fails with "Section not found", try section: "## Related Topics".
For significant note types (ADR, permanent-note, research-note, troubleshooting-log, literature-note, moc, meeting-notes):
## Related section using vault_add_linksSkip for ephemeral types (fleeting-note, daily-note) — Obsidian's native backlinks panel is sufficient.
_index.md under ## Architecture Decisions._index.md. Other notes are reached through search and the graph.Guidelines for edits, appends, and frontmatter updates. These don't require the full creation workflow above.
[[note#heading]] wikilinks pointing to itvault_suggest_links to discover new connections worth adding<project>/development/devlog/ (pkm-session-end Step 1). devlog.md is a hub that is never appended toheading param to insert in the right location rather than appending at EOFvault_update_frontmatter over vault_edit for YAML fields — it parses and re-serializes safelytype, created, tags) can be updated but not removedstatus must be pending/active/done/cancelled, priority must be low/normal/high/urgentWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (adrianv101/obsidian-pkm-plugin) — no native marketplace selected
npx claudepluginhub p/adrianv101-obsidian-pkm6 skills in this plugin
/add-taskUse when you want to quickly capture a new task in the vault from a title, with optional priority and due date./pkm-exploreUse when researching what the vault knows about a topic — performs graph + semantic exploration with gap analysis to map existing knowledge and find missing connections. Primarily used via the vault-explorer agent. Not for routine session-start context loading (hooks handle that)./pkm-session-endThe capture workflow the pkm-capture agent follows. To capture session work, dispatch the pkm-capture agent in the background; don't run this in the main conversation./tackle-taskUse when starting work on a specific vault task, when a task title or path is mentioned, or when coming from triage output./triage-tasksUse when you want to review and batch-update open vault task statuses for the current project or across all projects.Other plugins' skills for the same job