Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

NameGuard

toadfanstoadfans3 downloads

Strictly enforce vault-wide unique note names. Blocks new notes (and moves/renames) that would collide with an existing name, so shortest-format links are never silently rewritten.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates2

🛡️ NameGuard

Keep every note name unique — and stop Obsidian from silently rewriting your links.


The problem

With Settings → Files and links → New link format set to Shortest path when possible, Obsidian keeps your [[wikilinks]] short only while a note name is unique. The moment a second note with the same name appears anywhere in the vault, Obsidian rewrites your existing links to keep them pointing at the original file:

- [[Foobar]]
+ [[notes/Foobar]]

You never touched those notes — yet your links changed, your git diff is noisy, and a careless undo can leave links resolving to the wrong file.

The fix

NameGuard treats a note name as a vault-wide unique key. When an operation would introduce a duplicate name, NameGuard blocks it before the file is created — so the rewrite never happens.

🔑 Pre-existing duplicates are left untouched. NameGuard only guards new collisions.

Feature
🚫 Blocks duplicate creation — new notes, "create from link", and templates all run through one guard
🔀 Guards moves & renames — renaming a note into a name that's already taken is blocked too
🎯 Shortest-mode aware — only acts when it actually matters (configurable)
📝 Markdown-first — guards .md by default; opt in to every file type
🧩 Zero config — sensible defaults, with a settings tab when you want control
🔒 100% local — no network, no telemetry

How it works (in one breath)

Obsidian's MetadataCache.fileToLinktext falls back to a full path once a name stops being unique, and FileManager rewrites the affected links right after a create/rename. NameGuard wraps the vault's create / createBinary / rename and rejects the operation when the new name already resolves to an existing note — so the trigger never fires.

📖 Full write-up in docs/how-it-works.md.

Install

Manually

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Copy them into <your-vault>/.obsidian/plugins/name-guard/.
  3. Reload Obsidian, then enable NameGuard under Settings → Community plugins.

From source

bun install
bun run build      # bundles main.js

Settings

NameGuard works with its defaults. Settings → NameGuard exposes only file-type scope and release note preferences; see the settings reference for details.

Documentation

  • 📘 Getting started
  • 🔬 How it works
  • ⚙️ Settings reference
  • ❓ FAQ

License

MIT © toadfans

99%
HealthExcellent
ReviewPassed
About
Keep every note name unique and prevent Obsidian from silently rewriting wikilinks when a duplicate appears. Block new-note creation, create-from-link, templates, moves, and renames that would introduce name collisions (shortest-path-aware) so links stay stable and diffs stay clean. Run locally with no network or telemetry.
FilesLinks
Details
Current version
0.0.5
Last updated
Yesterday
Created
2 days ago
Updates
2 releases
Downloads
3
Compatible with
Obsidian 1.8.7+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
toadfanstoadfanstoadfans
GitHubtoadfans
  1. Community
  2. Plugins
  3. Files
  4. NameGuard

Related plugins

Advanced URI

Control everything with URI.

Note Refactor

Extract note content into new notes and split notes.

Find orphaned files and broken links

Find files that are not linked anywhere and would otherwise be lost in your vault. In other words: files with no backlinks.

Advanced Exclude

Enhances the Excluded files setting bringing gitignore syntax.

Custom Attachment Location

Customize attachment location with variables($filename, $data, etc) like Typora.

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

Recent Files

Display a list of recently opened files.

Smart Connections

Find related notes and excerpts while writing. Your link building copilot displays relevant content in graph + list view. A local embedding model powers semantic search. Zero setup. No API key.

Omnisearch

Intelligent search for your notes, PDFs, and OCR for images.

QuickAdd

Quickly add new notes or content to your vault.