obsidian-health

obsidian-health is a command for Claude Code from eugeniughelbur/obsidian-second-brain. It costs 22 tokens per session (2,085 once invoked), scanned A, original, MIT.

A health check for an Obsidian vault, which is a folder of notes managed by the Obsidian app. It groups detected contradictions, missing concepts, outdated claims, and structural problems by severity.

In plain words
What is it for?
Use it to scan a vault, review findings by category, and guide fixes for inconsistent, incomplete, stale, or poorly organised notes.
Why use it?
It helps find problems in a large note collection that are difficult to spot by hand. It can also reduce noise from folders such as backups or imported data.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the obsidian-second-brain plugin — 1 skill, 47 commands, 3 hooks shipped together

Good fit Use it to scan a vault, review findings by category, and guide fixes for inconsistent, incomplete, stale, or poorly organised notes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/eugeniughelbur/obsidian-second-brain/obsidian-health
About the project

obsidian-second-brain turns an Obsidian vault into persistent, searchable memory for Claude Code and other command-line coding agents, storing knowledge as linked Markdown notes. It is for developers, founders, writers, and researchers who want agents to retain project context across sessions. Its catalogue entries provide commands, hooks, a plugin, a skill, and instructions for capturing, finding, and maintaining that memory.

eugeniughelbur/obsidian-second-brain · 4,415 stars · on GitHub · eugeniughelbur.github.io

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/eugeniughelbur/obsidian-second-brain

Made for: Claude Code.

Or install obsidian-second-brain, the plugin that ships this one along with the rest of its 1 skill, 47 commands, 3 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 obsidian-health

