{"record":{"id":"60c6be78fcf093d9","repo":"CherryHQ/cherry-studio","slug":"skill-md-missing-frontmatter-no-opening","errorCode":null,"errorMessage":"SKILL.md missing frontmatter (no opening ---)","messagePattern":"SKILL\\.md missing frontmatter \\(no opening ---\\)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"resources/skills/skill-creator/scripts/utils.py","lineNumber":13,"sourceCode":"\"\"\"Shared utilities for skill-creator scripts.\"\"\"\n\nfrom pathlib import Path\n\n\n\ndef parse_skill_md(skill_path: Path) -> tuple[str, str, str]:\n    \"\"\"Parse a SKILL.md file, returning (name, description, full_content).\"\"\"\n    content = (skill_path / \"SKILL.md\").read_text()\n    lines = content.split(\"\\n\")\n\n    if lines[0].strip() != \"---\":\n        raise ValueError(\"SKILL.md missing frontmatter (no opening ---)\")\n\n    end_idx = None\n    for i, line in enumerate(lines[1:], start=1):\n        if line.strip() == \"---\":\n            end_idx = i\n            break\n\n    if end_idx is None:\n        raise ValueError(\"SKILL.md missing frontmatter (no closing ---)\")\n\n    name = \"\"\n    description = \"\"\n    frontmatter_lines = lines[1:end_idx]\n    i = 0\n    while i < len(frontmatter_lines):\n        line = frontmatter_lines[i]\n        if line.startswith(\"name:\"):\n            name = line[len(\"name:\"):].strip().strip('\"').strip(\"'\")","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/CherryHQ/cherry-studio/blob/726446b54cd69ffe51a276638672f6d95ca0768c/resources/skills/skill-creator/scripts/utils.py#L1-L31","documentation":"Error \"SKILL.md missing frontmatter (no opening ---)\" thrown in CherryHQ/cherry-studio.","triggerScenarios":"parse_skill_md reads a SKILL.md whose first line is not the opening '---' frontmatter delimiter.","commonSituations":"Raised when a skill directory's SKILL.md lacks YAML frontmatter entirely — e.g. a hand-written file that starts directly with content, or the wrong file path was passed. Fix by adding the leading '---' frontmatter block with name/description.","solutions":["Add a YAML frontmatter block starting with --- on the first line of SKILL.md.","Use the skill template which includes the required frontmatter with name and description fields."],"exampleFix":"Start SKILL.md with:\n---\nname: my-skill\ndescription: ...\n---","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"726446b54cd69ffe51a276638672f6d95ca0768c","analyzedAt":"2026-08-12T17:30:37.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}