MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / syncSkillDescriptions

Function syncSkillDescriptions

src/skill-manager.ts:305–321  ·  view source on GitHub ↗
(
  workDir: string,
  config: PackConfig,
)

Source from the content-addressed store, hash-verified

303}
304
305export function syncSkillDescriptions(
306 workDir: string,
307 config: PackConfig,
308): PackConfig {
309 const descriptionByName = new Map<string, string>();
310
311 for (const skill of scanInstalledSkills(workDir)) {
312 descriptionByName.set(normalizeName(skill.name), skill.description);
313 }
314
315 config.skills = config.skills.map((skill) => {
316 const description = descriptionByName.get(normalizeName(skill.name));
317 return description === undefined ? skill : { ...skill, description };
318 });
319
320 return config;
321}
322
323export function upsertSkills(
324 config: PackConfig,

Callers 3

zipCommandFunction · 0.85
runCommandFunction · 0.85

Calls 2

scanInstalledSkillsFunction · 0.85
normalizeNameFunction · 0.85

Tested by

no test coverage detected