Define reusable traits and validate your note frontmatter against trait requirements.
Traitor helps you keep metadata consistent across your vault. You assign traits with Obsidian nested tags under a configurable prefix (default trait/…), and Traitor warns you when required properties are missing or have the wrong type.
- Reuse metadata rules across many notes (people, projects, books, etc.)
- Catch mistakes early with in-editor warning banners
- Keep your frontmatter clean and predictable
- Apply traits through a picker (updates the
tagsfield) or by adding nested tags yourself
- Adds a ribbon action and command to set traits on the current note
- Lets you create trait definition files from inside Obsidian
- Validates notes against trait-defined property rules
- Provides a Traitor trait problems side pane that lists validation issues across the vault (ribbon icon or command)
- Shows clear warnings when:
- a trait tag is present but has no definition file
- a required property is missing
- a property value has the wrong type
- a string value does not match a required regex pattern
- Open Settings → Community plugins
- Select Browse
- Search for Traitor
- Install and enable
- Download
manifest.json,main.js, andstyles.css(if present) from the latest release - Create this folder in your vault:
.obsidian/plugins/traitor/ - Copy the files into that folder
- Reload Obsidian
- Enable Traitor in Settings → Community plugins
- Run the command Traitor: Create trait definition file
- Name it (for example
person, ormedia/musicfor a nested trait file path) - Edit the generated file in your traits folder
- Open a note and run Traitor: Set traits on current note
- Select one or more traits and save (this adds nested tags such as
trait/personwith the default prefix) - Fill in required frontmatter fields until warnings disappear
- Definition files live in your configured traits folder (default:
_traits). The trait id is the path of the Markdown file without.md, using/for nesting._traits/person.md→ trait idperson_traits/media/music.md→ trait idmedia/music
- Notes use Obsidian nested tags whose first segment is your configured trait prefix (default:
trait). Examples with the default prefix:- Tag
trait/mediaapplies the trait defined bymedia.md. - Tag
trait/media/musicapplies bothmediaandmedia/music(every prefix segment), so parent and child definition files both apply.
- Tag
The trait picker writes minimal tags under the configured prefix (for example, with default prefix trait, if you only need media/music, it does not also add trait/media).
Trait definition files are Markdown notes in your traits folder. The filename (and folder path) defines the trait; frontmatter holds description and properties only:
---
description: Notes about people
properties:
status:
type: string
required: true
birthday:
type: date
required: false
email:
type: string
required: false
pattern: "^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$"
---Supported property types:
stringnumberbooleanarraydate(valid date string)
Use the tags property (and/or inline #tags) for traits. Other frontmatter holds the data Traitor validates:
---
tags:
- trait/person
status: active
birthday: 1993-07-16
email: hello@example.com
---- Set traits on current note
- Show trait problems
- Create trait definition file
- Traits folder: folder containing your trait definition files (default:
_traits) - Trait tag prefix: root tag segment used to identify traits (default:
trait) - Warn about missing trait definitions: toggle warnings when a trait tag has no matching definition file
When you change the trait tag prefix, Traitor asks whether you want to migrate existing trait tags across the vault.
- Minimum Obsidian version:
0.15.0 - Desktop and mobile supported