Skip to main content
subagent

vault-optimizer — Claude Code subagent: Obsidian vault cleanup

A Claude subagent that tunes Obsidian vault performance: finds oversized files, sorts out attachments and speeds up search.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --agent obsidian-ops-team/vault-optimizer
Open on GitHub

What vault-optimizer does

vault-optimizer is a Claude subagent built for Obsidian vault performance. It watches load times and search response, flags markdown files over 1MB, breaks storage usage down by content type, and tells you what to do about it.

Five areas are covered: performance analysis, file size optimization, attachment handling, search indexing, and storage cleanup. The agent compresses images and PDFs, removes orphaned attachments, consolidates duplicates, archives old notes and templates. It runs find against the vault, so point it at the right path. The report includes a storage breakdown, the bottlenecks it found, and before/after metrics.

Back up first. The agent writes and moves files, and moving them is how note links break. It also carries target numbers: markdown capped at 1MB, JPEGs compressed to 85% quality, archiving for files older than 2 years. The age threshold is configurable; treat the rest as guidance rather than a hard rule. Its toolset is Read, Write, Bash, Glob, LS.

What it helps with

  • find markdown files over 1MB that slow the vault down
  • compress heavy images and PDFs without wrecking readability
  • clear out orphaned attachments and duplicate notes
  • sort attachments into folders instead of one dumping ground
  • compare metrics before and after optimization

Example prompts for the agent

  • analyze my Obsidian vault performance and show me what's slowing it down
  • find files over 1MB in the vault and suggest what to compress
  • clean up orphaned attachments, but back up first

How to install vault-optimizer

1claude-code-templates

npx claude-code-templates@latest --agent obsidian-ops-team/vault-optimizer

2Manually: put the files in place

.claude/agents/vault-optimizer.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about vault-optimizer

How do I install vault-optimizer in Claude?

Run npx claude-code-templates@latest --agent obsidian-ops-team/vault-optimizer, then check that the agent file sits at .claude/agents/vault-optimizer.md.

What does vault-optimizer do?

It keeps an Obsidian vault in shape: finds large files, compresses attachments, removes duplicates and junk, and looks at search indexing and startup time.

Which tools does the agent have?

It gets Read, Write, Bash, Glob and LS. File searches go through Bash, so the vault path has to be correct.

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

From the same set205

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor