mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
skill-creator: lazy-load PyYAML in frontmatter parsing (#12080)
init-skill should work even without PyYAML
This commit is contained in:
committed by
GitHub
Unverified
parent
3293538e12
commit
e4456840f5
+3
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user