MCPcopy Create free account
hub / github.com/Facets-cloud/flow / cmdSkill

Function cmdSkill

internal/app/skill.go:97–114  ·  view source on GitHub ↗

cmdSkill dispatches `flow skill install|uninstall|update`.

(args []string)

Source from the content-addressed store, hash-verified

95 skillPath, err := h.SkillInstallPath()
96 if err != nil {
97 return
98 }
99 if _, err := os.Stat(skillPath); err != nil {
100 // Not installed → user opted out; don't reinstall behind their back.
101 return
102 }
103 if readSkillVersion() == Version {
104 return
105 }
106 // Version mismatch — refresh skill bytes and the SessionStart hook.
107 if err := h.InstallSkill(skillFiles()); err != nil {
108 return
109 }
110 _ = writeSkillVersion(Version)
111 _, _ = h.InstallSessionStartHook(hookCommand)
112 _, _ = h.InstallUserPromptSubmitHook(userPromptSubmitHookCommand)
113 fmt.Fprintf(os.Stderr, "flow: upgraded skill to %s\n", Version)
114}
115
116// cmdSkill dispatches `flow skill install|uninstall|update`.
117func cmdSkill(args []string) int {

Calls 2

skillInstallFunction · 0.85
skillUninstallFunction · 0.85