skill-creator: lazy-load PyYAML in frontmatter parsing (#12080)
init-skill should work even without PyYAML
This commit is contained in:
parent
3293538e12
commit
e4456840f5
1 changed files with 3 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue