setup

A setup command that turns a folder into an Obsidian knowledge vault, or fits the folder into an existing vault. Obsidian is a note-taking app that stores linked notes as files.

In plain words
What is it for?
Use it when starting a knowledge project, adopting an existing Obsidian folder, or continuing work in a vault that has already been set up.
Why use it?
It avoids rebuilding or overwriting a vault that is already there. It checks the folder first and fills only what is missing.

Command

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/michael-ovo/obsidian-knowledge-agent/setup
Clone the repo
git clone --depth 1 https://github.com/Michael-OvO/obsidian-knowledge-agent
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 672 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.00019 $0.00672
Opus 5 $0.00010 $0.00336
Sonnet 5 $0.00004 $0.00134
Haiku 4.5 $0.00002 $0.00067

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

Security

Grade A, and why

setup 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 2d 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.

plugins/obsidian-knowledge/commands/setup.md · 48 lines

How it starts

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

Set up the current folder as an Obsidian Knowledge Agent vault. Detect first, then do the least surprising thing. Always idempotent — never clobber anything that exists.

Step 0 — Detect the folder and tell me which mode you're in:

  • Already a vault.agents/learned/ exists → RESUME (don't re-scaffold).
  • An existing Obsidian vault — has notes / an .obsidian/ folder, but no .agents/learned/ADOPT (fit what's there, fill only the gaps).
  • Empty / new folder — no notes, no vault structure → SCAFFOLD (build a starter).

Then run the matching mode:

RESUME — it's already set up

Don't re-create anything. Report status in a couple of lines — the branches, how many items are in Inbox/, the last journal.md entry — and route me to work: "Inbox has 3 items — want me to :ingest? Or tell me what to capture." Stop there.

ADOPT — an existing vault (the adaptive path)

  1. Read, don't impose. Map the existing top-level folders, naming style, and the frontmatter on a few notes. Treat that as the vault's conventions — do not add new branch folders or rename anything.
  2. Fill only the gaps. Create .agents/learned/ (journal.md, conventions.md, examples.md, a skills/ folder) only if missing; add Inbox/ and a Dashboard.md map-of-content that links the existing branches. Never overwrite existing files.
  3. Seed conventions for review. Write what you detected (naming, frontmatter, folder shape) into .agents/learned/conventions.md as a proposed starting point, and show me the diff before committing it.
  4. Commit the additions, then point me at /obsidian-knowledge:help.

SCAFFOLD — an empty folder

  1. Branches. Create top-level branch folders — from $ARGUMENTS if given, otherwise propose a small default (a shared References/ plus one or two domains) and confirm with me before creating. Give each branch an _index.md.
  2. Learning state. Create .agents/learned/ with journal.md, conventions.md, examples.md, and a skills/ folder — seed empty starters.
  3. Inbox + dashboard. Create Inbox/ and a Dashboard.md map-of-content that links the branches and explains the workflow in a line or two.
  4. Commit the scaffold, then point me at /obsidian-knowledge:help and suggest dropping a first source into Inbox/.

Read the full file on GitHub · 48 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. 2d ago First seen · 48 lines · 19 tokens per session scan A e7c581dfbb31

Subscribe to this mod's changes

setup is a command published in the GitHub repository Michael-OvO/obsidian-knowledge-agent (207 stars, last pushed 2mo ago), licensed MIT. It adds 19 tokens to every session and 672 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.