Brian Sunter16 downloadsCheck note properties and tags against JSON Schema rules and find the notes that need attention.
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.

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.
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:
main.js, manifest.json, and styles.css from the latest release..obsidian/plugins/note-schema/ inside your vault.note-schema.json at the vault root and opens it.note-schema.json) with any number of rules.
For each markdown note in the vault:
selector schema against that object. If there is no selector, the rule applies to every note.schema against the same object. Each validation error becomes a validation issue in the sidebar.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.
Each note is converted into a JSON object before validation:
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.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
Dateobjects (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.
{
"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.
A selector is a JSON Schema that decides whether a rule applies. Common patterns:
{
"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.
{
"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.
{
"type": "object",
"properties": {
"type": { "const": "meeting" }
},
"required": ["type"]
}
Useful when content type is encoded as a single frontmatter value rather than a tag.
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"anyOf": [
{ "contains": { "const": "show" } },
{ "contains": { "const": "tv-show" } }
]
}
},
"required": ["tags"]
}
{
"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).
Omit the selector entirely. The rule's schema then runs against every note in the vault.
Use Draft 7 keywords for validation. These examples cover common note types:
{ "type": "object", "required": ["author", "pages"] }
A required failure surfaces as must have required property "author".
nullYAML 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.
{
"author": {
"anyOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
]
}
}
{ "rating": { "type": "integer", "minimum": 0, "maximum": 10 } }
{ "status": { "type": "string", "enum": ["planned", "active", "blocked", "done"] } }
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.
{ "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.
additionalProperties: falseNotes 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.
{
"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" }] }
}
}
}
{
"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 }] }
}
}
}
{
"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 }] }
}
}
}
{
"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" } }
]
}
}
}
}
| 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. |
note-schema.json). Changing this reloads the config and re-validates the vault.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.
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.
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:
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.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.^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.
$ref to remote URLs is not supported and will fail to compile.index.md must have a status").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.
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.
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.