diff --git a/src/expand.ts b/src/expand.ts new file mode 100644 index 0000000..d4109fc --- /dev/null +++ b/src/expand.ts @@ -0,0 +1,8 @@ +import { readFileSync } from "node:fs"; +import { stripFrontmatter } from "@earendil-works/pi-coding-agent"; + +/** mirror agent-session `_expandSkillCommand` — SKILL.md body without YAML frontmatter (SPEC §5.3, §10). */ +export function readSkillBody(filePath: string): string { + const content = readFileSync(filePath, "utf-8"); + return stripFrontmatter(content).trim(); +}