pkm-write

pkm-write is a skill for Claude Code from AdrianV101/obsidian-pkm-plugin. It costs 54 tokens per session (2,163 once invoked), scanned A, original, MIT.

A note-writing guide for an Obsidian vault, which is a folder of linked Markdown notes. It checks for related notes, finds links, adds annotations, and keeps indexes current when creating or changing notes.

In plain words
What is it for?
Use it when creating or editing project notes, checking whether a topic already exists, finding related notes, and updating note indexes.
Why use it?
It helps prevent duplicate notes and keeps a personal knowledge base connected and organized as it grows.

Skill for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: mentions CLAUDE.md; mentions subagents.

Part of the vault-pkm plugin — 6 skills, 2 commands, 3 agents, 2 hooks shipped together

Good fit Use it when creating or editing project notes, checking whether a topic already exists, finding related notes, and updating note indexes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/adrianv101/obsidian-pkm-plugin/pkm-write
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AdrianV101/obsidian-pkm-plugin --skill pkm-write
Clone the repo
git clone --depth 1 https://github.com/AdrianV101/obsidian-pkm-plugin

Made for: Claude Code.

Or install vault-pkm, the plugin that ships this one along with the rest of its 6 skills, 2 commands, 3 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pkm-write

README.md
[![agentmods](https://agentmods.dev/badge/skills/adrianv101/obsidian-pkm-plugin/pkm-write.svg)](https://agentmods.dev/skills/adrianv101/obsidian-pkm-plugin/pkm-write)
Your own site
<a href="https://agentmods.dev/skills/adrianv101/obsidian-pkm-plugin/pkm-write"><img src="https://agentmods.dev/badge/skills/adrianv101/obsidian-pkm-plugin/pkm-write.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,163 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.02163
Opus 5 $0.00027 $0.01081
Sonnet 5 $0.00011 $0.00433
Haiku 4.5 $0.00005 $0.00216

Measured 7d ago against content hash c6b4648bb13b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

pkm-write scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pkm-write/SKILL.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PKM Write — Vault Writing with Knowledge Graph Integration

Follow these steps when creating new notes. When running as a subagent, the delegation prompt provides the note topic and project context.

Step 1: Duplicate Check

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), 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. Note on score interpretation: vault_semantic_search uses text-embedding-3-large (3072-dim) cosine similarity, which compresses hard. Even a verbatim title/heading of an existing note typically scores around 0.55–0.65 against that note; scores above 0.7 are essentially never observed. Read the scores with that scale in mind.

  • Likely duplicate (top hit ≥ 0.5): Read the top hit with 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.
  • Partial matches (top hit < 0.5, or top hit ≥ 0.5 but verified as a neighbor): Mention as potentially related, proceed with creation at Step 2. Link to them in Step 6.
  • No matches at all: Proceed with creation at Step 2.

Step 2: Create the Note

Use vault_write with the appropriate template. Select the template and path based on content type:

Content Type Template Default Path
Architecture decision adr <project>/development/decisions/ADR-NNN-{title}.md
Research finding research-note <project>/research/{title}.md
Bug investigation troubleshooting-log <project>/development/debug/{title}.md
Reusable knowledge permanent-note 03-Resources/Development/{title}.md
Task task <project>/tasks/{title}.md
Meeting record meeting-notes <project>/planning/{title}.md
Literature/article notes literature-note 03-Resources/{title}.md

Read the full file on GitHub · 156 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 156 lines · 54 tokens per session scan A c6b4648bb13b

Subscribe to this mod's changes

pkm-write is a skill published in the GitHub repository AdrianV101/obsidian-pkm-plugin (13 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 2,163 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

design-mcp-server

Design the tool surface, resources, and service layer for a new MCP server. Use when starting a new server, planning a major feature expansion, or when the user describes a domain/API they want to expose via MCP. Produces a design doc at docs/design.md that drives implementation.

cyanheads/obsidian-mcp-server · 62 tokens

add-tool

Scaffold a new MCP tool definition. Use when the user asks to add a tool, create a new tool, or implement a new capability for the server.

cyanheads/obsidian-mcp-server · 35 tokens

api-linter

MCP definition linter rules reference. Use when bun run lint:mcp or bun run devcheck reports a lint error or warning (format-parity, schema-is-object, name-format, server-json-, etc.) and you need to understand the rule, its severity, and how to fix it. Every rule ID the linter emits has an entry in this doc.

cyanheads/obsidian-mcp-server · 86 tokens

api-context

Canonical reference for the unified Context object passed to every tool and resource handler in @cyanheads/mcp-ts-core. Covers the full interface, its RequestContext base, all sub-APIs (ctx.log, ctx.state, ctx.requestInput, ctx.inputs, ctx.enrich, ctx.content), and when to use each.

cyanheads/obsidian-mcp-server · 79 tokens

api-canvas

DataCanvas primitive reference — a Tier 3 SQL/analytical workspace for tabular MCP servers, backed by DuckDB. Use when registering tables from upstream APIs, running ad-hoc SQL across them, and exporting results. Covers the acquire → register → query → export flow, per-table TTL, the token-sharing pattern for…

cyanheads/obsidian-mcp-server · 85 tokens

api-errors

McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.

cyanheads/obsidian-mcp-server · 54 tokens