From e4456840f56813e9fbc400d5e6e668abeb125899 Mon Sep 17 00:00:00 2001 From: xl-openai Date: Thu, 19 Feb 2026 15:09:12 -0800 Subject: [PATCH] skill-creator: lazy-load PyYAML in frontmatter parsing (#12080) init-skill should work even without PyYAML --- .../samples/skill-creator/scripts/generate_openai_yaml.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/codex-rs/core/src/skills/assets/samples/skill-creator/scripts/generate_openai_yaml.py b/codex-rs/core/src/skills/assets/samples/skill-creator/scripts/generate_openai_yaml.py index 1a9d784f8..3fd740534 100644 --- a/codex-rs/core/src/skills/assets/samples/skill-creator/scripts/generate_openai_yaml.py +++ b/codex-rs/core/src/skills/assets/samples/skill-creator/scripts/generate_openai_yaml.py @@ -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: