From db5caf0b5d8ef600fc420fa3f9085b25aeac7c72 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Tue, 14 Jul 2026 13:55:14 -0400 Subject: [PATCH] skill: fix unloadable SKILL.md frontmatter, and test it in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The description was an unquoted YAML scalar containing "trust layer: equivalence" — a colon-space inside a plain scalar makes YAML parse it as a nested mapping, so the frontmatter raised "mapping values are not allowed in this context" and the skill would not load at all. Quoted the scalar and replaced the colon with an em dash. The real defect is that CI asserted the preflight script's behavior but never checked that the skill it ships is loadable. Added a step that parses the frontmatter, requires name/description to be non-empty strings, and requires name to match the directory — so an unloadable skill fails the build instead of failing the user. Co-Authored-By: Claude Opus 4.8 --- .claude/skills/peltier/SKILL.md | 2 +- .github/workflows/ci.yml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.claude/skills/peltier/SKILL.md b/.claude/skills/peltier/SKILL.md index fa55131..24b9542 100644 --- a/.claude/skills/peltier/SKILL.md +++ b/.claude/skills/peltier/SKILL.md @@ -1,6 +1,6 @@ --- name: peltier -description: Prove a performance change is real — or refuse to claim it. Use when optimizing code for speed, verifying a claimed speedup ("is this actually faster?", "did my optimization work?"), checking for a performance regression ("did this PR make things slower?"), or comparing the performance of two implementations. Runs peltier's trust layer: equivalence gates, A/A environment calibration, interleaved A/B with bootstrap confidence intervals. Never reports a naked percentage and never claims a win that is not statistically significant. Do NOT use for correctness-only work. +description: "Prove a performance change is real — or refuse to claim it. Use when optimizing code for speed, verifying a claimed speedup ('is this actually faster?', 'did my optimization work?'), checking for a performance regression ('did this PR make things slower?'), or comparing the performance of two implementations. Runs peltier's trust layer — equivalence gates, A/A environment calibration, interleaved A/B with bootstrap confidence intervals. Never reports a naked percentage and never claims a win that is not statistically significant. Do NOT use for correctness-only work." --- # peltier — prove it, or claim nothing diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aec64d5..efc13a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,6 +105,23 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 + - name: SKILL.md frontmatter is loadable + run: | + python3 - <<'PY' + import sys, yaml, pathlib + p = pathlib.Path(".claude/skills/peltier/SKILL.md") + text = p.read_text(encoding="utf-8") + if not text.startswith("---\n"): + sys.exit("SKILL.md must open with a --- frontmatter block") + fm = yaml.safe_load(text.split("---", 2)[1]) # raises on malformed YAML + for key in ("name", "description"): + if not isinstance(fm.get(key), str) or not fm[key].strip(): + sys.exit(f"frontmatter '{key}' must be a non-empty string") + if fm["name"] != p.parent.name: + sys.exit(f"frontmatter name '{fm['name']}' != directory '{p.parent.name}'") + print(f"frontmatter OK: name={fm['name']}, description={len(fm['description'])} chars") + PY + - name: Preflight resolves inside a peltier checkout run: | sh .claude/skills/peltier/scripts/preflight.sh | tee /tmp/pf.txt