Skill: read and write SKILL.md as UTF-8
This commit is contained in:
parent
6af205a13a
commit
77959f2bc4
@ -287,7 +287,7 @@ def init_skill(skill_name, path, resources, include_examples):
|
|||||||
|
|
||||||
skill_md_path = skill_dir / "SKILL.md"
|
skill_md_path = skill_dir / "SKILL.md"
|
||||||
try:
|
try:
|
||||||
skill_md_path.write_text(skill_content)
|
skill_md_path.write_text(skill_content, encoding="utf-8")
|
||||||
print("[OK] Created SKILL.md")
|
print("[OK] Created SKILL.md")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"[ERROR] Error creating SKILL.md: {e}")
|
print(f"[ERROR] Error creating SKILL.md: {e}")
|
||||||
|
|||||||
@ -20,7 +20,7 @@ def validate_skill(skill_path):
|
|||||||
if not skill_md.exists():
|
if not skill_md.exists():
|
||||||
return False, "SKILL.md not found"
|
return False, "SKILL.md not found"
|
||||||
|
|
||||||
content = skill_md.read_text()
|
content = skill_md.read_text(encoding="utf-8")
|
||||||
if not content.startswith("---"):
|
if not content.startswith("---"):
|
||||||
return False, "No YAML frontmatter found"
|
return False, "No YAML frontmatter found"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user