MCPcopy Create free account
hub / github.com/Waishnav/devspace / effectiveSkillPaths

Function effectiveSkillPaths

src/skills.ts:23–38  ·  view source on GitHub ↗
(config: ServerConfig, cwd: string)

Source from the content-addressed store, hash-verified

21}
22
23export function effectiveSkillPaths(config: ServerConfig, cwd: string): string[] {
24 const defaultPaths = [
25 join(homedir(), ".agents", "skills"),
26 resolve(cwd, ".agents", "skills"),
27 join(config.agentDir, "skills"),
28 ].filter((path) => existsSync(path));
29
30 const seen = new Set<string>();
31 return [...defaultPaths, ...config.skillPaths]
32 .map((path) => resolveSkillPath(path, cwd))
33 .filter((path) => {
34 if (seen.has(path)) return false;
35 seen.add(path);
36 return true;
37 });
38}
39
40function resolveSkillPath(path: string, cwd: string): string {
41 return resolve(cwd, expandHomePath(path));

Callers 2

loadWorkspaceSkillsFunction · 0.85
skills.test.tsFile · 0.85

Calls 1

resolveSkillPathFunction · 0.85

Tested by

no test coverage detected