MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / _read_description

Function _read_description

openkb/skill/evaluator.py:146–157  ·  view source on GitHub ↗

Extract the description: field from SKILL.md frontmatter.

(skill_dir: Path)

Source from the content-addressed store, hash-verified

144
145
146def _read_description(skill_dir: Path) -> str:
147 """Extract the description: field from SKILL.md frontmatter."""
148 skill_md = skill_dir / "SKILL.md"
149 text = skill_md.read_text(encoding="utf-8")
150 fm = extract_frontmatter(text)
151 if fm is None:
152 raise RuntimeError(f"{skill_md} has no YAML frontmatter.")
153 meta = yaml.safe_load(fm) or {}
154 desc = meta.get("description")
155 if not isinstance(desc, str) or not desc:
156 raise RuntimeError(f"{skill_md} has no description: field.")
157 return desc
158
159
160def _read_body(skill_dir: Path) -> str:

Calls 2

extract_frontmatterFunction · 0.90
getMethod · 0.45