Re-quote SKILL.md frontmatter in-place so values are valid YAML.
(skill_dir: Path)
| 39 | |
| 40 | |
| 41 | def _normalize_skill_frontmatter(skill_dir: Path) -> None: |
| 42 | """Re-quote SKILL.md frontmatter in-place so values are valid YAML.""" |
| 43 | skill_file = skill_dir / SKILL_FILENAME |
| 44 | if not skill_file.exists(): |
| 45 | return |
| 46 | try: |
| 47 | raw = skill_file.read_text(encoding="utf-8") |
| 48 | normalized = normalize_frontmatter(raw) |
| 49 | if normalized != raw: |
| 50 | skill_file.write_text(normalized, encoding="utf-8") |
| 51 | except Exception as e: |
| 52 | logger.debug(f"frontmatter normalize skipped for {skill_dir.name}: {e}") |
| 53 | |
| 54 | |
| 55 | class PatchType(str, Enum): |
no test coverage detected