Install any skill in seconds. Free to start, no credit card required.
Get Started Free →hashgraph-online/frontmatter-guard
Injects the canonical vault frontmatter schema snippet into agent prompts before any vault-write task, preventing malformed YAML frontmatter in Obsidian notes. <example>Context: wave-executor is about to dispatch a vault-mirror agent that writes learning notes under ~/Projects/vault/40-learnings/. user: "dispatch vault-write agent" assistant: "Injecting frontmatter-guard snippet into agent prompt (vault scope detected). Required fields: id, type, created, updated. Enum type: note|daily|project|p
Passed 18 of 20 test cases with the skill, and 4 of 20 without it.
and 18 more in the full report
16 fixed4 passed either way2 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 15 test cases the skill fixed. Same model, same prompt, with and without the skill.
After updating the schema, the guard script computes a new hash to indicate the snippet is stale. How many characters long is this computed hash?
| Checked | Without skill | With skill |
|---|---|---|
| Specifies the hash is 8 characters long | Missed | Passed |
The instructions your model reads when the skill loads.
Project-instruction file resolution:
CLAUDE.mdandAGENTS.md(Codex CLI) are transparent aliases — see skills/_shared/instruction-file-resolution.md. Wherever this skill mentionsCLAUDE.md, the alias rule applies.
vault-mirror and other vault-write agents frequently produce notes with missing or malformed YAML frontmatter — incorrect type enum values, missing id, wrong date formats. The resulting notes fail the vault-sync validator at session-end, causing hard-gate failures that interrupt the close flow.
This skill solves the problem at the source: it injects the canonical vault frontmatter schema as a Markdown snippet into agent prompts before any vault-write task is dispatched. Agents that receive the snippet produce conformant frontmatter on the first attempt, eliminating the validator feedback loop.
Trigger this skill whenever the task being dispatched has vault-write scope. Use the detectVaultTaskScope() heuristic from scripts/lib/frontmatter-guard.mjs to decide programmatically:
import { readVaultSchema, generateFrontmatterSnippet, detectVaultTaskScope } from './scripts/lib/frontmatter-guard.mjs';
const isVaultTask = detectVaultTaskScope(taskDescription, fileScope);
if (isVaultTask) {
const schema = readVaultSchema();
if (schema) {
const snippet = generateFrontmatterSnippet(schema);
// prepend snippet to agent system prompt
}
}
The heuristic fires when any of the following is true:
fileScope contains /Projects/vault/ in its path.fileScope is under a known vault subdirectory: 40-learnings/, 50-sessions/, 03-daily/, 01-projects/.taskDescription mentions vault or vault-mirror AND contains a write-intent keyword (write, create, generate, emit, mirror, update, add, insert).readVaultSchema() returns null when the schema source is missing — the caller must handle this gracefully (skip injection rather than throw).
The canonical call site is the wave-executor pre-dispatch hook. Before spawning an agent whose fileScope matches the heuristic, the coordinator calls:
test cases passed, vs 4 / 20 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.