MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / deleteSkill

Method deleteSkill

src/services/skills/SkillsManager.ts:432–448  ·  view source on GitHub ↗

* Delete a skill * @param name - Skill name to delete * @param source - Where the skill is located * @param mode - Optional mode (to locate in skills-{mode}/ directory)

(name: string, source: "global" | "project", mode?: string)

Source from the content-addressed store, hash-verified

430 * @param mode - Optional mode (to locate in skills-{mode}/ directory)
431 */
432 async deleteSkill(name: string, source: "global" | "project", mode?: string): Promise<void> {
433 // Find the skill
434 const skill = this.getSkill(name, source, mode)
435 if (!skill) {
436 const modeInfo = mode ? ` (mode: ${mode})` : ""
437 throw new Error(t("skills:errors.not_found", { name, source, modeInfo }))
438 }
439
440 // Get the skill directory (parent of SKILL.md)
441 const skillDir = path.dirname(skill.path)
442
443 // Delete the entire skill directory
444 await fs.rm(skillDir, { recursive: true, force: true })
445
446 // Refresh skills list
447 await this.discoverSkills()
448 }
449
450 /**
451 * Move a skill to a different mode

Callers 2

handleDeleteSkillFunction · 0.80

Calls 3

getSkillMethod · 0.95
discoverSkillsMethod · 0.95
tFunction · 0.90

Tested by

no test coverage detected