agentleFS
mphaxisemphaxise/gstack-port-for-codex/skills/frontmatter-guard/SKILL.md

frontmatter-guard

Skill4 starsChanged 4 months agoMITView on GitHub

Audit and repair local brain page frontmatter before malformed pages break search, ingest, or future sync.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user asks to validate frontmatter, fix frontmatter, run a brain lint, or check local brain page structure.

    line 8
  2. Very specific:

    run python3 scripts/brain_doctor.py if available

    line 14
  3. Very specific:

    if the upstream gbrain CLI exists, prefer read-only gbrain frontmatter audit --json

    line 15
  4. Distinctive:

    Do not auto-fix user-authored pages without a before/after plan.

    line 39
  5. Distinctive:

    Do not remove citations while normalizing frontmatter.

    line 40
  6. Very specific:

    Do not treat citation repair as the same job.

    line 41
  7. Distinctive:

    Never install a pre-commit hook without explicit user authorization.

    line 42

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Frontmatter Guard

Use this skill when the user asks to validate frontmatter, fix frontmatter, run a brain lint, or check local brain page structure.

Workflow

  1. Start read-only:
    • inspect representative brain pages
    • run python3 scripts/brain_doctor.py if available
    • if the upstream gbrain CLI exists, prefer read-only gbrain frontmatter audit --json
  2. Classify issues:
    • missing opening or closing ---
    • YAML parse errors
    • empty frontmatter
    • slug/path mismatch
    • null bytes or non-text content in markdown files
    • missing citation or source fields when local conventions require them
  3. For mechanical fixes, show the intended file list before writing.
  4. For ambiguous fixes, ask for the intended title, type, or source instead of guessing.
  5. Re-run the audit after fixes.

Validation Classes

  • file framing: opening and closing delimiters, UTF-8 text, and no null bytes
  • YAML syntax: valid mappings, arrays, quoted scalars, and parseable dates
  • schema: required fields, supported page type, and expected value shapes
  • identity: slug, title, and path agreement
  • provenance: source and citation fields required by the local page convention

Support four explicit modes: whole-corpus audit, single-path validation, scoped mechanical repair, and optional pre-commit validation. Quote scalar values when they contain YAML-significant punctuation, and prefer real YAML arrays over comma-packed strings.

Guardrails

  • Do not auto-fix user-authored pages without a before/after plan.
  • Do not remove citations while normalizing frontmatter.
  • Do not treat citation repair as the same job; use citation-fixer for citation semantics.
  • Never install a pre-commit hook without explicit user authorization.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.