MCPcopy Create free account
hub / github.com/JordanCoin/codemap / RunSkill

Function RunSkill

cmd/skill.go:12–37  ·  view source on GitHub ↗

RunSkill handles the "codemap skill" subcommand.

(args []string, root string)

Source from the content-addressed store, hash-verified

10
11// RunSkill handles the "codemap skill" subcommand.
12func RunSkill(args []string, root string) {
13 subCmd := ""
14 if len(args) > 0 {
15 subCmd = args[0]
16 }
17
18 switch subCmd {
19 case "list":
20 runSkillList(root)
21 case "show":
22 if len(args) < 2 {
23 fmt.Fprintln(os.Stderr, "Usage: codemap skill show <name>")
24 os.Exit(1)
25 }
26 runSkillShow(root, args[1])
27 case "init":
28 runSkillInit(root)
29 default:
30 fmt.Println("Usage: codemap skill <list|show|init>")
31 fmt.Println()
32 fmt.Println("Commands:")
33 fmt.Println(" list Show all available skills with descriptions")
34 fmt.Println(" show <name> Print full skill content")
35 fmt.Println(" init Create a SKILL.md template in .codemap/skills/")
36 }
37}
38
39func runSkillList(root string) {
40 idx, err := skills.LoadSkills(root)

Callers 1

mainFunction · 0.92

Calls 3

runSkillListFunction · 0.85
runSkillShowFunction · 0.85
runSkillInitFunction · 0.85

Tested by

no test coverage detected