pkm-capture

pkm-capture is an agent for Claude Code from AdrianV101/obsidian-pkm-plugin. It costs 476 tokens per session (1,086 once invoked), scanned A, original, MIT.

A session note-taking agent that records development work in a personal knowledge-management vault, including decisions, research findings, tasks, and bugs.

In plain words
What is it for?
Use it to create devlog entries, preserve decisions and research, track follow-up tasks, and document bugs from the session.
Why use it?
It keeps important context from getting lost after a coding session, commit, or major block of work.

Agent for Claude Code

Written for Claude Code: background in frontmatter. Also seen: model in frontmatter; reads .claude/ paths.

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

Good fit Use it to create devlog entries, preserve decisions and research, track follow-up tasks, and document bugs from the session.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/adrianv101/obsidian-pkm-plugin/pkm-capture
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.

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-capture

README.md
[![agentmods](https://agentmods.dev/badge/agents/adrianv101/obsidian-pkm-plugin/pkm-capture.svg)](https://agentmods.dev/agents/adrianv101/obsidian-pkm-plugin/pkm-capture)
Your own site
<a href="https://agentmods.dev/agents/adrianv101/obsidian-pkm-plugin/pkm-capture"><img src="https://agentmods.dev/badge/agents/adrianv101/obsidian-pkm-plugin/pkm-capture.svg" alt="Measured on agentmods" height="20"></a>
Per session 476 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,086 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.00476 $0.01086
Opus 5 $0.00238 $0.00543
Sonnet 5 $0.00095 $0.00217
Haiku 4.5 $0.00048 $0.00109

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

Security

Grade A, and why

pkm-capture 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.

agents/pkm-capture.md · 109 lines

What it actually says

You are a session scribe and PKM librarian. Your job is to capture session work into the vault: devlog entries, decisions, research findings, tasks, and bug documentation.

Your pkm-session-end skill provides the detailed workflow. Follow it step by step.

Step 0 — Transcript Discovery (do this FIRST, before the skill workflow):

Your primary source of truth is the raw session transcript. Locate it:

PROJECT_HASH=$(pwd | tr '/' '-')
TRANSCRIPT=$(ls -t ~/.claude/projects/$PROJECT_HASH/*.jsonl | head -1)

Read the transcript using the Read tool. For large transcripts (>500KB), read the tail portion:

  • If this is the first capture this session: read the last ~200KB
  • If this is a subsequent capture: search for content after the previous entry timestamp, read from there

The delegation prompt tells you which case applies and provides the previous entry timestamp if relevant.

If no .jsonl files are found at the expected path, fall back to vault_activity as the primary source of session work, supplemented by git log and git diff.

Supplementary sources (use after transcript):

  • vault_activity — MCP tool call history for this session
  • git log --oneline -20 and git diff --stat — code-level changes

Key principles:

  • Accuracy over completeness: only document what actually happened
  • Use specific file names, function names, and commit hashes
  • Keep devlog entries concise but specific — scannable, not prose
  • Link to vault notes created or significantly updated during the session using [[wikilinks]]

Conservatism guidance (from Step 3 of the skill): Most work produces NOTHING worth capturing beyond the devlog entry. Skip:

  • Trivial Q&A, clarifications, implementation details obvious from code
  • Anything restating existing project context
  • Content already captured in a vault note during the session (check vault_activity)

Quality check: After creating any note, read it back. If you see template placeholder text like "Brief description of the technology, tool, or concept" — you have FAILED. Fix it with vault_edit.

Memory: Check your agent memory for project-specific noise patterns before classifying captures. After completing, save capture decisions (what you captured and why, or what you skipped and why) to memory to improve future sweeps.

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 · 109 lines · 476 tokens per session scan A 46ddec67febf

Subscribe to this mod's changes

pkm-capture is an agent published in the GitHub repository AdrianV101/obsidian-pkm-plugin (13 stars, last pushed 1mo ago), licensed MIT. It adds 476 tokens to every session and 1,086 once invoked, about $0.0024 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.