( templatesRoot: string, templateFile: string, targetDir: string, tool: Tool, skillName: string, dryRun: boolean, )
| 116 | } |
| 117 | |
| 118 | async function copyTemplateSkill( |
| 119 | templatesRoot: string, |
| 120 | templateFile: string, |
| 121 | targetDir: string, |
| 122 | tool: Tool, |
| 123 | skillName: string, |
| 124 | dryRun: boolean, |
| 125 | ) { |
| 126 | const src = path.join(templatesRoot, templateFile); |
| 127 | const destByTool: Record<Tool, string> = { |
| 128 | grok: path.join(targetDir, '.grok', 'skills', skillName, 'SKILL.md'), |
| 129 | claude: path.join(targetDir, '.claude', 'skills', skillName, 'SKILL.md'), |
| 130 | codex: path.join(targetDir, '.codex', 'skills', skillName, 'SKILL.md'), |
| 131 | opencode: path.join(targetDir, 'skills', skillName, 'SKILL.md'), |
| 132 | }; |
| 133 | const dest = destByTool[tool]; |
| 134 | if (await exists(dest)) return; |
| 135 | await copyFile(src, dest, dryRun); |
| 136 | } |
| 137 | |
| 138 | async function copyTemplateVerifier( |
| 139 | templatesRoot: string, |
no test coverage detected