agentsclimarketplace

Frontmatter guard

Skill Walliiee/agent-harness/skills/frontmatter-guard

Audit and carefully repair YAML frontmatter issues reported by gbrain. Use for frontmatter audit, brain lint, malformed YAML, missing delimiters, nested quotes, or gbrain doctor frontmatter warnings.From its SKILL.md

Install
npx -y skills add Walliiee/agent-harness --skill frontmatter-guard

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

5.1 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

Frontmatter Guard

Use this skill to inspect and repair Markdown/YAML frontmatter issues surfaced by gbrain doctor or gbrain frontmatter. It is conservative by default: audit first, classify second, and only mutate after the exact target set is clear.

Environment

Always target the real gbrain home:

GBRAIN_HOME=$HOME gbrain frontmatter ...

Do not run bare gbrain commands from Codex/OpenClaw synthetic HOME.

Default Flow

  1. Run the read-only audit:

    GBRAIN_HOME=$HOME gbrain frontmatter audit --json
    
  2. Summarize counts by source and error code. Do not paste raw JSON unless asked.

  3. Separate structural noise from real corruption:

    • MISSING_OPEN on normal root/reference Markdown can be acceptable.
    • EMPTY_FRONTMATTER, YAML_PARSE, NESTED_QUOTES, NULL_BYTES, and MISSING_CLOSE are stronger repair candidates.
  4. For one path or a small reviewed set, validate before fixing:

    GBRAIN_HOME=$HOME gbrain frontmatter validate <path> --json
    
  5. Preview fixes before writing:

    GBRAIN_HOME=$HOME gbrain frontmatter validate <path> --fix --dry-run
    
  6. Apply --fix only after the user has approved the target path/set, or when the requested task explicitly authorizes repair for those files.

Fix Policy

  • NULL_BYTES, MISSING_CLOSE, NESTED_QUOTES, SLUG_MISMATCH: usually mechanical; still preview first.
  • YAML_PARSE: inspect before fixing; causes vary.
  • MISSING_OPEN: do not auto-fix globally. Many Markdown files are intentionally plain documents, not gbrain entity pages.
  • EMPTY_FRONTMATTER: do not auto-fix without reading the file.

gbrain frontmatter validate --fix writes .bak files. Treat those backups as expected safety artifacts; do not delete them unless asked.

Canonical-shape check (OpenClaw-specific)

gbrain frontmatter validate only checks YAML structural integrity. It does NOT enforce OpenClaw's canonical wiki/* frontmatter shape.

Canonical shape: flat top-level, gbrain quartet first (type/title/tags — what gbrain extracts to dedicated columns per gbrain/src/core/markdown.ts:96-99), then Claude/QMD hooks (name/description), then dates/source. NO metadata: nesting.

Use bin/check-canonical-shape.py (sibling script) to enforce:

# Scan all OpenClaw wiki/* dirs across workspaces
${OPENCLAW_HOME}/skills/frontmatter-guard/bin/check-canonical-shape.py --wiki --summary

# Scan one path
${OPENCLAW_HOME}/skills/frontmatter-guard/bin/check-canonical-shape.py ${OPENCLAW_HOME}/workspace/wiki

# Machine-readable for cron / weekly check-invariants
${OPENCLAW_HOME}/skills/frontmatter-guard/bin/check-canonical-shape.py --wiki --json

Error codes emitted:

CodeMeaningFix
CANONICAL_MISSING_TYPENo top-level type: — gbrain can't extract to pages.typeAdd top-level type: matching the folder (e.g. wiki/people/type: person)
CANONICAL_MISSING_TITLENo top-level title: — gbrain falls back to humanized filenameAdd top-level title: matching the body H1
CANONICAL_METADATA_NESTINGmetadata: block contains type or title (legacy Option A shape)Promote nested fields to top-level, delete metadata: block
CANONICAL_SLUG_MISMATCHname: doesn't equal filename stemSet name: to the kebab-case filename (no .md)
CANONICAL_EXPLICIT_SLUGHas explicit slug: (creates SLUG_MISMATCH trap)Remove slug: — gbrain auto-derives via inferSlug(filePath)

Repair pattern for a single file: read it, identify which fields are nested or missing, rewrite the frontmatter block keeping body unchanged. The transform script at bin/canonicalize-wiki-frontmatter.py (sibling) is the reusable batch fixer — point its WIKI_ROOT at the target dir (default is workspace/wiki/), it walks all .md files and rewrites frontmatter to the canonical hybrid shape while preserving body content. Used 2026-06-11 to transform 99 main-workspace wiki files.

Scope Guidance

Prefer source-scoped or directory-scoped work:

GBRAIN_HOME=$HOME gbrain frontmatter audit --source learn --json
GBRAIN_HOME=$HOME gbrain frontmatter validate ${OPENCLAW_HOME}/workspace/wiki --json

Avoid full-workspace repair runs. The current workspace intentionally contains many plain Markdown control files.

Report Format

Frontmatter audit: <total> issue(s)
Top repair candidates: <codes/counts>
Likely acceptable/noise: <codes/counts>
Recommended next path: <path or source>
No files changed.

After a fix:

Fixed: <n> file(s)
Backups: <n> .bak file(s)
Verified: <command/result>
Remaining: <summary>

What ships with it: 2 files

13.3 KB alongside SKILL.md, 2 of them executable

Gives 0 of the 12 instructions most quality gates skills give in ~1.2k tokens

Counted across 1,195 of the 2,094 authors here whose files we hold, read 2026-08-07

  • Read the output and check the exit codein 54 of 1195, across 14 files
  • Verify requirements using a line-by-line checklistin 53 of 1195, across 12 files
  • Identify the verification command proving the claimin 51 of 1195, across 12 files
  • Run the full verification commandin 50 of 1195, across 11 files
  • Verify output confirms the claimin 49 of 1195, across 12 files
  • Check version control diff after agent delegationin 46 of 1195, across 6 files
  • State claim with evidencein 44 of 1195, across 4 files
  • Run the test suitein 33 of 1195, across 26 files
  • Keep state in memory by defaultin 27 of 1195, across 6 files
  • Make prototype runnable with one commandin 26 of 1195, across 5 files
  • Produce a verification reportin 25 of 1195, across 14 files
  • Detect the package manager from lockfilesin 24 of 1195, across 5 files

Said here and by no other author read

  • target the real gbrain home
  • summarize counts by source and error code
  • separate structural noise from real corruption
  • validate a path before fixing it
  • preview fixes before writing
  • apply fixes only after user approves the target set

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,834. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.