Skip to content

fix(skills): make media-use frontmatter valid YAML so skills add works#1709

Merged
miguel-heygen merged 1 commit into
mainfrom
fix/media-use-frontmatter-yaml
Jun 25, 2026
Merged

fix(skills): make media-use frontmatter valid YAML so skills add works#1709
miguel-heygen merged 1 commit into
mainfrom
fix/media-use-frontmatter-yaml

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Problem

npx skills add heygen-com/hyperframes — the install command in the README — fails for everyone:

■  Nested mappings are not allowed in compact mappings at line 2, column 14:
   description: Agent Media OS — resolve any media need (BGM, SFX, image, icon) in…
└  Installation failed

skills/media-use/SKILL.md's description: is an unquoted YAML scalar containing a mid-value : (…handles the full cascade: project cache…). YAML 1.2 reads : as a nested mapping, so the parse throws. The skills CLI aborts the whole install when any single skill fails to parse — so this one file blocks installing all 19 skills for every user following the docs.

Confirmed with the same parser the CLI uses (yaml 2.x): only media-use breaks; the other 18 parse fine.

Fix

  • skills/media-use/SKILL.md — replace the offending : with . Keeps the plain-scalar style of the other 18 skills (the description already uses as a separator) and changes no meaning.
  • scripts/lint-skills.ts — add a frontmatter guard that flags unquoted top-level scalars containing : (the exact ambiguity) so this can't regress. No new dependency.

Verification

With yaml 2.9.0 against all 19 skills:

before after
parser failures 1 (media-use) 0
new guard flags 1 (media-use) 0

The guard flags the original bad content and passes the fixed content — no false positives across the repo.

🤖 Generated with Claude Code

The `media-use` SKILL.md `description:` was an unquoted YAML scalar containing
a mid-value `: ` (`...the full cascade: project cache...`). YAML 1.2 reads
that as a nested mapping and the parse fails with "Nested mappings are not
allowed in compact mappings". `skills add` aborts the entire install when any
one skill fails to parse, so this single file blocked installing all 19
skills for everyone following the README's `npx skills add heygen-com/hyperframes`.

- Replace the offending `: ` with ` — ` (keeps the plain-scalar style used by
  the other 18 skills; the description already uses `—` as a separator).
- Add a frontmatter guard to scripts/lint-skills.ts that flags unquoted
  top-level scalars containing `: ` — the exact ambiguity — so this can't
  regress. No new dependency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Fallow audit report

Found 2 findings.

Details
Severity Rule Location Description
minor fallow/high-crap-score scripts/lint-skills.ts:69 'lintFrontmatter' has CRAP score 42.0 (threshold: 30.0, cyclomatic 6)
minor fallow/high-crap-score scripts/lint-skills.ts:106 'lintFile' has CRAP score 30.0 (threshold: 30.0, cyclomatic 5)

Generated by fallow.

@miguel-heygen miguel-heygen merged commit 814c96c into main Jun 25, 2026
36 of 37 checks passed
@miguel-heygen miguel-heygen deleted the fix/media-use-frontmatter-yaml branch June 25, 2026 02:33
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