obsidian-mind: Command for Claude Code

.claude/commands/om-tidy.md

om-tidy is a command for Claude Code from breferrari/obsidian-mind. It costs 45 tokens per session (1,475 once invoked), scanned A, original, MIT.

A maintenance command for an Obsidian-style work vault, a folder of linked notes. It archives completed work, groups related loose notes, splits oversized notes, reports old open tasks, and repairs links without deleting content or committing changes to Git.

In plain words
What is it for?
Use it during project wrap-up or whenever maintenance flags have accumulated in the vault.
Why use it?
It reduces note clutter and broken organization while leaving uncertain decisions for you to review.

Command for Claude Code

Written for Claude Code: SessionStart hook event.

This is breferrari/obsidian-mind's own configuration. It tells Claude Code how to work on obsidian-mind itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything obsidian-mind configures →

Part of the obsidian plugin — 8 skills, 20 commands, 10 agents, 5 hooks, 1 MCP server shipped together

About the project

Obsidian Mind is an Obsidian vault that stores notes, links, indexes, and other accumulated context so AI coding agents can retain memory across sessions. It is designed for Claude Code and also supports Codex CLI and Gemini CLI through shared hooks, commands, and vault data. Its catalogue add-ons package the vault’s commands, agents, skills, hooks, instructions, settings, plugin, and MCP integration.

breferrari/obsidian-mind · 4,615 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to breferrari/obsidian-mind. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/breferrari/obsidian-mind/main/.claude/commands/om-tidy.md
Clone the repo
git clone --depth 1 https://github.com/breferrari/obsidian-mind

Made for: Claude Code.

Or install obsidian, the plugin that ships this one along with the rest of its 8 skills, 20 commands, 10 agents, 5 hooks, 1 MCP server.

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 om-tidy

README.md
[![agentmods](https://agentmods.dev/badge/commands/breferrari/obsidian-mind/om-tidy/github.svg)](https://agentmods.dev/commands/breferrari/obsidian-mind/om-tidy)
Your own site
<a href="https://agentmods.dev/commands/breferrari/obsidian-mind/om-tidy"><img src="https://agentmods.dev/badge/commands/breferrari/obsidian-mind/om-tidy/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 om-tidy

Your own site · 80×15
<a href="https://agentmods.dev/commands/breferrari/obsidian-mind/om-tidy"><img src="https://agentmods.dev/badge/commands/breferrari/obsidian-mind/om-tidy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 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,475 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.00045 $0.01475
Opus 5 $0.00023 $0.00737
Sonnet 5 $0.00009 $0.00295
Haiku 4.5 $0.00005 $0.00147

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

Security

Grade A, and why

om-tidy 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 9d 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.

.claude/commands/om-tidy.md · 65 lines

How it starts

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

/om-tidy

The acting half of the hygiene system. The SessionStart/Stop hooks and the PostToolUse write-time flags DETECT drift; this command ACTS on it. Run on demand, at wrap-up when flags are present, or when the flag list has visibly piled up.

Hard rails (safe by construction)

  • Never delete. Reorganization is git mv + splits with verbatim content moves. Zero content loss.
  • Never commit. Git sync stays the user's call — leave the working tree for review.
  • Judgment calls get flagged, not executed. Anything ambiguous (does this cluster share real context? is this note's status actually done?) is listed for the user instead of acted on.

The mechanical tier (act on these)

Work through the current hygiene flags in order:

  1. Completed-not-archivedgit mv from work/active/ to work/archive/YYYY/; clusters keep their folder (mirror the grouping); update work/Index.md. Same semantics as /om-project-archive — use it for anything with ceremony.
  2. Ungrouped clusters — when the loose notes genuinely share context (judge, don't trust token overlap): create work/active/<Topic>/, git mv the members in.
  3. Oversized notes (25KB+) — SPLIT, never trim: move whole sections verbatim into domain notes, event-log satellites, or an archive note; leave a one-liner index behind in the original; retarget links that pointed at the moved sections. *Archive* names are exempt by design. A split is complete only when the new notes are wired into the graph — search each new note's concepts (QMD when available) and link what surfaces.
  4. Index drift, orphans, broken links — new notes must be linked from at least one note; fix wikilinks broken by any moves this pass made; update work/Index.md / org/People & Context.md / perf/Brag Doc.md as touched.
  5. Semantic-linking pass — for notes created or split this pass, qmd query their core concepts (index name from vault-manifest.json) and add the links the graph is missing.
  6. Memory-inbox promotion (memories/YYYY/MM/) — durable captures get copied into the right brain/ topic note. Promotion is ADDITIVE: copy, never move. recall reaches brain/ only through a capture, so deleting one removes the lesson from every repo that cannot read brain/ at all — which is the whole audience it was written for.

Read the full file on GitHub · 65 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. 9d ago First seen · 65 lines · 45 tokens per session scan A ffdae9a51d5a

Subscribe to this mod's changes

om-tidy is a command published in the GitHub repository breferrari/obsidian-mind (4,615 stars, last pushed 6d ago), licensed MIT. It adds 45 tokens to every session and 1,475 once invoked, about $0.0002 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.