Phase 4: add readSkillBody — SKILL.md read with frontmatter strip.
Mirror agent-session _expandSkillCommand body extraction via public stripFrontmatter API (SPEC §5.3, §10). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user