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

Note Schema

Brian SunterBrian Sunter16 downloads

Check note properties and tags against JSON Schema rules and find the notes that need attention.

Add to Obsidian
Note Schema screenshot
Note Schema screenshot
  • Overview
  • Scorecard
  • Updates6

Find notes with missing or inconsistent properties. For example, require a roast level on coffee notes, an author on book notes, or a status on projects. Put the rules in one JSON file and open a result to fix the note in place.

A field note beside the schema results showing which tasting notes need a property corrected

Validation runs locally and uses schemas stored in your vault.

For a vault scan, Note Schema lists Markdown files and checks the eligible notes against your rules. Rules are interpreted locally as JSON Schema Draft 7. The plugin does not fetch remote schemas or send your notes to a server.

Install

Requires Obsidian 1.13.0 or later.

Open Settings → Community plugins → Browse, search for Note Schema, then choose Install and Enable. View the directory listing.

For a manual installation:

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Place all three files in .obsidian/plugins/note-schema/ inside your vault.
  3. Reload Obsidian, open Settings → Community plugins, and enable Note Schema.

Quick start

  1. Enable the plugin.
  2. Run Note Schema: Create example schema file from the command palette. This writes a starter note-schema.json at the vault root and opens it.
  3. Edit the rules to fit your vault. Save the file — the plugin reloads automatically and re-validates.
  4. Open the Schema results view from the right sidebar (or run Note Schema: Open schema results).
  5. Fix issues in your notes; the sidebar updates as you edit.

Contents

  • Features
  • Install
  • Quick start
  • How a note is validated
  • The note data shape
  • Schema config format
  • Writing selectors
  • Writing schemas
  • Worked examples
  • Commands
  • Settings
  • Sidebar view
  • Status bar
  • Reloading and re-validation
  • Troubleshooting
  • Privacy
  • What's not validated yet
  • Development

Features

  • Generic JSON Schema (Draft 7) for both rule selection and validation.
  • One config file at the vault root (default note-schema.json) with any number of rules.
  • Sidebar view groups issues by note, with rule name, JSON path, and a readable error message. Click a row to jump to the file.
  • Optional status bar item shows the issue count or a config error indicator.
  • Automatic re-validation on metadata changes; full re-validation when the schema file changes.
  • Five stable commands for opening the schema file, opening results, and validating on demand.
  • No remote fetches, no network access, no telemetry.

The current-note view pinpoints a missing roast property on the open tasting note

How a note is validated

For each markdown note in the vault:

  1. The plugin builds a JSON object from the note's frontmatter, tags, and file metadata (see The note data shape).
  2. For each enabled rule, it runs the rule's selector schema against that object. If there is no selector, the rule applies to every note.
  3. If the selector matches, it runs the rule's schema against the same object. Each validation error becomes a validation issue in the sidebar.
  4. Notes whose path is the schema file itself are skipped.

A rule fires only when its selector matches. Notes that match no rule are silently fine — the plugin never demands that every note be covered.

The note data shape

Each note is converted into a JSON object before validation:

  • Frontmatter — every YAML key becomes a top-level property. Values keep their YAML-parsed types: strings, numbers, booleans, arrays, nested objects, and JS Date objects (Obsidian parses YAML dates eagerly, so a frontmatter date: 2024-05-01 arrives as a Date instance, not a string).
  • tags — frontmatter tag values and inline #tag references in the body are merged into a single normalized tags: string[]. Leading # is stripped, entries are trimmed, and duplicates are removed. If frontmatter has tags: foo (a single string), it is wrapped into ["foo"].
  • $file — a reserved object with { path, basename, extension }. Use this for folder-anchored or filename-anchored selectors. A user frontmatter key called $file is overwritten by file metadata.
  • Body content — not validated in this version.

Worked example. The note notes/blog/algorithms.md:

---
date: 2022-10-04
title: algorithms
tags: [algorithms, programming]
math: true
---

becomes the validation object:

