init-project

init-project is a command for coding agents from AdrianV101/obsidian-pkm-plugin. It costs 29 tokens per session (1,312 once invoked), scanned A, original, MIT.

A project setup command that connects a code repository to its matching project folder in an Obsidian vault. It also adds instructions to CLAUDE.md, a file that tells coding agents how to work with the project.

In plain words
What is it for?
Use it when starting Obsidian-based project knowledge management for a repository, creating a missing project folder, or adding the required project instructions.
Why use it?
It removes the manual work of finding the right vault folder and recording the connection for future sessions.

Command

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

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.

agentmods
npx agentmods add commands/adrianv101/obsidian-pkm-plugin/init-project
Clone the repo
git clone --depth 1 https://github.com/AdrianV101/obsidian-pkm-plugin

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 init-project

README.md
[![agentmods](https://agentmods.dev/badge/commands/adrianv101/obsidian-pkm-plugin/init-project.svg)](https://agentmods.dev/commands/adrianv101/obsidian-pkm-plugin/init-project)
Your own site
<a href="https://agentmods.dev/commands/adrianv101/obsidian-pkm-plugin/init-project"><img src="https://agentmods.dev/badge/commands/adrianv101/obsidian-pkm-plugin/init-project.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 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,312 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00029 $0.01312
Opus 5 $0.00015 $0.00656
Sonnet 5 $0.00006 $0.00262
Haiku 4.5 $0.00003 $0.00131

Measured 4d ago against content hash c6990ee36ccb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

init-project 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 4d 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.

commands/init-project.md · 112 lines

How it starts

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

Initialize Project for Obsidian PKM

You are configuring this code repository for Obsidian PKM integration. Walk the user through these steps.

Step 1: Detect Vault Project Path

Determine which vault project folder corresponds to this repository.

  1. Get the current working directory name (the repo folder name)
  2. Use vault_list to check if a matching folder exists in 01-Projects/:
    vault_list({ path: "01-Projects" })
    
  3. Look for a case-insensitive basename match between the CWD and the 01-Projects/ entries

If a match is found, proceed to Step 2 with the detected path.

If no match is found, ask the user:

"I couldn't find a matching project folder in your vault. What's the vault project path? (e.g., 01-Projects/MyApp)"

Step 2: Confirm with User

Present the detected (or provided) path and ask for confirmation:

"I found 01-Projects/<name>/ in your vault. Is this the right project for this repository?"

If the user corrects the path, use their provided path instead.

Step 3: Scaffold Vault Folder (if needed)

Use vault_list to check if the confirmed path exists in the vault.

If the folder doesn't exist, ask:

"The folder 01-Projects/<name>/ doesn't exist in your vault yet. Want me to create it with a project index?"

If yes:

  1. Create the project index:
    vault_write({
      template: "project-index",
      path: "01-Projects/<name>/_index.md",
      frontmatter: { tags: ["project"], status: "active" }
    })
    
  2. Subdirectories (development/decisions/, development/debug/, research/, tasks/, planning/) will be created automatically when notes are first written to them (vault_write has createDirs: true by default). Inform the user of this.

If no, proceed without scaffolding.

Step 4: Write CLAUDE.md

Read the existing CLAUDE.md in the current working directory (using the Read tool). If no CLAUDE.md exists, you will create one.

4a: Add/update # PKM: annotation

The annotation must be on its own line at the top of the file, before any other content:

Read the full file on GitHub · 112 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. 4d ago First seen · 112 lines · 29 tokens per session scan A c6990ee36ccb

Subscribe to this mod's changes

init-project is a command published in the GitHub repository AdrianV101/obsidian-pkm-plugin (13 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 1,312 once invoked, about $0.0001 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.