new skill meta

This commit is contained in:
John Lancaster
2026-06-18 22:22:30 -05:00
parent 9f34e12e08
commit 818de1b3f9
7 changed files with 192 additions and 4 deletions
+8 -3
View File
@@ -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)