{
  "date": "2022-10-04T00:00:00.000Z",         // JS Date instance
  "title": "algorithms",
  "tags": ["algorithms", "programming"],
  "math": true,
  "$file": {
    "path": "notes/blog/algorithms.md",
    "basename": "algorithms",
    "extension": "md"
  }
}

Because YAML dates arrive as Date objects (not strings), format: "date" won't match them. Either omit the type for date fields (presence-only check) or design around the type your YAML loader produces.

Schema config format

{
  "version": 1,
  "rules": [
    {
      "id": "project-notes",
      "name": "Project notes",
      "selector": {
        "type": "object",
        "properties": {
          "tags": { "type": "array", "contains": { "const": "project" } }
        },
        "required": ["tags"]
      },
      "schema": {
        "type": "object",
        "required": ["status", "owner"],
        "properties": {
          "status": { "type": "string", "enum": ["planned", "active", "blocked", "done"] },
          "owner":  { "type": "string", "minLength": 1 },
          "due":    { "type": "string", "format": "date" }
        }
      }
    }
  ]
}

Top-level fields:

Field Type Required Description
version integer yes Must be 1.
rules array yes List of rule objects.

Each rule:

Field Type Required Description
id string yes Stable identifier; appears in error messages and the sidebar.
name string yes Human-readable name shown in the sidebar header.
enabled boolean no Defaults to true. Set false to disable without deleting.
selector JSON Schema object no If omitted, the rule applies to every note. If present, the rule fires only when this schema matches the note data.
schema JSON Schema object yes The schema applied to matching notes.

Both selector and schema are full JSON Schemas — including (type, required, properties, enum, anyOf, allOf, oneOf, not, pattern, minimum, format, …) is allowed. The selector is just a schema used as a predicate.

Errors in the config (invalid JSON, missing id/name/schema, selectors that fail to compile) appear at the top of the sidebar under "Schema config errors" and as "Schemas: config error" in the status bar.

Writing selectors

A selector is a JSON Schema that decides whether a rule applies. Common patterns:

Match by tag

{
  "type": "object",
  "properties": {
    "tags": { "type": "array", "contains": { "const": "book" } }
  },
  "required": ["tags"]
}

