(relativePath: string)
| 27 | } |
| 28 | |
| 29 | async function pluginDescription(relativePath: string): Promise<string> { |
| 30 | const raw = await fs.readFile(path.join(import.meta.dir, "..", relativePath), "utf8") |
| 31 | const { data } = parseFrontmatter(raw, relativePath) |
| 32 | if (typeof data.description !== "string") { |
| 33 | throw new Error(`Missing description in ${relativePath}`) |
| 34 | } |
| 35 | return data.description |
| 36 | } |
| 37 | |
| 38 | function skillContent(name: string, description: string): string { |
| 39 | return `---\nname: ${name}\ndescription: ${JSON.stringify(description)}\n---\n\n# ${name}\n` |
no test coverage detected