warpdotdev/warp · error · ValueError

SKILL.md missing frontmatter (no closing ---)

Error message

SKILL.md missing frontmatter (no closing ---)

What it means

Companion check to the opening delimiter in parse_skill_md(): after '---' on line 1, the parser scans for a second '---' line to close the frontmatter; if none exists before EOF it raises this ValueError. Without a closing delimiter there is no boundary between YAML metadata and the markdown body.

Source

Thrown at resources/bundled/skills/create-skill/scripts/utils.py:22



def parse_skill_md(skill_path: Path) -> tuple[str, str, str]:
    """Parse a SKILL.md file, returning (name, description, full_content)."""
    content = (skill_path / "SKILL.md").read_text()
    lines = content.split("\n")

    if lines[0].strip() != "---":
        raise ValueError("SKILL.md missing frontmatter (no opening ---)")

    end_idx = None
    for i, line in enumerate(lines[1:], start=1):
        if line.strip() == "---":
            end_idx = i
            break

    if end_idx is None:
        raise ValueError("SKILL.md missing frontmatter (no closing ---)")

    name = ""
    description = ""
    frontmatter_lines = lines[1:end_idx]
    i = 0
    while i < len(frontmatter_lines):
        line = frontmatter_lines[i]
        if line.startswith("name:"):
            name = line[len("name:"):].strip().strip('"').strip("'")
        elif line.startswith("description:"):
            value = line[len("description:"):].strip()
            # Handle YAML multiline indicators (>, |, >-, |-)
            if value in (">", "|", ">-", "|-"):
                continuation_lines: list[str] = []
                i += 1
                while i < len(frontmatter_lines) and (frontmatter_lines[i].startswith("  ") or frontmatter_lines[i].startswith("\t")):
                    continuation_lines.append(frontmatter_lines[i].strip())
                    i += 1

View on GitHub (pinned to e72fd7aacb)

Solutions

  1. Add a line containing exactly --- after the last frontmatter key
  2. Use exactly three dashes for both delimiters — ---- or '- - -' will not match
  3. Sanity-check with grep -n -- '---' SKILL.md and confirm a matching pair at the top of the file

Example fix

# before
---
name: my-skill
description: A very long description that never ends because the author
  forgot to close the frontmatter block

# Body starts here

# after
---
name: my-skill
description: A long description properly closed.
---

# Body starts here
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path

lines = (skill_path / 'SKILL.md').read_text().split('\n')
has_open = bool(lines) and lines[0].strip() == '---'
has_close = has_open and any(l.strip() == '---' for l in lines[1:])
if not (has_open and has_close):
    raise ValueError('frontmatter must be a --- delimited block at the top')

Try / catch

try:
    parse_skill_md(skill_path)
except ValueError as e:
    if 'closing' in str(e):
        # append the missing --- after the last frontmatter key, then retry
        ...
    raise

Prevention

When it happens

Trigger: Frontmatter that opens with --- but whose second delimiter is missing, spelled '----' (four dashes do not equal '---' after strip), or written as '...' or '***' separators; a truncated file cut off mid-frontmatter.

Common situations: Long descriptions where the author kept typing YAML and never closed the block; merges that dropped the closing line; templates using non-standard separators.

Related errors


AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16). Data as JSON: /api/errors/a274315b95a1418d. Report an issue: GitHub.