feat: support config skill registration (#9640)

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
This commit is contained in:
Spoon
2026-01-29 18:47:06 +01:00
committed by GitHub
parent 5a56e8172f
commit 45ec3105b1
4 changed files with 38 additions and 3 deletions

View File

@@ -62,12 +62,11 @@ export const SkillTool = Tool.define("skill", async (ctx) => {
always: [params.name],
metadata: {},
})
// Load and parse skill content
const parsed = await ConfigMarkdown.parse(skill.location)
const content = (await ConfigMarkdown.parse(skill.location)).content
const dir = path.dirname(skill.location)
// Format output similar to plugin pattern
const output = [`## Skill: ${skill.name}`, "", `**Base directory**: ${dir}`, "", parsed.content.trim()].join("\n")
const output = [`## Skill: ${skill.name}`, "", `**Base directory**: ${dir}`, "", content.trim()].join("\n")
return {
title: `Loaded skill: ${skill.name}`,