From forge-obsidian
Validate vault files against .mdschema files — structural checks on frontmatter, headings, and required sections. USE WHEN validate vault, check vault, vault lint, schema check, validate journals, validate memory.
npx claudepluginhub n4m3z/forge-obsidianThis skill uses the workspace's default tool permissions.
Validate vault markdown files against `.mdschema` schema files using the `mdschema` CLI. Reports structural violations: missing frontmatter fields, wrong field types, unexpected headings, missing required sections.
Validates Markdown vault frontmatter against Zod schema and wiki-link integrity. Hard gates session-end on errors; flags dangling links as warnings.
Runs 7-phase Obsidian vault audit: structural scan, duplicate detection, link integrity, frontmatter audit, MOC review, cross-agent checks, health report.
Runs vault health diagnostics in 8 categories including schema compliance, orphans, links, three-space boundaries, stale notes, MOC coherence. Quick/full/three-space modes yield FAIL/WARN/PASS reports with fixes.
Share bugs, ideas, or general feedback.
Validate vault markdown files against .mdschema schema files using the mdschema CLI. Reports structural violations: missing frontmatter fields, wrong field types, unexpected headings, missing required sections.
| Workflow | Trigger | Section |
|---|---|---|
| Check | "validate vault", "check journals", "validate memory" | Check |
| Report | "how bad is it", "vault health", "show violations" | Report |
Binary: mdschema (Go, installed via brew install jackchuka/tap/mdschema).
mdschema check "glob/pattern/**/*.md" --schema path/to/.mdschema
Output: per-file list of ✗ violations with line numbers, categories ([frontmatter], [structure]), and descriptions.
Schemas ship with their convention-owning module, not in the vault. The vault contains instances; modules contain the rules.
| Content | Schema Location | Vault Glob |
|---|---|---|
| Daily journals | $VAULT/Templates/Journals/.mdschema | $VAULT/Resources/Journals/Daily/**/*.md |
| Weekly journals | $VAULT/Templates/Journals/.mdschema | $VAULT/Resources/Journals/Weekly/**/*.md |
| Memory Insights | $MODULES/forge-reflect/skills/MemoryInsights/Templates/.mdschema | $VAULT/Orchestration/Memory/Insights/*.md |
| Memory Imperatives | $MODULES/forge-reflect/skills/MemoryInsights/Templates/.mdschema | $VAULT/Orchestration/Memory/Imperatives/*.md |
| Memory Ideas | $MODULES/forge-reflect/skills/MemoryInsights/Templates/.mdschema | $VAULT/Orchestration/Memory/Ideas/*.md |
Where $VAULT resolves from user.root in config.yaml (currently Vaults/Personal) relative to $HOME/Data, and $MODULES is Modules/.
Resolve the vault root from config.yaml:
FORGE_ROOT="$HOME/Data"
VAULT="$FORGE_ROOT/$(grep 'root:' "$FORGE_ROOT/config.yaml" | awk '{print $2}')"
MODULES="$FORGE_ROOT/Modules"
Verify mdschema is installed:
command -v mdschema >/dev/null || { echo "mdschema not installed — brew install jackchuka/tap/mdschema"; exit 1; }
Determine scope from user request. Default to journals if unspecified.
Run validation against the relevant schema:
# Daily journals
mdschema check "$VAULT/Resources/Journals/Daily/**/*.md" \
--schema "$VAULT/Templates/Journals/.mdschema"
# Weekly journals
mdschema check "$VAULT/Resources/Journals/Weekly/**/*.md" \
--schema "$VAULT/Templates/Journals/.mdschema"
# Memory (when requested)
mdschema check "$VAULT/Orchestration/Memory/Insights/*.md" \
--schema "$MODULES/forge-reflect/skills/MemoryInsights/Templates/.mdschema"
Present results to the user grouped by violation type.
Summarize validation results as a structured report:
Run the Check workflow, capturing full output.
Count violations by category:
Present summary table:
| Directory | Files | Passing | Failing | Top Violation |
|---------------|-------|---------|---------|-------------------------|
| Daily 2026/01 | 31 | 12 | 19 | missing "## Plan" |
| Daily 2026/02 | 27 | 25 | 2 | missing 'tlp' field |
| Weekly 2026 | 8 | 8 | 0 | — |
List the top 5 most common violations with counts.
Suggest remediation approach (batch fix vs manual).
mdschema is not installed — report the missing dependency..mdschema currently lives in the vault (Templates/Journals/). Future: migrate to forge-journals as source of truth.mdschema validates structure only — it cannot check semantic correctness (enum values, tag formats, date validity).