Skip to content

fix: stop double-check skill being dropped by skills.sh installer#179

Merged
citypaul merged 1 commit into
mainfrom
fix/double-check-skill-frontmatter
Jun 28, 2026
Merged

fix: stop double-check skill being dropped by skills.sh installer#179
citypaul merged 1 commit into
mainfrom
fix/double-check-skill-frontmatter

Conversation

@citypaul

Copy link
Copy Markdown
Owner

Problem

Running the installer (./install-claude.shnpx skills add citypaul/.dotfiles -s '*') installed 27 of 28 skillsdouble-check silently never landed in ~/.agents/skills/, so it wasn't available to Claude Code, Codex, or any other agent.

Root cause

The skills.sh CLI parses each SKILL.md frontmatter with a strict YAML parser (yaml@2.x). The double-check description contained an inline ": ":

...security-sensitive work. Provider-agnostic: it always picks a verifier...

YAML reads colon-space inside an unquoted plain scalar as a nested mapping and throws:

Nested mappings are not allowed in compact mappings at line 2, column 14

The CLI's parseSkillMd swallows the error and returns null, so the skill is dropped with no warning — the installer just reports one fewer skill.

Fix

  • Replace the : with an em dash (Provider-agnostic — it always picks...), matching the em-dash style already used throughout the description. Verified the CLI now discovers 28 skills including double-check against the working tree.
  • Add test/skills-frontmatter.sh (wired into test/run.sh) to guard every skill's name:/description: frontmatter against this class of YAML hazard (unquoted ": " or " #"), so a skill can never again silently vanish at install time. Confirmed it fails when the bug is reintroduced and passes on the fix.

Verification

  • npx skills add <local repo> -s '*' --dry-runFound 28 skills (was 27), double-check copied.
  • ./test/run.sh → all tests pass.

🤖 Generated with Claude Code

The double-check skill's frontmatter description contained an inline
": " (in "Provider-agnostic: it always picks..."). The skills.sh CLI
(`npx skills add`) parses SKILL.md frontmatter with a strict YAML
parser, which reads colon-space inside an unquoted plain scalar as a
nested mapping and throws. parseSkillMd swallows the error and returns
null, so the installer silently found 27 of 28 skills and double-check
never landed in ~/.agents/skills/.

Replace the colon with an em dash (matching the description's existing
style) so the frontmatter parses. Add test/skills-frontmatter.sh to
guard every skill's frontmatter against this class of YAML hazard so a
skill can't silently vanish at install time again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@citypaul citypaul merged commit 17046cf into main Jun 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant