Phase 4: add expandSkill — skill meta to injectable user text.
Compose readBody, formatBlock, and appendSuffix for reinject and /skill-reinject now (SPEC §5.3). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -27,3 +27,10 @@ export function appendSuffix(block: string, suffix: string | undefined): string
|
||||
}
|
||||
return `${block}\n\n${trimmed}`;
|
||||
}
|
||||
|
||||
/** Read SKILL.md and format full user message text for re-inject (SPEC §5.3). */
|
||||
export function expandSkill(meta: SkillBlockMeta, suffix?: string): string {
|
||||
const body = readSkillBody(meta.filePath);
|
||||
const block = formatBlock(meta, body);
|
||||
return appendSuffix(block, suffix);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user