skill-creator: lazy-load PyYAML in frontmatter parsing (#12080)

init-skill should work even without PyYAML
This commit is contained in:
xl-openai 2026-02-19 15:09:12 -08:00 committed by GitHub
parent 3293538e12
commit e4456840f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,8 +11,6 @@ import re
import sys
from pathlib import Path
import yaml
ACRONYMS = {
"GH",
"MCP",
@ -114,6 +112,9 @@ def read_frontmatter_name(skill_dir):
print("[ERROR] Invalid SKILL.md frontmatter format.")
return None
frontmatter_text = match.group(1)
import yaml
try:
frontmatter = yaml.safe_load(frontmatter_text)
except yaml.YAMLError as exc: