* Gets the default skills directories to search. * Searches both .claude/skills and .agents/skills for Claude Code compatibility. * * Order (later overrides earlier): * - ~/.claude/skills/ (global Claude-compatible) * - ~/.agents/skills/ (global Codebuff) * - {cwd}/.claude/skills/ (project Cl
(cwd: string)
| 167 | * - {cwd}/.agents/skills/ (project Codebuff) |
| 168 | */ |
| 169 | function getDefaultSkillsDirs(cwd: string): string[] { |
| 170 | const home = os.homedir() |
| 171 | return [ |
| 172 | // Global directories (Claude-compatible first, then Codebuff) |
| 173 | path.join(home, '.claude', SKILLS_DIR_NAME), |
| 174 | path.join(home, '.agents', SKILLS_DIR_NAME), |
| 175 | // Project directories (Claude-compatible first, then Codebuff) |
| 176 | path.join(cwd, '.claude', SKILLS_DIR_NAME), |
| 177 | path.join(cwd, '.agents', SKILLS_DIR_NAME), |
| 178 | ] |
| 179 | } |
| 180 | |
| 181 | export type LoadSkillsOptions = { |
| 182 | /** Working directory for project skills. Defaults to process.cwd() */ |