README.md
[![agentmods](https://agentmods.dev/badge/commands/eugeniughelbur/obsidian-second-brain/obsidian-health/github.svg)](https://agentmods.dev/commands/eugeniughelbur/obsidian-second-brain/obsidian-health)
Your own site
<a href="https://agentmods.dev/commands/eugeniughelbur/obsidian-second-brain/obsidian-health"><img src="https://agentmods.dev/badge/commands/eugeniughelbur/obsidian-second-brain/obsidian-health/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for obsidian-health

Your own site · 80×15
<a href="https://agentmods.dev/commands/eugeniughelbur/obsidian-second-brain/obsidian-health"><img src="https://agentmods.dev/badge/commands/eugeniughelbur/obsidian-second-brain/obsidian-health.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,085 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.00022 $0.02085
Opus 5 $0.00011 $0.01043
Sonnet 5 $0.00004 $0.00417
Haiku 4.5 $0.00002 $0.00209

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

Security

Grade A, and why

obsidian-health 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 12d 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/obsidian-health.md · 42 lines

How it starts

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

Use the obsidian-second-brain skill. Execute /obsidian-health:

  1. Read _CLAUDE.md first to find the vault path
  2. Run the health scan from the skill root (its absolute path was given at session start as Skill root; substitute it for SKILL_ROOT): uv run --directory "SKILL_ROOT" scripts/vault_health.py --path ~/path/to/vault --json (replace vault path with the one from _CLAUDE.md)
    • Large or noisy vault? If the scan surfaces thousands of findings from directories the user does not maintain by hand (atomic-card pools, backup snapshots, imported dumps), do NOT hardcode fixes. Offer to write a <vault>/.vault-config.json that extends the exclude list: {"exclude-dirs": ["_card-pool"], "exclude-paths": ["Archive/Backup"]}. exclude-dirs matches directory names anywhere in the tree; exclude-paths matches vault-relative path prefixes. Both are additive - the built-in excludes always apply - and a missing or malformed file is ignored silently. Re-run the scan afterward.
  3. Parse the JSON output and split findings into categories
  4. Spawn parallel subagents to handle each category simultaneously:
    • Wanted-notes agent: the script reports wanted_note items - links to a note that does not exist yet. These are NOT errors: in a wiki-style vault you link a thing the moment you mention it, so wanted notes are a demand-ranked wishlist of pages worth writing, not breakage. Triage them with uv run --directory "SKILL_ROOT" scripts/triage_links.py --path <vault> --limit N, which sorts each into keep (a deliberate seed, leave it), create (referenced enough to deserve a real note now), or delete (junk or a typo - fix the link). Report-only by default; needs ANTHROPIC_API_KEY. Headless on purpose: it can run unattended or on a schedule. The goal is to triage the backlog, never to drive the count to zero.
    • Duplicates agent: confirm duplicates are truly the same concept, not just similar names
    • Taxonomy agent: only fires when <vault>/_meta/taxonomy.md exists (format in references/taxonomy-format.md) - the script's tag_synonym and tag_not_in_taxonomy findings are empty otherwise, so a vault without the file sees nothing. tag_synonym means a note's tag is a known synonym of a canonical tag: the fix is unambiguous, so offer to rewrite that note's tags: frontmatter to the canonical form, per note, with explicit confirmation before editing - never batch-rewrite across the vault unattended. tag_not_in_taxonomy means the tag matches neither a canonical tag nor a synonym: report it as informational only - it may be a legitimate new tag - and never auto-fix it; the taxonomy file is a human-curated vocabulary, not something this command edits on its own.
    • Frontmatter agent: identify notes missing required fields by type. If the script reports a code_fence_wrapped note (frontmatter trapped inside a leading ```markdown fence), the fix is to unwrap it - strip the opening fence line and the matching closing ``` so the inner --- frontmatter and body become real markdown. Never add a new frontmatter block to a wrapped note - that produces duplicate frontmatter and leaves the body trapped. If the note already has both a prepended frontmatter block and an inner wrapped one, merge them (keep the richer fields) and unwrap.
    • Staleness agent: check overdue tasks and unfilled template syntax
    • Orphans agent: check orphaned notes and empty folders
    • Contradictions agent: scan Key Decisions sections and reference/concept notes (the concept or knowledge folder per references/folder-map.md - wiki-style wiki/concepts/, Obsidian-style Knowledge/) for claims that conflict with each other or have been superseded by newer sources
    • Typed-edge lint agent: run uv run --directory "SKILL_ROOT" scripts/link_graph.py --path <vault> --lint, which validates the relations: typed-edge layer (see references/ai-first-rules.md Rule 6 § Typed edges). It returns findings (each with severity, kind, note, target, type, detail) and a summary. Map them into the severity groups below: contradiction (A and B claim the same asymmetric type about each other) is 🔴 Critical; unknown_type, dangling_target, and self_edge are 🟡 Warning (fix the type name, the target link, or drop the self-edge); missing_inverse is ⚪ Info (offer to add the reciprocal edge on the target note, never required). If the vault uses no relations: blocks yet, this returns zero findings - not an error.
    • Concept gaps agent: find terms mentioned 3+ times across different notes that lack a dedicated page - these are missing concepts the vault should have
    • Stale claims agent: compare reference/concept notes (the concept or knowledge folder per references/folder-map.md - wiki-style wiki/concepts/, Obsidian-style Knowledge/) against their source dates - flag any note older than 6 months that references fast-moving topics (tools, APIs, pricing, team structure)
    • Freshness agent: run the freshness lint - uv run --directory "SKILL_ROOT" scripts/freshness_lint.py --path <vault> --json - which enforces references/freshness-policy.md: every stored fact must be timeless, dated, or a pointer. FRESH-1 errors are present-tense claims about fast facts (counts, statuses, balances) with no as of stamp - the sentences that silently become lies. Report the top offenders grouped by folder; offer to fix by adding a stamp, converting to a pointer (where truth lives + last observed value), or moving the claim into a dated note. For aged stamps (FRESH-2 warnings) run the refresh loop from the policy: re-observe (check the source, update value + stamp), convert (keep only the pointer), or retire (move into a dated note as history). Never delete - restamp, convert, or mark superseded
  5. Merge results and group by severity:
    • 🔴 Critical: unfilled template syntax, contradictions between notes, typed-edge contradiction cycles, code-fence-wrapped notes (frontmatter trapped in a fence)
    • 🟡 Warning: duplicates, stale tasks, missing frontmatter, stale claims, concept gaps, freshness violations (undated fast facts, aged stamps), typed-edge problems (unknown type, dangling target, self-edge), tag-synonym findings (a tag that should fold to its canonical form per _meta/taxonomy.md), invalid tags (digits-only, dots, spaces - Obsidian renders these broken with no error; fix by prefixing a word or replacing the separator with -)
    • ⚪ Info: wanted notes (linked but unwritten - a wishlist, not errors), orphaned notes, empty folders, missing inverse edges, tags not in the taxonomy (informational, not necessarily wrong)
  6. For safe fixes (missing frontmatter, unwrapping code-fence-wrapped notes, obvious duplicates, creating pages for concept gaps), offer to fix automatically. For a code_fence_wrapped note, unwrap the fence rather than adding frontmatter (see the Frontmatter agent note above).
  7. For destructive fixes (archiving, merging, resolving contradictions), list them and ask for explicit confirmation first
  8. Append to the operation log: if Logs/ exists write **HH:MM** - health | X critical, Y warnings, Z info to Logs/YYYY-MM-DD.md; otherwise append ## [YYYY-MM-DD] health | X critical, Y warnings, Z info to log.md

Read the full file on GitHub · 42 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. 12d ago First seen · 42 lines · 22 tokens per session scan A b69f3e572a32

Subscribe to this mod's changes

obsidian-health is a command published in the GitHub repository eugeniughelbur/obsidian-second-brain (4,415 stars, last pushed 5d ago), licensed MIT. It adds 22 tokens to every session and 2,085 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.