MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / loadSkills

Function loadSkills

sdk/src/skills/load-skills.ts:221–235  ·  view source on GitHub ↗
(options: LoadSkillsOptions = {})

Source from the content-addressed store, hash-verified

219 * ```
220 */
221export async function loadSkills(options: LoadSkillsOptions = {}): Promise<SkillsMap> {
222 const { cwd = process.cwd(), skillsPath, verbose = false } = options
223
224 const skills: SkillsMap = {}
225
226 const skillsDirs = skillsPath ? [skillsPath] : getDefaultSkillsDirs(cwd)
227
228 for (const skillsDir of skillsDirs) {
229 const dirSkills = discoverSkillsFromDirectory(skillsDir, verbose)
230 // Later directories override earlier ones (project overrides global)
231 Object.assign(skills, dirSkills)
232 }
233
234 return skills
235}
236
237

Callers 2

initialSessionStateFunction · 0.90

Calls 2

getDefaultSkillsDirsFunction · 0.85

Tested by

no test coverage detected