The rule fires only when the note has a book tag (frontmatter or inline #book). Notes without any tags are not matched, so they are not validated by this rule. This is the recommended default for content-type rules: it is opt-in via a tag, never demands tags: on every note.

Match by tag, but skip templates

{
  "type": "object",
  "properties": {
    "tags": { "type": "array", "contains": { "const": "book" } }
  },
  "required": ["tags"],
  "not": {
    "properties": {
      "tags": { "type": "array", "contains": { "const": "template" } }
    }
  }
}

A not clause excludes template files that share the content tag.

Match by frontmatter property

{
  "type": "object",
  "properties": {
    "type": { "const": "meeting" }
  },
  "required": ["type"]
}

Useful when content type is encoded as a single frontmatter value rather than a tag.

Match multiple synonymous tags

{
  "type": "object",
  "properties": {
    "tags": {
      "type": "array",
      "anyOf": [
        { "contains": { "const": "show" } },
        { "contains": { "const": "tv-show" } }
      ]
    }
  },
  "required": ["tags"]
}

Match by folder

{
  "type": "object",
  "properties": {
    "$file": {
      "type": "object",
      "properties": { "path": { "type": "string", "pattern": "^notes/blog/" } },
      "required": ["path"]
    }
  },
  "required": ["$file"]
}

Tag-based selectors are usually preferable — they're opt-in and survive moves. Reach for folder-anchored selectors only when a folder path is structurally meaningful (for example, a static-site generator that defines content collections by directory).

Match every note

Omit the selector entirely. The rule's schema then runs against every note in the vault.

Writing schemas

Use Draft 7 keywords for validation. These examples cover common note types:

Required fields

{ "type": "object", "required": ["author", "pages"] }

A required failure surfaces as must have required property "author".

Optional fields that may be absent or null

YAML keys with no value parse as null, not undefined. To allow both:

{
  "year": { "anyOf": [{ "type": "null" }, { "type": "integer" }] }
}

If you write { "type": "integer" } and the frontmatter has year: with nothing after it, validation will fail because null is not an integer.

Strings or arrays

{
  "author": {
    "anyOf": [
      { "type": "string" },
      { "type": "array", "items": { "type": "string" } }
    ]
  }
}

Numeric ranges

{ "rating": { "type": "integer", "minimum": 0, "maximum": 10 } }

Enums

{ "status": { "type": "string", "enum": ["planned", "active", "blocked", "done"] } }

Dates

YAML dates arrive as JS Date objects, which are not strings. The simplest portable check is presence-only — list the field in required and don't constrain its type:

{ "type": "object", "required": ["date"] }

If you keep dates as quoted strings in frontmatter (date: "2024-05-01"), { "type": "string", "format": "date" } will work.

URIs

{ "github": { "type": "string", "format": "uri" } }

The local validator supports string formats, so format: "uri", format: "email", format: "date", format: "date-time", etc. all work — but only when the value is a string.

Don't lock down with additionalProperties: false

Notes accumulate ad-hoc fields (aliases, cssclass, plugin-specific keys). Forbidding extras tends to spam the sidebar. Validate the fields you care about and leave the rest alone.

Worked examples

Project notes, by tag

{
  "id": "project-note",
  "name": "Project notes",
  "selector": {
    "type": "object",
    "properties": {
      "tags": { "type": "array", "contains": { "const": "project" } }
    },
    "required": ["tags"]
  },
  "schema": {
    "type": "object",
    "required": ["date"],
    "properties": {
      "github":     { "anyOf": [{ "type": "null" }, { "type": "string", "format": "uri" }] },
      "projectUrl": { "anyOf": [{ "type": "null" }, { "type": "string", "format": "uri" }] },
      "status":     { "anyOf": [{ "type": "null" }, { "type": "string" }] },
      "visibility": { "anyOf": [{ "type": "null" }, { "type": "string" }] }
    }
  }
}

Book notes, with required page count

{
  "id": "book-note",
  "name": "Book notes",
  "selector": {
    "type": "object",
    "properties": {
      "tags": { "type": "array", "contains": { "const": "book" } }
    },
    "required": ["tags"],
    "not": {
      "properties": {
        "tags": { "type": "array", "contains": { "const": "template" } }
      }
    }
  },
  "schema": {
    "type": "object",
    "required": ["author", "pages"],
    "properties": {
      "author": {
        "anyOf": [
          { "type": "string" },
          { "type": "array", "items": { "type": "string" } }
        ]
      },
      "pages":  { "type": "integer", "minimum": 1 },
      "year":   { "anyOf": [{ "type": "null" }, { "type": "integer", "minimum": -3000, "maximum": 2100 }] },
      "rating": { "anyOf": [{ "type": "null" }, { "type": "integer", "minimum": 0, "maximum": 10 }] }
    }
  }
}

TV shows, accepting two synonymous tags

{
  "id": "show-note",
  "name": "Show notes",
  "selector": {
    "type": "object",
    "properties": {
      "tags": {
        "type": "array",
        "anyOf": [
          { "contains": { "const": "show" } },
          { "contains": { "const": "tv-show" } }
        ]
      }
    },
    "required": ["tags"]
  },
  "schema": {
    "type": "object",
    "properties": {
      "year":   { "anyOf": [{ "type": "null" }, { "type": "integer" }] },
      "rating": { "anyOf": [{ "type": "null" }, { "type": "integer", "minimum": 0, "maximum": 10 }] }
    }
  }
}

Astro blog posts, by folder

{
  "id": "astro-blog",
  "name": "Astro blog posts",
  "selector": {
    "type": "object",
    "properties": {
      "$file": {
        "type": "object",
        "properties": { "path": { "type": "string", "pattern": "^notes/blog/" } },
        "required": ["path"]
      }
    },
    "required": ["$file"]
  },
  "schema": {
    "type": "object",
    "required": ["date"],
    "properties": {
      "title": { "type": "string", "minLength": 1 },
      "tags":  {
        "anyOf": [
          { "type": "null" },
          { "type": "array", "items": { "type": "string" } }
        ]
      }
    }
  }
}

Commands

ID Description
note-schema:open-schema-results Open the schema results sidebar.
note-schema:validate-vault Reload config and validate every markdown note.
note-schema:open-schema-file Open the configured schema file.
note-schema:create-example-schema-file Create a starter note-schema.json if one does not exist.
note-schema:validate-current-note Validate just the active note.

Settings

  • Schema file path — vault path to the rules file (default note-schema.json). Changing this reloads the config and re-validates the vault.
  • Validate on startup — run a full vault validation when Obsidian opens.
  • Validate on metadata change — re-validate a note when its frontmatter or tags change. Disable on very large vaults if it feels too chatty.
  • Show status bar — display the issue count in the bottom status bar (desktop only).
  • Schema file — buttons to open or create the schema file from settings.
  • Validate now — reload the schema and re-validate every note.

Sidebar view

Select Vault to see how many notes have been checked. During a scan, the sidebar shows progress. Use Filter by note path to find a note by name or folder. For large result sets, Show more reveals the next group of notes.

Select Current note for the open note’s result and check time. The sidebar follows the note when you navigate or move it. It also shows when no rule matched, when metadata is pending, and when a note needs revalidation. Issues retained from a previous check are labeled.

Each result shows the note path, issue message, rule name, and affected property. Select a file header or issue to open the note. Validate vault refreshes the whole vault from either scope. The Validate current note command opens the results for that note.

If the schema file is missing, select Create example schema. The plugin creates any missing parent folders in the configured vault path. If the schema contains errors, the sidebar shows their locations and messages. Rules that compiled successfully can still produce results.

Status bar

On desktop, the status bar shows the vault issue count, pending checks, or a schema error. It also indicates when results need revalidation. Select the indicator to open the results view.

Reloading and re-validation

  • Schema file edits — saving the schema file triggers a debounced reload (~500 ms) and a full re-validation. You don't need to restart Obsidian.
  • Note frontmatter edits — when "Validate on metadata change" is on, a single note's edits trigger a debounced single-file re-validation (~300 ms).
  • Renames and deletes — handled automatically. If the schema file itself is renamed/deleted, the plugin re-runs config load against the configured path.
  • Manual — run Note Schema: Validate vault any time.

Troubleshooting

A rule isn't firing on a note I expect. The selector didn't match. Open the note, run Note Schema: Validate current note, and double-check the selector. Common causes:

  • Frontmatter tags is missing — a tag-based selector with required: ["tags"] won't fire. The plugin merges inline #tag into tags before validation, so inline tags do count.
  • The selector requires a tags array but the note's tag is written as a bare string. The plugin normalizes a single-string tags value into an array, but if your selector is hand-written for an exact shape, the normalization may matter.
  • Folder-pattern mismatch — ^notes/blog/ won't match a note in Notes/Blog/ (paths are case-sensitive).

Date validation fails even though the date is correct. Obsidian parses YAML dates as JS Date objects. A schema of { "type": "string", "format": "date" } fails because the value is not a string. Either keep the date as a quoted string (date: "2024-05-01") or make the field presence-only via required.

Optional integer/string fields trip on null. A YAML key with no value (year:) is null. Wrap optional typed fields with anyOf: [{ "type": "null" }, …].

The status bar shows "config error" but the sidebar is empty. Open the sidebar with Note Schema: Open schema results — config errors appear at the top of that view.

Big vaults feel slow on startup. Disable Validate on startup, then run Validate vault on demand. Per-note validation on metadata change is debounced and cheap; the startup full pass is the only heavyweight phase.

A rule's schema won't compile. Syntactic JSON Schema errors (unknown keyword, malformed type) surface as a config error with the offending rule's id. Fix and save the schema file; the plugin will reload.

Privacy

  • No network requests.
  • No telemetry.
  • No remote schemas — $ref to remote URLs is not supported and will fail to compile.
  • All validation runs locally inside Obsidian.

What's not validated yet

  • Note body content (Markdown text, links, embeds).
  • Auto-fixes for invalid frontmatter — issues are reported only.
  • Cross-note constraints (e.g. "every note linked from index.md must have a status").

Development

bun install
bun run dev               # watch + rebuild
bun run build             # type-check + production bundle
bun test                  # run unit tests
bun test --coverage       # with coverage summary
bun run lint

The bundle (main.js) is generated and is intentionally not committed. Releases include main.js, manifest.json, and styles.css.

Releases start in the 0.x range. The version-bump script refuses major-version bumps unless ALLOW_MAJOR_VERSION_BUMP=1 is set explicitly for a manually approved release.

Command-line vault linter

Lint notes without running Obsidian. The CLI reads the existing note-schema.json configuration and uses the plugin's current validation rules and note data model. It reads files only and skips hidden directories during a vault-wide scan.

bun scripts/vault-linter/cli.ts --vault /path/to/vault
bun scripts/vault-linter/cli.ts --vault /path/to/vault --format json --rule books --field pages
bun scripts/vault-linter/cli.ts --vault /path/to/vault --format csv "Books/My note.md"
node cli/note-schema-lint.mjs --vault /path/to/vault --schema /path/to/note-schema.json

The bundled .mjs runs on Node 18 or newer without installed dependencies; regenerate it with npm run build:cli. Alternatively, use npm run lint:notes -- --vault <dir> with Bun installed. Positional note paths may be vault-relative or absolute paths inside the vault. --rule filters to a rule ID, and --field filters issues by missing property or the final JSON path segment. --quiet suppresses clean text output; JSON and CSV remain machine-readable. Summary rulesApplied counts matching note/rule pairs; notesMatched counts notes matching at least one selected rule. Issue totals reflect the requested filters. CSV includes one row per reported issue. Exit status is 0 for no issues, 1 for issues, and 2 for usage, input, or configuration errors (reported on stderr). Inline tags in fenced and inline code are excluded.

License

0BSD

Third-party license texts are included in the bundled dependency notices.

Portions derived from the Obsidian plugin template are copyright (C) 2020–2025 by Dynalist Inc. and distributed under the same 0BSD license.

HealthExcellent
ReviewPassed
About
Find missing or inconsistent properties across your notes. Write JSON Schema rules that select notes by tag, folder, or property, then open a result to fix the note. Check the current note or scan the vault. Rules and validation stay on your device.
PropertiesJSONSidebar
Details
Current version
0.0.6
Last updated
8 hours ago
Created
7 months ago
Updates
6 releases
Downloads
16
Compatible with
Obsidian 1.13.0+
Platforms
Desktop, Mobile
License
0BSD
Report bugRequest featureReport plugin
Author
Brian SunterBrian Sunterbriansunter
GitHubbriansunter
  1. Community
  2. Plugins
  3. Properties
  4. Note Schema

Related plugins

Tags Overview

An extended tags panel where tagged files can be easily viewed, filtered, and accessed.

Metadata Hider

Hide specific metadata property or if its value is empty.

Notebook Navigator

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

Advanced Canvas

Supercharge your canvas experience. Create presentations, flowcharts and more.

Meta Bind

Make your notes interactive with inline input fields, metadata displays, and buttons.

Tag Wrangler

Rename, merge, toggle, and search tags from the tag pane.

Vertical Tabs

Offer an alternative view that displays open tabs vertically, allowing users to group and organize tabs for a better navigation experience.

Flexplorer

Enhance the file explorer with custom sorting, pinning, and hiding.

Force note view mode

Force the view mode for a note by using frontmatter: YAML block with 'obsidian_ui_mode' as key.

Longform

Helps you write and edit novels, screenplays, and other long projects.