INNER CODE UNIT · Python
end
ScrapeCreators/social-media-research-skills · scripts/validate-skills.py:25
end = m.start() + 3
raw = text[3:end]
try:
fm = yaml.safe_load(raw)
except Exception as exc:
errors.append(f"{rel}: invalid YAML: {exc}")
continue
if not isinstance(fm, dict):
errors.append(f"{rel}: frontmatter is not a mapping")
continue
for key in ["name", "description"]:
if not fm.get(key):
errors.append(f"{rel}: missing {key}")
if len(str(fm.get("description", ""))) > 1024:
errors.append(f"{rel}: description is longer than 1024 chars")
body = text[text.find("\n---", 3) + 5:].strip()
if not body:
errors.append(f"{rel}: empty body")