new skill meta
This commit is contained in:
@@ -5,9 +5,8 @@ def _repo_root() -> Path:
|
||||
return Path(__file__).resolve().parents[3]
|
||||
|
||||
|
||||
def load_skill_document(*, skill_id: str, skill_slug: str) -> dict[str, str]:
|
||||
"""Load the canonical skill markdown document for an MCP skill."""
|
||||
document_path = _repo_root() / "docs" / "skills" / skill_slug / "SKILL.md"
|
||||
def load_markdown_document(*, skill_id: str, document_path: Path) -> dict[str, str]:
|
||||
"""Load an arbitrary Markdown document and expose it as a skill resource."""
|
||||
if not document_path.exists():
|
||||
raise FileNotFoundError(
|
||||
f"Missing skill document for '{skill_id}': {document_path}"
|
||||
@@ -20,3 +19,9 @@ def load_skill_document(*, skill_id: str, skill_slug: str) -> dict[str, str]:
|
||||
"source_path": str(document_path),
|
||||
"content": document_path.read_text(encoding="utf-8"),
|
||||
}
|
||||
|
||||
|
||||
def load_skill_document(*, skill_id: str, skill_slug: str) -> dict[str, str]:
|
||||
"""Load the canonical skill markdown document for an MCP skill."""
|
||||
document_path = _repo_root() / "docs" / "skills" / skill_slug / "SKILL.md"
|
||||
return load_markdown_document(skill_id=skill_id, document_path=document_path)
|
||||
|
||||
Reference in New Issue
Block a user