(dirPath: string, fallback: string)
| 34 | } |
| 35 | |
| 36 | function readSkillMarkdown(dirPath: string, fallback: string): string { |
| 37 | const skillMdPath = path.join(dirPath, "SKILL.md"); |
| 38 | if (fs.existsSync(skillMdPath)) { |
| 39 | return fs.readFileSync(skillMdPath, "utf8"); |
| 40 | } |
| 41 | return fallback; |
| 42 | } |
| 43 | |
| 44 | function readCompanionFiles(dirPath: string): Array<{ filename: string; content: string }> { |
| 45 | if (!fs.existsSync(dirPath)) return []; |
no test coverage detected